The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Variables plugin
I made an addon for VB4 and everything works fine, now I wanted to convert VB3 and popular option that variables are not interpreted in the same way
Eg. $ok = "OK if true" . $vbulletin->options[bip_ct_padding_botton]." admin"; With this formula in the plugins and reporting $ok in postbit the result is ?OK if true admin Then the variable at the center is not powered, but the value is there because if I enter $vboptions[bip_ct_padding_botton] on postbit the value is displayed. I ask you what I miss? Other eg. Not Working $post[message] .= ?test? thanks PS The addon I would like to convert it Birthday image |
#2
|
||||
|
||||
Perhaps $vbulletin isn't valid there (you didn't mention what hook location)? Find the hook in the code (do a search in the files for it) and then look at the code used around it and see if it's valid or if you need to call it a different way.
|
#3
|
||||
|
||||
maybe I explained evil, the plugin runs from VB3, but not all variables are fed into the plugin,
eg. hook postbit_display_complete $post[message] .= $myvartemp; in vb4 is ok in vb3 does nothing now the problem I cheated by making a manual change to the template postbit but I'd like to understand why the merge between variables does not work thanks |
#4
|
|||
|
|||
My guess is that this is a scope question. Try adding a global for the variables you are using in top of the plugin.
|
#5
|
||||
|
||||
thanks for the answers, today I tried another way written several times in this forum, but this had little effect.
I wish that the template was added postbit a variable automatically just before <!-- / message --> I state that if I enter manually works. in order to get this $ct_birthday <!-- / message --> to do this I read that many use this syntax Code:
$find = "<!-- / message -->"; $replace = $ct_birthday; $vbulletin->templatecache['postbit'] = str_replace($find, $replace . $find, $vbulletin->templatecache['postbit']); the plugin is invoked by postbit_start. To see if my template is not loaded I tried to insert the variable manually in the template and it works fine Another test I made is to assign the value to $ replace "mouse" but not reported Now I do not understand where the error can be seen in many utilizzan syntax similar and I would like to avoid manual editing still Excuse for English but use a translator Edit: Created a new plugin for the exchange of cache, global hook allocated start, now works |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|