The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Register link for guests, User CP link (or button) for members. Details »» | |||||||||||||||||||||||||||
Register link for guests, User CP link (or button) for members.
Developer Last Online: Nov 2023
Oh my Kura, you're releasing small, simple hacks every day now, huh? What's this one about?
Rest assured, after this one I don't have anything to release for a while (only stuff that has no purpose outside my own board). Well, this hack. What it does is 'merge' the Register and User CP buttons. If a viewer is a guest or just not logged in, the link will display a Register button (or text link, whatever you want). If the viewer IS logged in, and therefore a member, it will display the User CP button instead. Click here for an example (where `register` is will be `user cp` when you're logged in). I mean, why have a Register button for members available, and a User CP button available for guests? Exactly, that makes no sense, therefore, this hack. Instructions Step 1: Open your global.php and find this line: PHP Code:
Make sure to remove the space between {imagesfolder and }!! PHP Code:
$reg_ucp somewhere in your Header, where you want the UserCP / Register button to appear. Make sure to remove the 'hardcoded' buttons that are already in there, of course. Save, and you're done. Note that if you aren't using the default vB templates and graphics (which is 99% likely? ) you'll have to adjust the code above to suit your needs. If you don't use images, just remove the image part there and replace it with text links. Extra feature that you can use with this hack: add Guest-only banners or something alike. In other words, only guests will see the banner (which could say something like "Want to get rid of this annoying banner? Then sign up now!") and users who are logged in won't see anything. To do so, use something like this: PHP Code:
Enjoy! Show Your Support
|
Comments |
#82
|
||||
|
||||
what's line 292 of your global.php ?
|
#83
|
||||
|
||||
Pico says line 292 is // #### Referrer Stuff ###
|
#84
|
||||
|
||||
No clue what's wrong, then
|
#85
|
||||
|
||||
does everything look right in the code as it only errors with the code... without it it works fine.
|
#86
|
||||
|
||||
I probably have to see the entire file before I can figure out what's wrong. The pasted code there looks fine to me, so I'm thinking it's something elsewhere....
|
#87
|
||||
|
||||
thanks for the cool hack! i fixed it... pico wasn't doing the lines right when I pasted in a template i musta hit something too as i had $templatesused. =' instead of $templatesused.='
|
#88
|
||||
|
||||
Ah, thought so
Well, glad you got it working |
#89
|
||||
|
||||
i added the $reg_upc variable but it doesnt show up
could it be that i have to take out the original button lins and replace them with the other variables?????? heres a pik of my delema |
#90
|
||||
|
||||
my code if someone could be so kind
PHP Code:
|
#91
|
||||
|
||||
replace that with this
Code:
<!-- logo and buttons --> <center> <table border="0" width="{tablewidth}" cellpadding="2" cellspacing="1" bgcolor={tablebordercolor}> <tr bgcolor={firstaltcolor}> <td align="center"> <a href="index.php?s=$session[sessionhash]"><img src="{titleimage}" border="0" alt="$bbtitle"></a> </td> </tr> <tr bgcolor={secondaltcolor align=center> <td bgcolor={secondaltcolor}> $admincp $modcp $reg_ucp <a href="index.php?s=$session[sessionhash]"><img src="{imagesfolder}/top_home.gif" alt="Home" border="0"></a> <a href="member.php?s=$session[sessionhash]&action=logout"><img src="{imagesfolder}/top_logout.gif" border="0"></a> <a href="calendar.php?s=$session[sessionhash]"><img src="{imagesfolder}/top_calendar.gif" alt="Calendar" border="0"></a> <a href="memberlist.php?s=$session[sessionhash]"><img src="{imagesfolder}/top_members.gif" alt="Find other members" border="0"></a> <a href="misc.php?s=$session[sessionhash]&action=faq"><img src="{imagesfolder}/top_faq.gif" alt="Frequently Asked Questions" border="0"></a> <a href="search.php?s=$session[sessionhash]"><img src="{imagesfolder}/top_search.gif" alt="Search" border="0"></a> </td> </tr> </table> <!-- logo and buttons --><!-- content table --> <table bgcolor="{pagebgcolor}" width="{tablewidth}" cellpadding="10" cellspacing="0" border="0"> <tr> <td> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|