PDA

View Full Version : Link to zero replies: Display for specific usergroups only


djbaxter
03-22-2018, 01:19 PM
vBulletin 4.2.5

Using this as a link in the navbar lists threads with zero replies:

search.php?do=process&contenttype=vBForum_Post&replyless=1&replylimit=0


Is there a way to make that display only for certain usergroups, e.g., admins, mods, top contributors?

MarkFL
03-22-2018, 02:15 PM
Create a plugin hooked at "global_bootstrap_init_complete" with the following code:

global $vbulletin;

if (is_member_of($vbulletin->userinfo, array(X,Y,X)))
{
$show['noreplies'] = true;
}

Change "X,Y,Z" for the usergroups you wish to give permission. Then, in the "Show Permission Name" option for your navbar item, enter:

noreplies

djbaxter
03-22-2018, 07:01 PM
Simple but elegant. Thanks, Mark. :)