News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Tinyportal MOD upgrade for post moderation MOD upgrade...

Started by thefool1972, February 20, 2005, 11:27:16 PM

Previous topic - Next topic

thefool1972

If you would like to see if there are moderated topics (using the post moderation MOD) waiting in your Tinyportal User block, add this quick bit of code.


Find: ./Themes/default/TPortalBlocks.template.php

Look for following:
                // Only tell them about their messages if they can read their messages!
                if ($context['allow_pm']){
                        echo '<ul style="list-style: square;margin: 0px; margin-left: 15px;padding: 0;padding-left: 0px;text-indent: 0px;"><li><a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], '</li>';


Add the following AFTER the above.
// Moderated posts...
if (isset($context['show_moderation']))
echo '<li>', $context['show_moderation'] == 1 ? $txt['postmod_there_' . ($context['moderation_number'] == 1 ? 'is' : 'are')] : $txt['postmod_you_have'], ' <a href="', $scripturl, '?action=pmod', $context['show_moderation'] == 1 ? 'man' : 'edit', '">', $context['moderation_number'], '</a> ', $context['moderation_number'] == 1 ? $txt['postmod_one_awaiting'] : $txt['postmod_many_awaiting'], $context['show_moderation_board'] ? ' ' . $txt['postmod_this_board'] : '', '.</li>';


bloc

A small note...
You may also want to apply it to index.template.php , finding the similar code there - since TinyPortal have the option of showing the usual userbox/stats/newsbox in addition to the built-in blocks that gets modified here.

Great tip. :)

thefool1972



Advertisement: