Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Admin CP Button Details »»
Admin CP Button
Version: , by [D]Vincent [D]Vincent is offline
Developer Last Online: Jul 2003 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 06-18-2002 Last Update: Never Installs: 0
 
No support by the author.

I have a question, I don't know PHP so I need to know how to make my Admin CP button invisible to members. Also I want to know how to make my music page on my website only to where Members can access it.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 06-18-2002, 04:05 AM
c-pr0mpt's Avatar
c-pr0mpt c-pr0mpt is offline
 
Join Date: Oct 2001
Location: Michigan
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For your admin button to be invisible do this:

Insert this into the php include area in your style.

Code:
//Admin Button only for Admin
if ($bbuserinfo['usergroupid'] == 6) {
	//i am admin
	$admin_only = "YOUR BUTTON AND LINK HERE";
} else {
	//they're not admin
	$admin_only = "";
}
Then in your page where you want the admin button put "$admin_only".
Reply With Quote
  #3  
Old 06-18-2002, 10:32 PM
[D]Vincent's Avatar
[D]Vincent [D]Vincent is offline
 
Join Date: Jun 2002
Location: In my own little world?
Posts: 411
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This appeared at the top on my forumhome page
Parse error: parse error in /usr/local/psa/home/vhosts/fflounge.com/httpdocs/board/global.php(302) : eval()'d code on line 10
Reply With Quote
  #4  
Old 06-19-2002, 02:31 AM
scsa20's Avatar
scsa20 scsa20 is offline
 
Join Date: Mar 2002
Location: Mars
Posts: 458
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you probably did it like this (asuming your using a image):

PHP Code:
//Admin Button only for Admin
if ($bbuserinfo['usergroupid'] == 6) {
    
//i am admin
    
$admin_only "<a href="admin/index.php"><img src="{imagesforder}/admin.gif"></a>";
} else {
    
//they're not admin
    
$admin_only "";

if it looks like that, then your wrong, it should look like this:

PHP Code:
//Admin Button only for Admin
if ($bbuserinfo['usergroupid'] == 6) {
    
//i am admin
    
$admin_only "<a href=\"admin/index.php\"><img src=\"{imagesforder}/admin.gif\"></a>";
} else {
    
//they're not admin
    
$admin_only "";

that's the correct way of doing it (notices the \?? that's want it needs to know so that it knows that your doing something that's HTML related and not PHP related (I guess) with the end line). hopes this clears things up
Reply With Quote
  #5  
Old 06-19-2002, 11:54 AM
c-pr0mpt's Avatar
c-pr0mpt c-pr0mpt is offline
 
Join Date: Oct 2001
Location: Michigan
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Exactly as scsa20 said, Vincent. For php every time there is a quotation in the code you need a \ before it.

Except the initial quotes surrounding your code of course.
Reply With Quote
  #6  
Old 06-20-2002, 09:27 AM
[D]Vincent's Avatar
[D]Vincent [D]Vincent is offline
 
Join Date: Jun 2002
Location: In my own little world?
Posts: 411
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, I'll try that in a minute, could I use that for like a non-vb page so that guests can't see that page O_o
Reply With Quote
  #7  
Old 06-20-2002, 08:42 PM
scsa20's Avatar
scsa20 scsa20 is offline
 
Join Date: Mar 2002
Location: Mars
Posts: 458
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what you mean?? something like this??
Reply With Quote
  #8  
Old 06-21-2002, 04:08 AM
c-pr0mpt's Avatar
c-pr0mpt c-pr0mpt is offline
 
Join Date: Oct 2001
Location: Michigan
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The above way does the exact same thing minus hacking your files. This one is done via templates.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:17 PM.


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.04055 seconds
  • Memory Usage 2,270KB
  • Queries Executed 21 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete