PDA


View Full Version : Quick Moderation module


antivirus
08-06-2005, 10:41 PM
I need to make the phrases for threads, posts, attachments, etc... awaiting moderation red so they stand out, but only if there are 1 or more of anything awaiting moderation. For instance, in the attachment below, since there's 1 event awaiting moderation, i would want the phrase for the word "Events" to show up in red.

I know this has to be done in the adv_portal_moderation template, i'm just not shure how to phrase the conditional. Can anyone help?

<tr>
<td class="$bgclass">
<if condition="$show['threads']">
<div><phrase 1="$threads[count]" 2="$vboptions[bburl]/$modcpdir/moderate.php?do=posts">$vbphrase[x_threads]</phrase></div>
</if>
<if condition="$show['posts']">
<div><phrase 1="$posts[count]" 2="$vboptions[bburl]/$modcpdir/moderate.php?do=posts#postlist">$vbphrase[x_posts]</phrase></div>
</if>
<if condition="$show['events']">
<div><phrase 1="$events[count]" 2="$vboptions[bburl]/$modcpdir/moderate.php?do=events">$vbphrase[x_events]</phrase></div>
</if>
<if condition="$show['attachments']">
<div><phrase 1="$attachments[count]" 2="$vboptions[bburl]/$modcpdir/moderate.php?do=attachments">$vbphrase[x_attachment]</phrase></div>
</if>
<div><phrase 1="$users[count]" 2="$vboptions[bburl]/$admincpdir/user.php?do=moderate">$vbphrase[x_users]</phrase></div>
</td>
</tr>

Thanks!

Brian
08-07-2005, 01:43 PM
If you change each <div> tag there to something more like this then that will at least change the numbers to appear red. Unless I'm missing something though, changing all of the text would require a little more work.

<div<if condition="$threads['count']"> style="color:red"</if>>

antivirus
08-08-2005, 07:06 PM
thanks Bri,
that worked perfectly, you rock! :D

antivirus
08-08-2005, 07:25 PM
one more thing i noticed about this moderation module's template... I notice the moderate users string doesn't have a conditional to show it. If I change the following:

<div<if condition="$users['count']"> style="color:red"</if>><phrase 1="$users[count]" 2="$vboptions[bburl]/$admincpdir/user.php?do=moderate">$vbphrase[x_users]</phrase></div>

to this:
<if condition="$show['users']">
<div<if condition="$users['count']"> style="color:red"</if>><phrase 1="$users[count]" 2="$vboptions[bburl]/$admincpdir/user.php?do=moderate">$vbphrase[x_users]</phrase></div>
</if>

will it then restrict viewing users awaiting moderation based upon the usual usergroup settings?
Please advise, and thanks!

Brian
08-08-2005, 07:32 PM
No, $show['users'] is not a valid variable, nor is there one that I'm aware of.

antivirus
08-08-2005, 11:53 PM
ok thanks for answer!

theguru
03-26-2006, 07:49 AM
I have just discovered an issue that has got me completely puzzeled.

We used to have only Super Moderators and the Quick Moderation module worked fine.
We have now moved our Super Mods to regular Mods and the module has stopped working. When logged in as a Mod it only shows the Users line???

I took the conditionals off the other lines, but all it displays is 'Threads ()' ... what happened to the count?????