Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Button Hack Details »»
Button Hack
Version: 1.00, by SiXXGuNNZ SiXXGuNNZ is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 12-30-2002 Last Update: Never Installs: 22
 
No support by the author.

Based on:

[vB v2.2.5] Register link for guests, User CP link (or button) for members.

https://vborg.vbsupport.ru/showthrea...threadid=38416


By:

KuraFire


Additional Code Written By:

TECK


What it does:

For logged in users this will show the user cp, member, search & logout buttons
for logged out users this will remove the member, search & log out button and in place of user cp it will show a register button.
For Super Mods this will show a mod cp button.
for admins this will show a admin cp button(admin cp and mod cp buttons not included).


Edits:

forum/global.php & Templates --> header


Additional info to install this with vBHome(lite) v3.8


---------------------
That all! Enjoy
---------------------

Show Your Support

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

Comments
  #2  
Old 12-31-2002, 04:12 AM
Lanigironu Lanigironu is offline
 
Join Date: Mar 2002
Location: Toronto, Canada
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So what happens if a mod or admin wants to access his user panel?
Reply With Quote
  #3  
Old 12-31-2002, 04:39 AM
SiXXGuNNZ's Avatar
SiXXGuNNZ SiXXGuNNZ is offline
 
Join Date: Oct 2001
Location: WA, USA
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmmm, I think I get what you are asking.

log out users: no user cp, registration instead, no log out, admin cp or mod cp button

logged in regular members: no registration, mod cp or admin cp buttons. user cp is where the registration button was and the log out button appears.

mods: same as registered users but they get the mod cp button.

admins: same as registered users but they get the admin cp button.

Attached Example.
Reply With Quote
  #4  
Old 12-31-2002, 06:03 AM
snyx's Avatar
snyx snyx is offline
 
Join Date: Oct 2001
Location: Vancouver (whistler.2010)
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

handy..
Reply With Quote
  #5  
Old 12-31-2002, 06:33 AM
Lanigironu Lanigironu is offline
 
Join Date: Mar 2002
Location: Toronto, Canada
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, that makes sense. Good hack, but I don't need it.
Reply With Quote
  #6  
Old 12-31-2002, 04:10 PM
Herman Herman is offline
 
Join Date: Apr 2002
Location: I dunno... VB heava?
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

U don't need to edit php files for this, I'll explain.

Just go into php Parced code in the style page.
Code:
//Register/usercp
if ($bbuserinfo[usergroupid]==1) { //guests
$regcp = "<a href=\"register.php\"><img src="images/top_register.gif"></a>";
} else { //Everyone else
$regcp = "<a href=\"usercp.php\"><img src="images/top_profile.gif"></a>";
}
//End Register/usercp

//Mod and Admin cp login
if ($bbuserinfo[usergroupid]==6) { //admins
$modadminlogin = "<a href=\"admin/index.php\">adminCP</a>&nbsp";
} elseif (($bbuserinfo[usergroupid]==5) or ($bbuserinfo[usergroupid]==7)) { //Mods
$modadminlogin = "<a href=\"mod/index.php\">modCP</a>&nbsp";
} else { //Everybody
$modadminlogin = "";
}
//End Mod and Admin cp login
Add that code to your php parced code, and then go to your forumhome and add $modadminlogin and $regcp wherever you want the buttons to appear, for $modadmin login I suggest in the foooter because that way it doesn't make where you look look weird also, if you edit the code in any way make sure to put a \ before every " when you start putting html, that switches the code from PHP to HTML.
Reply With Quote
  #7  
Old 03-09-2003, 03:58 AM
SiXXGuNNZ's Avatar
SiXXGuNNZ SiXXGuNNZ is offline
 
Join Date: Oct 2001
Location: WA, USA
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Herman
U don't need to edit php files for this, I'll explain.

Just go into php Parced code in the style page.
Code:
//Register/usercp
if ($bbuserinfo[usergroupid]==1) { //guests
$regcp = "<a href=\"register.php\"><img src="images/top_register.gif"></a>";
} else { //Everyone else
$regcp = "<a href=\"usercp.php\"><img src="images/top_profile.gif"></a>";
}
//End Register/usercp

//Mod and Admin cp login
if ($bbuserinfo[usergroupid]==6) { //admins
$modadminlogin = "<a href=\"admin/index.php\">adminCP</a>&nbsp";
} elseif (($bbuserinfo[usergroupid]==5) or ($bbuserinfo[usergroupid]==7)) { //Mods
$modadminlogin = "<a href=\"mod/index.php\">modCP</a>&nbsp";
} else { //Everybody
$modadminlogin = "";
}
//End Mod and Admin cp login
Add that code to your php parced code, and then go to your forumhome and add $modadminlogin and $regcp wherever you want the buttons to appear, for $modadmin login I suggest in the foooter because that way it doesn't make where you look look weird also, if you edit the code in any way make sure to put a \ before every " when you start putting html, that switches the code from PHP to HTML.
but you do have to edit each themes php Parced code

I myself like to do things one time and call it good
Reply With Quote
  #8  
Old 08-05-2003, 02:04 AM
jwoodall.2 jwoodall.2 is offline
 
Join Date: Aug 2003
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I got this, I think.. cept I don't know where to put the

Templates --> home_header Add:
-------------------------------------------------------------------------------------
Put $reg_upc where you want the user cp/register buttons to swap out
Put $memberhead where you want your member button to appear
Put $searchhead where you want your search button to appear
Put $logout where you want your log out button to appear
Put $admincp where you want the admin cp button to appear
Put $modcp where you want the mod cp button to appear
Reply With Quote
  #9  
Old 08-05-2003, 02:08 AM
jwoodall.2 jwoodall.2 is offline
 
Join Date: Aug 2003
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hrm.. it appears I already had a pretty major hack on mine (a friend set it up originally).
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 07:56 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10221 seconds
  • Memory Usage 2,285KB
  • Queries Executed 24 (?)
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
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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