The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Parsing variables in link question
Can someone please tell me how you get the raw variables to parse in the link that is an option in a product? Here is what I have in the template:
HTML Code:
<vb:if condition="$vbulletin->options['boofo_additional_link_1']"> <li><a href="http://{vb:raw vboptions.boofo_additional_link_1}" target="_blank">{vb:raw vboptions.boofo_additional_link_1_title}</a></li> </vb:if> And the link I have set for the boofo_additional_link_1 option: HTML Code:
{vb:raw vboptions.bburl}/search.php?{vb:raw session.sessionurl}do=finduser&userid={vb:raw bbuserinfo.userid}&contenttype=vBForum_Post&showposts=1 The raw variables don't get parsed when viewing the link in the menu. |
#2
|
||||
|
||||
Try using php in the option - $vbulletin->options['bburl'] and $vbulletin->session->vars['sessionurl'] etc.
|
#3
|
||||
|
||||
I tried it like this and they don't get parsed when I add it to the setting:
HTML Code:
$vbulletin->options['bburl']/search.php?$vbulletin->session->vars['sessionurl']do=finduser&userid=$vbulletin->userinfo['userid']&contenttype=vBForum_Post&showposts=1 If I add the raw variable line directly into the template, then it parses fine. Just not through the setting. |
#4
|
||||
|
||||
Try just spitting out {vb:raw vboptions.boofo_additional_link_1} in the template. What do you get then?
|
#5
|
||||
|
||||
{vb:raw vboptions.boofo_additional_link_1} is what I have in the template. The link is in the boofo_additional_link_1 setting line. Or am I missing what you are meaning?
|
#6
|
||||
|
||||
I mean, just spit it out. Not in the <a href..> tag. Just see what it is carrying to the template.
|
#7
|
||||
|
||||
Ok, with the raw variables, this is what I get when I do a print_r in the template:
Code:
print_r (http://www.mysitehere.com/forums/search.php?do=finduser&userid=1&contenttype=vBForum_Post&showposts=1); It parses fine directly in the template. Only when I do it via the setting, it doesn't. I changed my site to mysitehere, for reasons you already know. |
#8
|
||||
|
||||
What I am saying it just put {vb:raw vboptions.boofo_additional_link_1} directly in the template. What exactly do you get then? What is printing out in the template when you do that? And what do you have in the options exactly right now?
|
#9
|
||||
|
||||
I get this when I do that:
Code:
{vb:raw vboptions.bburl}/search.php?{vb:raw session.sessionurl}do=finduser&userid={vb:raw bbuserinfo.userid}&contenttype=vBForum_Post&showposts=1 That is the same exact code I have in the options setting. It does the same thing if I use $vbulletin->options. If I do it like this in the template, then it parses fine. Code:
<li><a href="{vb:raw vboptions.bburl}/search.php?{vb:raw session.sessionurl}do=finduser&userid={vb:raw bbuserinfo.userid}&contenttype=vBForum_Post&showposts=1" target="_blank">{vb:raw vboptions.boofo_additional_link_5_title}</a></li> It just doesn't like going from the setting to the variable in the template for some reason. |
#10
|
||||
|
||||
OK, so you need to do something to actually parse the options setting. Have you tried changing the Data Validate Type for the option? What type is it currently?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|