![]() |
I'm logged in to your board... so why is there still a link at the top of your board asking me to "register"?
I'm not logged in... so why is there a link to my "control panel"? This bit of code will remove the pointless links from your forum, leaving it looking neater and using (a bit) less bandwidth. Details: Two template edits, that's all. Demo: http://forums.mediauk.com Use Username: vbulletinorg Password: vbulletinorg so you can see both states. We use text rather than the standard graphics, but you'll find the graphic code enclosed in the hack documentation. |
Ok, for the last step, editing the template, what and where do we exactly edit?
|
I put something in my phpinclude template like this:
if ($bbuserinfo[userid]) { // user is logged in $pflink = linkto usercp.php } else { $pflink = linkto register.php } I then put $pflink in the header template in place of the buttons that show user cp/register. Do it this way and you don't have to edit anything when you upgrade. |
In your header simply
Delete this :- <a href="usercp.php?s=$session[sessionhash]"><img src="{imagesfolder}/top_profile.gif" alt="Here you can view your subscribed threads, work with private messages and edit your profile and preferences" border="0"></a> <a href="register.php?s=$session[sessionhash]&action=signup"><img src="{imagesfolder}/top_register.gif" alt="Registration is free!" border="0"></a> And replace it with : $register_or_controlpanel Tried and tested and works fine and the php edit is hardly brain surgery now is it :) HM |
[QUOTE]Originally posted by freddie
Do it this way and you don't have to edit anything when you upgrade. |
please do!
|
Have done; hack now updated. Many thanks for that.
|
So easy! Thanks very much!
|
ah thank you freddie ;)
|
Parse error: parse error in /home/serioussam/cgi-bin/forums/global.php(328) : eval()'d code on line 10
|
Please use the code in the hack, not the code in this thread.
|
I like this hack. Thanks :)
|
They ought to build this into the next upgrade of vBulletin, it seems so much more logical.
Perhaps this could be expanded to allow for a logout button too though? (although the logout isn't usually next to register/user cp) --dock |
I could make it an option.
|
Its probably not with vB by default because of the option to allow multiple registrations. But then again, why don't they make that option determine whether this hack is enabled or not? :)
|
Well "they" would include me and I will proabably put this option in v3.
|
way to go freddie :)
|
vB3......oohhhhhhhhhhhh :D
|
Would it be possible to make the logout button (or A logout button, i know it's not standard...) also dependant upon whether the user is logged in?
|
Sure it would: in exactly the same way.
|
What about placing the LOGOUT button where REGISTER would be if they are logged in?
|
[QUOTE]Originally posted by SirSteve
What about placing the LOGOUT button where REGISTER would be if they are logged in? |
dont know whats wrong
installed the hack word for word and it didnt work no errors but the register and the user cp did not show oh well!! |
[QUOTE]Originally posted by freddie
I put something in my phpinclude template like this: if ($bbuserinfo[userid]) { // user is logged in $pflink = linkto usercp.php } else { $pflink = linkto register.php } I then put $pflink in the header template in place of the buttons that show user cp/register. Do it this way and you don't have to edit anything when you upgrade. |
yeah i did that
i think its because i use vbportal my phpinclude is this if (!isset($mainfile)){ include("../vbp_includes.php"); } i think this is where the problem is |
This is really confusing. There are codes flying around the thread and the .txt file at the beginning isn't written that well (no offense).
Could somebody rewrite this (take what's there and specify everything for MAJORLY PHP CHALLENGED people like ME) so it tells what exact file to open, what to change, where to change it? Thank you so much. It's confusing when the txt file is not specific at the end, people post coding in their replies, and then somebody says don't use that, bla bla, AAAHHHH. Thanks for redoing it if anyone does. I'm really illiterate with PHP and coding, so I need it very specific. The hack sounds very cool though. |
Works like a charm, thanks! I've been looking for this one ;)
|
[QUOTE]Originally posted by Smallville
This is really confusing. There are codes flying around the thread and the .txt file at the beginning isn't written that well (no offense). Could somebody rewrite this (take what's there and specify everything for MAJORLY PHP CHALLENGED people like ME) so it tells what exact file to open, what to change, where to change it? Thank you so much. It's confusing when the txt file is not specific at the end, people post coding in their replies, and then somebody says don't use that, bla bla, AAAHHHH. Thanks for redoing it if anyone does. I'm really illiterate with PHP and coding, so I need it very specific. The hack sounds very cool though. |
[QUOTE]Originally posted by Dockaych
Perhaps this could be expanded to allow for a logout button too though? (although the logout isn't usually next to register/user cp) |
If you download the graphic developers kit from vbulletin.com you'll find a log out-button (almost) ready to use.
Thanks for the hack! I've modified this hack somewhat too - having a text menu for users logged in, and having a user name and password text boxes for those not logged in, making it a breeze to log in - even when you are on some obscure page. |
i made a small mod that you can replace the entire logout crap with "$vlogout"
just out this in the phpinclude (remove the old code first) PHP Code:
open header.php find Code:
<a href="member.php?s=$session[sessionhash]&action=logout"><img src="{imagesfolder}/top_logout.gif" alt="Logout" border="0"></a> Code:
$vlogout this is the first time i ever modded something that has to do with php so go easy on me! in a n00b! |
To make this compatible with VBPortal 3, add the code in the instructions into vbp_includes.php, right under:
[QUOTE] include("../config.php"); global $nukepath,$bbuserinfo,$nukeurl,$foot1,$foot2,$foot 3,$foot4; global $Allow_Forum_Leftcolumn, $Forum_Default_Leftcolumn,$newsforum,$pollsforum; chdir($nukepath . "/"); |
quick, easy and definately a nice touch!
Thanks |
I am using this hack and love it.
However, I want to add a new style to the board and change the 'register' and 'profile' buttons in a new style (other than default). I can't get the replacements to work, I keep getting the default buttons in the new style. If I edit the top 'php parsed code' in the new style settings, it changes my default. Is there a way I can change this and still use the hack? |
The Image folder path is a variable that can be changed with each style. Create a new folder for each new set of buttons, and alter the variable ( Admin CP > Styles > at the bottom ). Make sure you keep all the image filenames exactly the same as the original files.
This should work, but someone else could probably give you a better solution. |
For me it works fine in the vB THANK you!
But in the Portal (I use vBPortal 3.0 beta 8) the buttons are just gone! I added the code in the vbp_includes.php but nothing happended! Any suggestions? Greetings StarBuG |
The hack works for vBPortal 3 on the Forum home page, but not for the vBPortal Main Home page (following the vBPortal instructions above). Which is a big hassle. I'll see if there's a way around it.
|
can this be modified to put the buttons in this order for a logged out user
calender - members - faq - search - home - register and for a logged in user user cp - calender - members - faq - search - home - logout and for admin or mod admin/mod cp - user cp - calender - members - faq - search - home - logout if someone can send me the instructions to do this that i list above, please let me know. regards Liam |
if ($thread[open]) {
$replyclose="images/comments.gif"; } else { $replyclose="{closedthreadimage }"; but it does not work. I wanted to replace the Post Reply image in one template with another one without loosing the "closed" option |
can anyone answer my question ?
|
All times are GMT. The time now is 02:45 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|