The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I have a standalone system where users enter HTML, and I want to have some conditions in it (such as hide left block if that option is enabled). Basically in the HTML they will have something like this:
HTML Code:
<table align="center" cellpadding="0" cellspacing="0" width="760"> <tr valign="top"> {IFSHOWLEFTBLOCK} <td width="{LEFTBLOCKWIDTH}" class="leftblock"> {LEFTBLOCKS} </td> <td width="{LEFTBLOCKSPACERWIDTH}"><img src="{SPACERIMAGE}" width="{LEFTBLOCKSPACERWIDTH}" alt="" /></td> {/IFSHOWLEFTBLOCK} <td class="content"> {BLOGPOSTBIT} </td> {IFSHOWRIGHTBLOCK} <td width="{RIGHTBLOCKSPACERWIDTH}"><img src="{SPACERIMAGE}" alt="" width="{RIGHTBLOCKSPACERWIDTH}"/></td> <td width="{RIGHTBLOCKWIDTH}" class="rightblock"> {RIGHTBLOCKS} </td> {/IFSHOWRIGHTBLOCK} </tr> </table> I'm thinking eval (but I've never used much of it before), so how would I go about doing this with the IFs? Right now I am using preg replace, so if the condition they enter is false, it replaces the condtiions with <!-- and --> (very cheap solution) and if true, replaces with "". I do not want this like vBulletins, where it runs any PHP they enter in the conditions, only presets. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|