The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
[SOLVED] vbulletin doesn't like ternary operators?
for simplistic code sake I'm trying to use ternary operators in my products.
Here's what im trying to simplify: Code:
if ($vbulletin->options['drc_embed_vine_smpl']) { $drc_embed_vine = '<iframe src="https://vine.co/v/$2/embed/simple" width="480" height="480" frameborder="0"></iframe>'; } else { $drc_embed_vine = '<iframe src="https://vine.co/v/$2/embed/postcard" width="480" height="480" frameborder="0"></iframe>'; } Code:
$drc_embed_vine = '<iframe src="https://vine.co/v/$2/embed/'.(($vbulletin->options['drc_embed_vine_smpl']) ? "simple" : "postcard").'" width="480" height="480" frameborder="0"></iframe>'; Code:
$drc_embed_vine='<iframe src="https://vine.co/v/$2/embed/'.(($vbulletin->options['drc_embed_vine_smpl'])?'simple':'postcard')).' width="480" height="480" frameborder="0">'; Code:
$drc_embed_vine='<iframe src="https://vine.co/v/$2/embed/'.(($vbulletin->options[\'drc_embed_vine_smpl\'])?'simple':'postcard')).' width="480" height="480" frameborder="0">'; although Code:
$drc_embed_vine = '<iframe src="https://vine.co/v/$2/embed/'.(($vbulletin->options['drc_embed_vine_smpl']) ? "simple" : "postcard").'" width="480" height="480" frameborder="0"></iframe>'; btw Code:
$vbulletin->options['drc_embed_vine_smpl'] where am i going wrong =/ |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|