The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I have a variable called $pagetext that contains this information:
Code:
<if condition="is_member_of($bbuserinfo, 9)">Member of Group</if>More words ... Code:
eval('$html .= "' . fetch_template('pagetext') . '";'); Code:
eval('print_output("' . fetch_template('shell') . '");'); Any ideas on how to do this? ************************************************** *** Okay, here's a nasty solution I found. First, let me explain the situation better. I have a custom table in the forums db that holds text to be output on a custom webpage. I process that page through vbulletin to use vb's styles, permissions, etc. In my example above, the variable $pagedata, holds the content for the page. It also contains vb conditionals. If I just evaluate the variable in a template, the template was simply ignoring the conditionals. So .... here is my ugly solution. When the information for that page is updated in my custom table, I create a template for that page. PHP Code:
PHP Code:
PHP Code:
PHP Code:
![]() |
#2
|
||||
|
||||
![]()
Well, first off, you didnt define what the member is of in the conditional.. it should be this:
Code:
<if condition="is_member_of($bbuserinfo[usergroupid], 9)">Member of Group</if>More words ... |
#3
|
||||
|
||||
![]() Quote:
Edit - if you check out the bottom of this page (http://www.vbulletin.com/docs/html/m...n_conditionals) that is the correct usage to search both the primary and secondary groups. :surprised: |
#4
|
||||
|
||||
![]()
hmm...weird..because mine worked and yours didnt for me on both my 3.5.0 and a private 3.0.10
|
#5
|
||||
|
||||
![]() Quote:
To restate the question: I'm pulling text from a database table. The text contains template conditional code. All of the text is placed in a variable. That variable is then called in a template. When the template is evaluated, the conditional is being ignored. Any ideas on how to make the conditional work in this situation? |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|