The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Php parsing in templates
Hello, i created my own little stars addon for my forums, a quite simple addon for when i do upgrades, i wont have to re-edit any of my vb files. The problem is not with the php or mysql, it is calling the php in the template. I added the variable '$stars' in the postbit template and it isent comming up. It worked on the earlier versions of vbulletin 2 but now that i try it now, it will not show up on my users posts. Basicly the problem im having is calling a php file in a template. I added the following line in my showthreads.php:
PHP Code:
Thank you for your time. |
#2
|
||||
|
||||
just the template phpinclude will be executed and there phpcode can be used, in no other templates!
|
#3
|
||||
|
||||
I still get nothin, i want to put the stars right under the usertitle in the postbit template, i have the phpcoding in showthreads.php and i added $stars in postbit. Is there anyway i can accually get them to show up? i even tried adding replacements and doing the coding in the phpinclude template
|
#4
|
|||
|
|||
You virtually never can edit bit templates via phpinclude. You almost always have to hack.
|
#5
|
||||
|
||||
this i know, i added my script in showthread.php and i cant figure out how to make the variable $stars come up. I never really had a problem with phpscripting but i cant quite figure this out
|
#6
|
|||
|
|||
Make sure $stars is in a global scope (the scope in which all templates are eval'ed AFAIK).
|
#7
|
||||
|
||||
a global scope? like eval()? and should this be done in showthread.php and do you have an example so i can understand exacly what you mean?
|
#8
|
||||
|
||||
heh, nevermind, guess i will have to figure it out my self...
|
#9
|
||||
|
||||
last time im asking a simple question here, thanks for nothing
|
#10
|
||||
|
||||
by global scope he means right above where the file does it's final dooutput('postbit') for example
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|