PDA

View Full Version : Hide Admin Thread Options


Aaron1
08-29-2003, 08:10 AM
I don't know if this is done before, but i would find it very usefull if the 'Admin Thread Options dropdown' would be visible for only Admins, Super Moderators & moderators. Btw i am running 2.2.7 and it shows the dropdown for regular members and guests...

Best regards!

assassingod
08-29-2003, 08:19 AM
Try this, open up showthread.php and find:

if (ismoderator($thread['forumid']) or $getperms['canopenclose'] or $getperms['candeletethread'] or $getperms['canmove']) {
eval("\$adminoptions = \"".gettemplate("showthread_adminoptions")."\";");
} else {
$adminoptions = " ";
}


replace with


if (ismoderator($thread['forumid']) or $getperms['canopenclose'] or $getperms['candeletethread'] or $getperms['canmove']) {
eval("\$adminoptions = \"".gettemplate("showthread_adminoptions")."\";");
} elseif ($bbuserinfo[usergroupid] == 5 OR $bbuserinfo[usergroupid] == 6) {
eval("\$adminoptions = \"".gettemplate("showthread_adminoptions")."\";");
} else {
$adminoptions = " ";
}

Aaron1
08-29-2003, 08:28 AM
Hmm thanks!, i tried but it's still there!

Well, it did work for guests though, but registered users can still see it. What could it be?

Aaron1
08-29-2003, 08:31 AM
Here are my settings with the forumpermissions for registered users. Hope it's usefull....

assassingod
08-29-2003, 08:33 AM
You could try:

if (ismoderator($thread['forumid']) or $getperms['canopenclose'] or $getperms['candeletethread'] or $getperms['canmove']) {
eval("\$adminoptions = \"".gettemplate("showthread_adminoptions")."\";");
} elseif ($bbuserinfo[usergroupid] == 1 OR $bbuserinfo[usergroupid] == 2 OR $bbuserinfo[usergroupid] == 3 OR $bbuserinfo[usergroupid] == 4 ) {
eval("\$adminoptions = \"".gettemplate("showthread_adminoptions")."\";");
} else {
$adminoptions = " ";
}

Aaron1
08-29-2003, 08:36 AM
LOL, now it's visible for both Registered & Guests.
Sorry the other one worked better :)

assassingod
08-29-2003, 08:39 AM
Whoops, I forgot to change something, use:

if (ismoderator($thread['forumid']) or $getperms['canopenclose'] or $getperms['candeletethread'] or $getperms['canmove']) {
eval("\$adminoptions = \"".gettemplate("showthread_adminoptions")."\";");
} elseif ($bbuserinfo[usergroupid] == 1 OR $bbuserinfo[usergroupid] == 2 OR $bbuserinfo[usergroupid] == 3 OR $bbuserinfo[usergroupid] == 4 ) {
$adminoptions = " ";
} else {
$adminoptions = " ";
}

Aaron1
08-29-2003, 08:43 AM
Hmm, it's the same result as the first one :)
Registered can still see the Admin Thread Options, but guests can't see it. We are very close! Almost working! (trying to motivate you) :)

assassingod
08-29-2003, 08:45 AM
Hehe, try this:
Find:

if (ismoderator($thread['forumid']) or $getperms['canopenclose'] or $getperms['candeletethread'] or $getperms['canmove']) {
eval("\$adminoptions = \"".gettemplate("showthread_adminoptions")."\";");
} else {
$adminoptions = " ";
}


Under that, add:


if ($bbuserinfo[usergroupid] == 6 or $bbuserinfo[usergroupid] == 5) {
eval("\$adminoptions = \"".gettemplate("showthread_adminoptions")."\";");
} else {
$adminoptions = " ";
}

Aaron1
08-29-2003, 08:51 AM
You rock! That worked!

Thanks alot! :cool:

Ok let's continue with my next request!

Combining Multiquote & The quickreply hack:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=56588

Nah just kidding you helped me enough for today already :)
Appreciated!

assassingod
08-29-2003, 08:52 AM
Glad it worked:)