Switch help -> if MCP_REPORTS & U_IN_MCP

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Scam Warning
Locked
User avatar
-ds-
Registered User
Posts: 554
Joined: Wed Sep 14, 2005 7:12 pm

Switch help -> if MCP_REPORTS & U_IN_MCP

Post by -ds- » Sun Dec 13, 2009 6:53 pm

Hi,

I want to create a custom block on the index.php that only shows up if there are unread Reported Posts or PMs.
How do I go about creating a switch on that checks if there are any open reported items?

I presume i have to declare something like this in the index.php file?

Code: Select all

$template->assign_vars(array(
    'MCP_REPORTS' =>  ... function to check that returns true,
)); 
Then to show the block to moderators in the template file:

Code: Select all

<!-- IF MCP_REPORTS and  U_IN_MCP -->
<div class="mcp_alert">There are new Reported Files</div>
<-- ENDIF -->

and use something like the code in the mcp.php file to get the data, or is there a faster way to check if there are any unread reported items?

Code: Select all

/**
* Get simple post data
*/
function get_post_data($post_ids, $acl_list = false, $read_tracking = false) {
...
}

Any help would be greatly appreciated.

Locked

Return to “[3.0.x] MOD Requests”

Who is online

Users browsing this forum: Elsensee and 10 guests