![]() |
Easy Question concerning $logincode
I'm sure this ground has been covered somewhere but I can't find it. Is there a hack that makes the $logincode and $logoutcode (or any other for that matter) available in the header template. Any help with this would be much appreciated. Thanks.
JakeC |
You would need to add the PHP code that you want above the line in global.php that eval's the header template.
|
Add this to the bottom of your "phpinclude" template.
PHP Code:
|
First off, thanks for the replies. I have just installed the advanced dynamic templates hack by logician and I want to use the conditionals in order to decide when the logincode is displayed in the header and when its not. Someone told me that what I need to do is parse the $logincode (whatever that means, I don't know). Is there a hack already out that does this or can someone tell me how to do this? I just need the Header Template to recognize the $logincode and $logoutcode and I'll use the conditionals to do the rest. Is my thinking flawed? Please let me know. Thanks.
JakeC Erwin, Is this what the code you posted does? I'm not a programer but it didn't seem like it. Let me know. |
You can only parse php code to be used in the header or footer in the phpinclude template, or the root/global.php file...
Satan |
Quote:
|
Great!! Really appreciate the help. Thanks.
JakeC |
Quote:
If you want the "conditional way" of advanced templates, it's similiar to that solution: You can use: [[($bbuserinfo[userid]>0)]] Your header template if the user is logged in [[/($bbuserinfo[userid]>0)]] [[($bbuserinfo[userid]==0)]] Your header template if the user is NOT logged in [[/($bbuserinfo[userid]==0)]] format in any template you like (including header) |
Quote:
Also, remember to add forumhome_welcometext, forumhome_logoutcode, forumhome_newposts, forumhome_logincode to the end of this line in global.php in your forum folder if you want to add that code above to the phpinclude template. PHP Code:
|
Well, Thank you very much. I appreciate you letting me know. I just installed the extra snipit and everything seems ok. I've added the $logincode to the header and everything is working out. I think I really need to learn PHP so I can understand all of these hacks :paranoid: . Thanks.
JakeC |
Quote:
The reason I was trying to add this code was because I added a $logincode to the Quick Reply hack. But when inserting a user name and password and you click reply you are not logged in. So, I'm trying to fix it. Is it the same solution? |
What error do you get?
|
Appparently you can't login and post a new message with the QRB if guests are not allowed to post. He added the QRB code to show it for all users, not just logged in.
|
sorry, i posted this in the wrong thread.
|
Quote:
But it didn't help me in my situation. I wanted to add the $logincode to the Quick Reply hack, which should allow a registered user to fill in his User Name & Password, and click on "Post Reply". But currently it's not working, I'm getting the standard "You're not logged in" Vbulletin message. How can I program that when someone clicks on "Post Reply" and has entered his User Name & Passwod in the fields above, it should automatically log him in too? |
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:
|