Trying to get the hang of the plugin system. I'm trying to remove the comma that separates the moderators on the moderator column. Eg it outputs mod1, mod2, mod3; basically i want to remove the comma and space for something I'm trying to accomplish. The thing is I do not want to do a file edit.
Here is the code from the function_forumlist.php
PHP Code:
$showmods = array();
$listexploded = explode(',', $forum['parentlist']);
foreach ($listexploded AS $parentforumid)
{
if (!isset($imodcache["$parentforumid"]) OR $parentforumid == -1)
{
continue;
}
foreach($imodcache["$parentforumid"] AS $moderator)
{
if (isset($showmods["$moderator[userid]"]))
{
continue;
}
($hook = vBulletinHook::fetch_hook('forumbit_moderator')) ? eval($hook) : false;
$showmods["$moderator[userid]"] = true;
if (!isset($forum['moderators']))
{
eval('$forum[\'moderators\'] = "' . fetch_template('forumhome_moderator') . '";');
}
else
{
eval('$forum[\'moderators\'] .= ", ' . fetch_template('forumhome_moderator') . '";');
}
}
}
I want to insert a hook (forumbit_moderator) that will stop the execution of the code
PHP Code:
$showmods["$moderator[userid]"] = true;
if (!isset($forum['moderators']))
{
eval('$forum[\'moderators\'] = "' . fetch_template('forumhome_moderator') . '";');
}
else
{
eval('$forum[\'moderators\'] .= ", ' . fetch_template('forumhome_moderator') . '";');
}
And replace with
PHP Code:
$showmods["$moderator[userid]"] = true;
eval('$forum[\'moderators\'] = "' . fetch_template('forumhome_moderator') . '";');
Tried many things and just cannot get it to work right. Any suggestions?
Thanks!