vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Is there a way... (https://vborg.vbsupport.ru/showthread.php?t=39259)

Boofo 05-31-2002 04:46 AM

Is there a way...
 
Is there way to have the Admin Options link at the bottom of the profile page only show up for Admins and not show up for anyone else viewing the page?

Lesane 05-31-2002 06:14 AM

Find in member.php:

PHP Code:

eval("dooutput(\"".gettemplate("getinfo")."\");"); 

Add BEFORE it:

PHP Code:

if($bbuserinfo[usergroupid]==6) {
  eval(
"\$admin .= \"".gettemplate("getinfo_admin")."\";");
  } else {
  
$admin="";
  } 

Open template getinfo and find:

PHP Code:

<table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextraalign="center">
<
tr>
    <
td align="center"><smallfont><b>
    
Administrative Options: <a href="moderator.php?s=$session[sessionhash]&action=useroptions&userid=$userinfo[userid]">User Options</a>
    </
b></smallfont></td>
</
tr>
</
table

And REPLACE it with:

PHP Code:

$admin 

Make a new template with the name: getinfo_admin

PHP Code:

<table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextraalign="center">
<
tr>
    <
td align="center"><smallfont><b>
    
Administrative Options: <a href="moderator.php?s=$session[sessionhash]&action=useroptions&userid=$userinfo[userid]">User Options</a>
    </
b></smallfont></td>
</
tr>
</
table

Done. :)

Boofo 05-31-2002 06:55 AM

Works like a charm. Thank you, again. :)

Although no one could get into it, I just thought it didn't need to be there to non-Admins to tempt anyone. :)


All times are GMT. The time now is 11:07 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.02270 seconds
  • Memory Usage 1,725KB
  • 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
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete