vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   [RELEASE vB2B2] Hidden admin options (https://vborg.vbsupport.ru/showthread.php?t=10503)

PeF 03-05-2001 08:25 AM

1 Attachment(s)
Description:
This hack will display admin options only to moderators, super moderators and administrators.

vBulletin versions supported:
2.0 Beta 2

Files to edit:
forumdisplay.php, showthread.php

Templates to modify:
2 - forumdisplay, showthread

Number of new queries:
0

Number of new templates:
2

Size:
1,10KB

Demo:
N/A

Known bugs and issues:
Just test it and let me know. :)

Instructions:
Included in the attached ZIP file.

03-05-2001 09:10 AM

Will try this in the morning. This is actually on my request list :)

03-05-2001 01:49 PM

Usergroupid 7 is not necessarily a moderator, as that group is a group added by the admin. Moderators are determined by there inclusion in the moderator table outside of Admins at usergroup 6 and Super Mods at usergroup 5.

Would be better (may add a query) to use this as it would catch all moderators in addition to hiding options from moderators in forums that they do not moderate.

Code:

// Hide admin options to members
if (ismoderator($thread[forumid)) {
  eval("\$forum_adminoptions = \"".gettemplate('forumdisplay_admin_options')."\";");
} else {
  $forum_adminoptions = "";
}


03-05-2001 02:00 PM

I wasn't thinking of moderators from another forums. Silly me. :)

Thanks Freddie, package updated.

03-05-2001 08:24 PM

Nevermind that, stupid typo on my part that i hadn't noticed. Fixed now

Awesome script and keeps my users from being confused about what those extra options are! Very useful

Maz

03-06-2001 12:27 PM

I did everything I was supposed to and it only works with my default template.

Not sure why it doesn't work.

it just prints nothing for the other templates. Even though I am logged in as admin.

03-06-2001 12:43 PM

I'm not sure either. I need some more info or even better - the link to your pages.

03-15-2001 06:04 AM

is there a way to uses this under vb 1.1.x also? the varialbe "ismoderator" dosn't work

03-15-2001 06:31 AM

I'm not going to hack this for versions lower than 2.0 because of time. This hack should be compatible with all 2.0 betas.

03-15-2001 08:34 AM

Don't find the utility of this hack!


All times are GMT. The time now is 07:00 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.01107 seconds
  • Memory Usage 1,724KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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