The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
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:
|
#2
|
||||
|
||||
![]()
<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... |
#3
|
||||
|
||||
![]()
This is something different, but that tutorial is for doing it via php files. I tried adding:
PHP Code:
|
#4
|
||||
|
||||
![]()
You need to pre-register the variables in the template you need to use them:
Code:
vB_Template::preRegister('navbar', array( 'fbimg' => $fbimg, 'twitterimg' => $twitterimg, 'rssimg' => $rssimg, 'skypeimg' => $skypeimg, 'ytimg' => $ytimg, )); Okay, now I'm tired. |
#5
|
||||
|
||||
![]()
Getting the same results as before with:
PHP Code:
PHP Code:
|
#6
|
||||
|
||||
![]()
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? |
#7
|
||||
|
||||
![]() Quote:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
#8
|
||||
|
||||
![]()
Try this:
Code:
$template_hook['navtab_end'] .= ' <a target="_blank" href="mysite1.com"><img style="margin:-2px 4px 6px 10px" src="{vb:raw fbimg}" alt="" /></a> <a target="_blank" href="mysite2.com"><img style="margin:-2px 4px 0 0" src="{vb:raw twitterimg}" alt="" /></a> <a target="_blank" href="mysite3.com"><img style="margin:-2px 4px 9px 0" src="{vb:raw rssimg}" alt="" /></a> <a target="_blank" href="mysite4.com"><img style="margin:-2px 4px 0 0" src="{vb:raw skypeimg}" alt="" /></a> <a target="_blank" href="mysite5.com"><img style="margin:-2px 4px 4px 0" src="{vb:raw ytimg}" alt="" /></a>' Maybe images/misc/facebook.png the path relevant to your forums dir. And no / before the raw variable |
#9
|
||||
|
||||
![]()
That didn't work either lol
|
#10
|
||||
|
||||
![]()
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>'; |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|