vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Hide Admin Thread Options (https://vborg.vbsupport.ru/showthread.php?t=56587)

Aaron1 08-29-2003 08:10 AM

Hide Admin Thread Options
 
1 Attachment(s)
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:
PHP Code:

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


replace with

PHP Code:

if (ismoderator($thread['forumid']) or $getperms['canopenclose'] or $getperms['candeletethread'] or $getperms['canmove']) {
  eval(
"\$adminoptions = \"".gettemplate("showthread_adminoptions")."\";");
} elseif (
$bbuserinfo[usergroupid] == 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

1 Attachment(s)
Here are my settings with the forumpermissions for registered users. Hope it's usefull....

assassingod 08-29-2003 08:33 AM

You could try:
PHP Code:

if (ismoderator($thread['forumid']) or $getperms['canopenclose'] or $getperms['candeletethread'] or $getperms['canmove']) { 
  eval(
"\$adminoptions = \"".gettemplate("showthread_adminoptions")."\";"); 
} elseif (
$bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == ) { 
  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:
PHP Code:

if (ismoderator($thread['forumid']) or $getperms['canopenclose'] or $getperms['candeletethread'] or $getperms['canmove']) { 
  eval(
"\$adminoptions = \"".gettemplate("showthread_adminoptions")."\";"); 
} elseif (
$bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == ) { 
  
$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:
PHP Code:

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


Under that, add:

PHP Code:

if ($bbuserinfo[usergroupid] == 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/showthrea...threadid=56588

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


All times are GMT. The time now is 10:04 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01021 seconds
  • Memory Usage 1,761KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete