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 |
#42
|
||||
|
||||
sorry, I just hate when people quote massive posts and then not respond to the actual post contents directly, thus making their own posts unnecessarily huge. It annoys me to no end, it's so inefficient and impractical!
I tend to be very efficient and practical in life, and with some things I definitely even succeed in that - it just gets on my nerves when other people just walz over it without giving it a moment's thought... take no offense, I'm just muttering madly here |
#43
|
||||
|
||||
We are of the same mind, it seems. I, too, like order and discipline in my life (although you would never know it as bad as my board looks right now ). But, alas, I just found out I'm going to be a father again...twice! (Twins) That is why the board has taken a back seat the last few days. That is also why I am trying to get things in order so I can get it finished. Which brings me to what I was looking to do with the scroller.
Is there a way to set that code up for the banner to call a template that would have the javascript code in it for the scroller? Or can I even do it that way? What I would like to do is have it put the scroller up for guests but not for the regsitered users, only I will have to make a table for it for the guests and remove the table for the regular users. If any of that doesn't make sense, just pick out the parts that do and let me know what I said, will you? |
#44
|
||||
|
||||
Yeah, you can replace the whole 'banner' stuff with a bit of code to call a template like any other.
It's that I'm too busy (WAY too busy) right now, and it being 2 am, or else I'd have fixed you up right away. As it is, I'll _try_ to get it done tomorrow, but you wouldn't believe my To-do list.... *sighs* I'm 19 and there's 3 companies interested in me, now, and there's an average of 4 people a day asking me for stuff to make/design them... :bigsigh: |
#45
|
||||
|
||||
You get some sleep and if you have some time, that would be great. If not, then I'll figure something else out. I don't even remember what it was like to be 19. Back then, we didn't have electricity. We had to watch televison by the kerosene lantern. Have a good one!
|
#46
|
||||
|
||||
Okay, where the whole banner bit is, place this:
PHP Code:
Then just put $variablename where you want the whole template to be placed, and you're done. was easier than I thought, heh |
#47
|
||||
|
||||
My templated version working on 2.2.6. Thanks!
|
#48
|
||||
|
||||
Cool, so this can be updated to a 2.2.6 hack, then?
|
#49
|
|||
|
|||
great hack
and i love the flexibility of it :-D |
#50
|
||||
|
||||
Working on 2.2.7.
|
#51
|
|||
|
|||
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|