Back to vBulletin 3.0 Add-Ons

Moderator Dropdown Listing
Mod Version: 1.00, by Feran

This modification is in the archives.
vB Version: 3.0.0 Rating: (0 vote - 0 average) Installs: 11
Released: 20 Jan 2004 Last Update: Never Downloads: 0
Not Supported  

Yeah, I found it kinda annoying how having multiple moderators for one forum would make things rather ugly and cluttery and jumble up my front page. So, I made this nifty little hack ^_^

Features:
- Upon choosing a moderator, it will link to that moderator's profile
- A link to showgroups.php

Download, install, enjoy. Only one edit!! 8)

PHP Code:
Open includes/functions_forumlist.phpfind this:

//////////////////////////////////////////////////////////////////

                // get moderators ( this is why we needed cache_moderators() )
                
if ($vboptions['showmoderatorcolumn'])
                {
                    
$showmods = array();
                    
$listexploded explode(','$forum['parentlist']);
                    foreach (
$listexploded AS $parentforumid)
                    {
                        if (!isset(
$imodcache["$parentforumid"]))
                        {
                            continue;
                        }
                        foreach(
$imodcache["$parentforumid"] AS $moderator)
                        {
                            if (
$showmods["$moderator[userid]"] === true)
                            {
                                continue;
                            }

                            
$showmods["$moderator[userid]"] = true;
                            if (!isset(
$forum['moderators']))
                            {
                                eval(
'$forum[\'moderators\'] = "' fetch_template('forumhome_moderator') . '";');
                            }
                            else
                            {
                                eval(
'$forum[\'moderators\'] .= ", ' fetch_template('forumhome_moderator') . '";');
                            }
                        }
                    }
                    if (!isset(
$forum['moderators']))
                    {
                        
$forum['moderators'] = '';
                    }
                }


//////////////////////////////////////////////////////////////////

Replace it with this:

//////////////////////////////////////////////////////////////////

                // get moderators ( this is why we needed cache_moderators() )
                
if ($vboptions['showmoderatorcolumn'])
                {
                    
$showmods = array();
                    
$listexploded explode(','$forum['parentlist']);
                    foreach (
$listexploded AS $parentforumid)
                    {
                        if (!isset(
$imodcache["$parentforumid"]))
                        {
                            continue;
                        }
                        foreach(
$imodcache["$parentforumid"] AS $moderator)
                        {
                            if (
$showmods["$moderator[userid]"] === true)
                            {
                                continue;
                            }

                            
$forum['moderators'] .= "<option value='{$moderator[userid]}'>{$moderator[username]}</option>";
                        }

                    }

$modhack_head = <<< CONTENT

<script>
<!--
function moddrophack_redir(tparam)
{
    if (tparam != -1) {
        location.href = 'member.php?userid=' + tparam;
    }
    else {
        location.href = 'showgroups.php';
    }
}
// -->
</script>

<form method="post">

<select id="moddrophack" onchange="moddrophack_redir(this.options[selectedIndex].value)">
<option value="-1">--------------</option>

CONTENT;

$modhack_foot '<option value="-1">View All Mods</option></select></form>';

                    if (!isset(
$forum['moderators']))
                    {
                        
$forum['moderators'] = '';
                    }
                    else {
                        
$forum['moderators'] = $modhack_head $forum['moderators'] . $modhack_foot;
                    }
                } 

Download

No files for download.

Screenshots

 

Similar Mods

Moderator Dropdown List vBulletin 3.0 Template Modifications
Moderator Dropdown Pro vBulletin 3.0 Template Modifications

vblts.ru supports vBulletin®, 2022-2024