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 |
#12
|
|||
|
|||
First attempt at posting anything.
|
#13
|
||||
|
||||
I did mine an easyer way (find this out by looking around the template mod. forum ) and here's how I did mine (2 different ways)....for the buttons (I used this on 2 template sets), I just added the following to the "phpinclude" template:
PHP Code:
Code:
<!-- toplinks --> $vadminbutton $vmodbutton $regcp <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> <a href="index.php?s=$session[sessionhash]"><img src="{imagesfolder }/top_home.gif" alt="Home" border="0"></a> $vlogout <!-- /toplinks --> or you can put this in the "phpinclude" template: PHP Code:
|
#14
|
||||
|
||||
Quote:
Anyway ^-^ |
#15
|
||||
|
||||
scsa20: sure, that works too, but it's totally not necessary on my board (how the hell you found that "an easier way" is beyond me, though. ).
I have my Admin Panel on my Personal Bookmark Folder, so I just have to click on one link to get there, no matter _what_ site or page I'm browsing (so I can be on this forum and still jump there with 1 click). As for the Mod panel, they don't have anything to do there on my board except ban users, and that's something they don't often have to do at all, and usually I'm the one doing it anyhow. But, thanks for the addition anyway, some other people might well appreciate it. :up: |
#16
|
||||
|
||||
Takara, as a suggestion: export images as .GIF if they don't use a lot of colors (ie. forum screenshots, for instance) - top quality and very small filesizes. Much better than these horrid, horrid .jpg's
|
#17
|
||||
|
||||
Hi,
does somebody know how i can put these function in a javascript coded menu? I use the xmenu hack https://vborg.vbsupport.ru/showthrea...ighlight=xmenu and want to use this function? Thanks alot! |
#18
|
||||
|
||||
I can't help you with that, if you still _need_ help, even.... :/
|
#19
|
||||
|
||||
thanks, i found another solution, thanks!
|
#20
|
||||
|
||||
Well for starters I'm using version 2.2.5, and nowhere in my global.php do I see the above mentioned reference. I tried putting this...
PHP Code:
|
#21
|
||||
|
||||
Your root/global.php should have these two lines, somewhere around line 270-280:
PHP Code:
If you can't find that, try finding this: PHP Code:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|