Help with switches for moderators & if open modertor reports

Discussion forum for MOD Writers regarding MOD Development.
Locked
User avatar
-ds-
Registered User
Posts: 554
Joined: Wed Sep 14, 2005 7:12 pm

Help with switches for moderators & if open modertor reports

Post by -ds- »

Hi,

I want to create a custom block on the index.php that only shows up if there are unread or open 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 or open reported items?

Code: Select all

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

Any help would b
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Help with switches for moderators & if open modertor reports

Post by RMcGirr83 »

Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
-ds-
Registered User
Posts: 554
Joined: Wed Sep 14, 2005 7:12 pm

Re: Help with switches for moderators & if open modertor reports

Post by -ds- »

Excellent! Thank you. I wonder how I missed that.

I will probably not install the whole mod, but maybe just take bits away from it, but I shall reply here again if I with my results.

Thanks for your help again. :D
Locked

Return to “[3.0.x] MOD Writers Discussion”