The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Using {vb:raw} in templates conditionals?
I'm aware you can't use those in template conditionals, but i dont have a single clue on how to do what i want to do w/o doing that.
Right now i'm working on a mod where moderators are able to flag an user post for hidding, and it is supposed to work just like a ignore but for that post only. Right now i'm reading the postids from the flaged posts, from a table and preregistering it in a template. i wanted to do something like <vb:if conditional:"in_array("{vb:raw post.postid}", {vb:raw postidarray}")>, but as you guys know, i can't use vb:raw in conditionals for some reason Is there some sort of workarroud? |
#2
|
||||
|
||||
{vb:raw post.postid} => $post['postid']
{vb:raw postidarray} => $postidarray So, your code should look like this: Code:
<vb:if condition="in_array($post['postid'], $postidarray)>Blhahahah</vb:if> |
#3
|
|||
|
|||
Thanks for the help!.
I'm still getting a "Parse error: syntax error, unexpected '{' " error tho |
#4
|
|||
|
|||
mokujin forgot a closing ".
PHP Code:
|
#5
|
|||
|
|||
i get this: The following error occurred when attempting to evaluate this template:
%1$s But it still works when i go thru, so thanks you both ! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|