The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
I am using the default VBulletin 4, without any template changes.
I tried putting the word "hello" in the template, with no results - that's what caused me to start this thread in the first place... Have you been able to successfully create and use a template in threadbit, or just via preprocess? |
#12
|
|||
|
|||
I'd suggest trying a different hook like the parse_templates hook and see if that makes any difference. I had problems when I was trying to pre-register a custom template in the global hook. Changed it to the parse_templates hook after reading a comment and it fixed my problem. Can't hurt trying it anyway lol.
|
#13
|
|||
|
|||
I thought the problem with using hook parse_templates is the template will be loaded for every page load, even though it is only required for threadbit?
Either way, the problem has been narrowed down to registering the variables within the template - obviously creating the template is working, as it is appearing in the debug information, but registering it is not. Will try to move the register to another hook, and report back on what happens --------------- Added [DATE]1262373019[/DATE] at [TIME]1262373019[/TIME] --------------- Ok, I can't move the template to parse_templates, as it needs access to a function which isn't loaded by that hook. |
#14
|
||||
|
||||
Can we see the exact code you are currently using for the plugin (which location?) and the templates.
|
#15
|
|||
|
|||
I tried this, no go. Very strange that the template can't render, even though VBulletin is recognizing that it was created!
|
#16
|
|||
|
|||
Hmm. I just did a quick test and it worked fine for me. I created a blank template called custom_template and I put "Testing123" into it. I then created a plugin with the code that Lynne originally suggested and finally added {vb:raw custom_template} to the threadbit Template. That worked fine for me and I ended up with loads of Testing123's appearing above the list of threads (because of the floated divs I presume).
|
#17
|
|||
|
|||
Here's the exact code i'm using - hook location is threadbit_display
PHP Code:
|
#18
|
||||
|
||||
What does your template threadworks look like?
|
#19
|
|||
|
|||
That is still working for me Tamtams. I copied that code directly into a new plugin that I created especially to test this. I then created a custom template called threadworks and then added {vb:raw threadworks} to the threadbit template.
Are you definitely adding the above variable (vb:raw thing) into the correct template i.e. threadbit. If you're trying to use it in one of the other templates then that'll be why. You need to pre-register it exactly for the template you're trying to use it in. Granted my threadworks template that I created just has Testing123 in there but its working as I'd expect. Remember this will be showing in the thread listing (inside a forum) and not inside the thread itself (I doubt you're making that mistake but just mentioning the obvious lol). As far as I can see either you're doing something different to the above or something is seriously going crazy on your forums lol. Especially if you're trying just a test message in your template. If the test message works then that'll obviously point to the template itself causing the issue but if not then I don't know what else to suggest. EDIT: You haven't been trying to use {vb:raw custom_template} with the above plugin code have you? If so then that'd be wrong lol. The pugin code above registers the $custom_template variable for use inside the threadworks template and the threadworks variable for use inside the threadbit template. So {vb:raw custom_template} with your plugin code will only show it's contents at the moment inside the threadworks template of yours. |
#20
|
|||
|
|||
Quote:
Thanks! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|