News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Adding mod drop down box to forum index

Started by codenaught, November 14, 2004, 11:33:36 AM

Previous topic - Next topic

codenaught

I think I want to try out using a moderator drop down box on the far right after where it says Last Post.

So it would look something like how iB does it.

Example: (Scoll Right To see Mod Drop Down Box)



Basically I would want it just like that. So it would say moderator and then you could click it to drop down to see the moderators of that forum.

Does anyone think they can help me with that?

I was able to do that myself when I used IPB, but now as SMF uses php in their template files it gets me confused.  :P

[edit] I think this would be done using BoardIndex.template.php right? I think I want this done with the classic BoardIndex.template.php file but if you want you can explain how to do it with the default one and I can figure out how to adjust it to the classic one[/edit]
Dev Consultant
Former SMF Doc Coordinator

A.M.A

in the default theme BoardIndex.template.php look for:
<td colspan="4" class="catbg', $category['new'] ? '2' : '', '" height="18">';
replace it with:
<td colspan="5" class="catbg', $category['new'] ? '2' : '', '" height="18">';


look for:
', $txt['smf88'], ' ', $board['last_post']['link'], ' ', $txt[525], ' ', $board['last_post']['member']['link'];

echo '
</td>

add after:
<td class="smalltext" valign="middle">
<select name="ModLst">
<option value="" style="font-weight: bold;">Moderator(s)</option>';

// Show the Moderators drop down list!
foreach ($board['link_moderators'] as $boardI=> $boardM)
{
echo '
<option value="">',$boardM,'</option>';
}
echo '
</select>
</td>



finally find and delete this:
// Show the "Moderators: ".  Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<div style="padding-top: 1px;" class="smalltext"><i>', count($board['moderators']) == 1 ? $txt[298] : $txt[299], ': ', implode(', ', $board['link_moderators']), '</i></div>';

Do not forget to backup the template first.
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

codenaught

Thanks. I adjusted that code for the classic BoardIndex.template and it worked very well! Now I think I may increase the width of my forum a bit as now I have 5 boxes using the classic one and so it looks a bit cluttered.  ;)
Dev Consultant
Former SMF Doc Coordinator

Advertisement: