The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
Good catch. Sadly with that fixed it still doesn't work. Ideas?
|
#12
|
||||
|
||||
It is official. I am an idiot. I had a spelling error as well
|
#13
|
|||
|
|||
Which hook are you using? Try using parse_templates if you aren't already.
|
#14
|
|||
|
|||
Quote:
I used the hook global_start. execution order 5. Does the PHP code need to be contained in <?php tags? Here is the code in my php file in case it matters. PHP Code:
|
#15
|
|||
|
|||
You don't need the <?php in plugin code.
'parse_templates' is a different hook location, but 'global_start' will work so you're OK. I think you had another typo in the code you posted above (there's an extra space in 'includedphp ', which I now see is a typo in the "Rendering Templates..." article). Try this: PHP Code:
BTW, not to confuse things further, but you could also do something like this in the plugin: PHP Code:
and {vb:raw num_chatting} in the template, and you wouldn't need the external file. |
#16
|
|||
|
|||
kh99 thanks a ton for your help. I decided to go with your last option and have the plugin execute the php.
I have a couple more questions though. 1.) What hook do I need to use so that this will display on the front page. It works on the forum, but not on the CMS. 2.) I would like to list who is online on the forum home. In that ajax_chat_online table each online user is stored in a row. I would like to display the column userName for all entries separated by a comma. Any thoughts? Again, thank you very much for all your help so far! |
#17
|
|||
|
|||
Quote:
Quote:
PHP Code:
Obviously, if you're using the same plugin as you are for the count you could combine both so you're not doing two queries. |
#18
|
|||
|
|||
Thanks! You had a typo but I caught it. Thanks for all of your help!!
--------------- Added [DATE]1314893620[/DATE] at [TIME]1314893620[/TIME] --------------- Man you have no idea how helpful you have been. With your help I have put together the following Mod Thread https://vborg.vbsupport.ru/showthread.php?p=2240829 to help everyone else who is in the same boat as me. --------------- Added [DATE]1314962655[/DATE] at [TIME]1314962655[/TIME] --------------- Well I have found one hiccup. With the second plugin. The one that displays the userNames. If no one is in the chat and the code returns a NULL result then it breaks the site. Gives me a cookie in header already sent error. Thoughts?? |
#19
|
|||
|
|||
Bump
|
#20
|
|||
|
|||
Sorry, I always seem to miss when posts get auto-merged.
Anyway, yeah, didn't think of that. You want something like this: PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|