The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How would I go about doing this?
Hi, im trying to make an 'Off Topic' BB Code. I got it working (It uses fieldset)
But what I want to do is make it so users can select in their profile whether to display it or not using profile fields. I tried this HTML Code:
<if condition="$post['field9']"><fieldset><legend>Off Topic</legend><table><tr><td> {param} </td></tr> </table></fieldset></if> Field 9 is a single line text box Thanks /blam |
#2
|
||||
|
||||
Forget about a disappearing off topic BBCode unless you want to try to find a way to do it in functions_bbcodeparse.php.
I do have a creative alternative for you: use quote. Maybe make Off Topic be [quote=OffTopic]. Now edit the template bbcode_quote. At the begining, put this: HTML Code:
<if condition="$username != 'OffTopic'">
HTML Code:
<else /><if condition="$post['field9']"><fieldset><legend>Off Topic</legend><table><tr><td> $message </td></tr> </table></fieldset></if></if> Be creative. |
#3
|
|||
|
|||
Thanks alot! But I wuold like it to be [ot], is that possible without editng funcions_bbcodeparse.php?
Thanks again Edit - the codes that you gave me didnt work, nothing displays eevn if the field is blank now |
#4
|
||||
|
||||
Quote:
I know you're going to have to edit functions_bbcodeparse to use [ot], but it probably wouldn't be that bad of an edit. |
#5
|
|||
|
|||
Thanks for your help, but ive decided to leave it how I orignally had it (Showing the code no matter what my users wanted out of it)
|
#6
|
||||
|
||||
Alright, this is not tested at all, so don't blame me if I cause a nuclear explosion to blow up half the world.
In functions_bbcodeparse.php, find this: PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
#7
|
|||
|
|||
>_< Didnt work, sorry for all the trouble Ive caused, appreciate the help though.
(Half the world hasnt been blown up :P) |
#8
|
||||
|
||||
What didn't work about it? And is the old [ot] still there? (It shouldn't be).
What would someone put in field9 anyways? You said it was a single line text field. EDIT: If this ends up working, you might want to add this: PHP Code:
PHP Code:
|
#9
|
||||
|
||||
By the way, it works fine here.
http://14716.info/ot_np_hacks.png If it doesn't work for you, it has to do with your conditional, and I need more info to help you there. EDIT: Changed to a URL, since it stretched all posts on this thread. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|