The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I am trying to get a piece of code to work that would usually sit in a php file. I want it in a section of a template. This function (is supposed to) return the string that is appended to the url for the chatbox. This string will autolog the user on with their user name from the forum.
For some reason unknown to my limited experience, the function does not work - I had it located in the index.php file. Here is the Function part.: PHP Code:
I think the function is in the wrong location to work or the scope is not right or ?? Can I move or recode this into only the template so that I dont have to worry about those details? Could someone suggest a recode of the template part to include what is function. If I get this working, I would like to post the outcome as a new ChatBox solution. Thank you and please "drill" me with any questions. J This is the actual code for the footer HTML Code:
<!-- Begin CHAT - http://www.shoutmix.com --> <iframe title="chatname" src="http://www2.shoutmix.com/?chatname$shoutmix" width="160" height="400" frameborder="0" scrolling="auto"> <a href="http://www2.shoutmix.com/?chatname$shoutmix">View shoutbox</a> </iframe> <!-- End CHAT --> NOTE: This is for a chatbox that will be in the side column of forum with the modification in the footer template(using the side column mod). |
#2
|
||||
|
||||
![]()
Plugin @ global_start:
PHP Code:
|
#3
|
|||
|
|||
![]()
That works! Thank you so much.
Now, when a user logs out, how can I clear that variable so that the Chat box does not stay logged on. |
#4
|
||||
|
||||
![]()
I don't know how your chat box works - so I cannot comment.
|
#5
|
|||
|
|||
![]()
I appreciate your help.
If I can clear the variable $shoutmix by setting it to $shoutmix="" that would log off during the next screen refresh. What hook is right after the vbulletin logoff steps? Or where can I find that info. Thanks |
#6
|
||||
|
||||
![]()
You could have found that info quite easily in login.php. The hook is logout_process. You will need to bring the variable into scope first by doing "global $shoutmix".
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|