![]() |
if statement in custom bbcode?
I'm trying to add a "fail" button to my forum that will play an mp3 file. I have a swf that will act as the mp3 player for the tune, and would like it to autoplay by default, but allow my users to "opt out" of autoplay.
I've set up a new custom user field for auto-playing of embeded audio, and would like to set up the function so that users can add this tune simply by pressing a button, then depending on who is viewing the page have it autoplay or not. Here's what I've come up with so far: Code:
<vb:if condition="$bbuserinfo['field10'] == 'Yes'"> I'm also looking to use this same functionality to build a Not Safe For Work opt-in where pictures can be flagged as [NSFW] and have them hidden for users who set up their profile accordingly. Thanks in advance! Can anyone lend a hand? |
anyone have any ideas?
--------------- Added [DATE]1266704962[/DATE] at [TIME]1266704962[/TIME] --------------- nevermind, I was able to accomplish this with a custom plugin. Here's my code if anyone is wondering: Hook: showthread_complete php: Code:
if ($vbulletin->userinfo['(Custom profile field number)'] == "No"){ |
I solved the nsfw request by using the spoiler script here (https://vborg.vbsupport.ru/showthread.php?t=203068) and adding it as a plugin
Hook: showthread_complete PHP Code:
|
All times are GMT. The time now is 08:06 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|