The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Using {var} in php files
I need the $section1 have the value of {vb:raw entry.field97}. What I am going it showing the cms articles of a particular section in a vbdynamics page. The current code show section 1 but I need to be able to change the section for each entry which is defined in {vb:raw entry.field97}.
PHP Code:
|
#2
|
|||
|
|||
The exact meaning of {vb:raw entry.field97} depends on which template it's from. If I had to guess, I'd say you could try this:
Code:
global $entry; $section1 = $entry['field97']; but it's unlikely that it will work. You need to figure out where that value comes from and if it's available on your vbdynamics page (I don't know anything about vbdynamics). It's possible that the value you need hasn't even been set when your vbdynamics code runs, in which case you'd need to figure out how to get it yourself. |
#3
|
|||
|
|||
It works on my vbdynamics page but not on my php file that I am including in the page via the plugin system.
--------------- Added [DATE]1368999728[/DATE] at [TIME]1368999728[/TIME] --------------- This is what I got when I tried it. My guess is the plugin doesnt have access to vbdynamics but I'm not sure. Quote:
|
#4
|
|||
|
|||
Anyone else?
|
#5
|
|||
|
|||
Quote:
|
#6
|
|||
|
|||
Quote:
--------------- Added [DATE]1369119570[/DATE] at [TIME]1369119570[/TIME] --------------- In my template I would use {vb:raw entry.field97} to display that field. This doesnt work in my php file, just the template where everything is displayed. --------------- Added [DATE]1369122257[/DATE] at [TIME]1369122257[/TIME] --------------- Ok so when I just use the php in the plugin it works but puts it at the top of my page. When I put the php in a separate file then it doesnt work. Currently It is display what I want but at the very top of the page inside of the div. I guess that is because it is just firing it on page load instead of when it reaches the spot in the html --------------- Added [DATE]1369122826[/DATE] at [TIME]1369122826[/TIME] --------------- This worked, once I add in category I am done. kh99 thank you. PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|