![]() |
Registering variables via plugin?
For vBulletin 4+
Not sure if this can be done or not, but is it possible to register variables via a plugin? Or maybe there's something I'm missing in my code. This is the code I'm using atm: PHP Code:
|
<a href="https://vborg.vbsupport.ru/showthread.php?t=228078" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=228078</a>
I thought you figured this out a while back.. I swear that browsed it a while back... |
This is something different, but that tutorial is for doing it via php files. I tried adding:
PHP Code:
|
You need to pre-register the variables in the template you need to use them:
Code:
vB_Template::preRegister('navbar', array( Okay, now I'm tired. |
Getting the same results as before with:
PHP Code:
PHP Code:
|
No, as you are not rendering any templates, just settings variable. What are in each of those variables?
Okay, I see what you are doing and it is never gonna fly. You're trying to pass an image in the variables, right? |
Quote:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
Try this:
Code:
$template_hook['navtab_end'] .= ' Maybe images/misc/facebook.png the path relevant to your forums dir. And no / before the raw variable |
That didn't work either lol
|
No need to (pre)register the variables when you are using them right there in the plugin.
HTML Code:
$template_hook['navtab_end'] .= ' <a target="_blank" href="mysite1.com"><img style="margin:-2px 4px 6px 10px" src="'.$fbimg.'" alt="" /></a>'; |
All times are GMT. The time now is 10:12 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:
|