The Arcive of vBulletin Modifications Site. |
|
vbcode Details »»
|
|||||||||||||||||||||||||
what would I need to do to make text going into a database vbcode??
i.e. i want my interactive story to have full vbcode support, so what do I need to run in order for all the nessacery checking, url converting, etc... to be preformed b4 it goes into the database. I need the same for when it's pulled from the database and displayed. Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
You want to look at the bbcodeparse() function in fuctions.php this will allow you to use vBcode on your pages.
|
|
#3
|
||||
|
||||
|
thank you, i'll look into it
|
|
#4
|
||||
|
||||
|
<font size="4">AAAAAAARRRRRRRRRRGGGGGGGGHHHHHHHHH!!!!!!</font>
This bbcode thing is giving me a major headache, I can't work out what i need to do to text before adding it to the database, or what I need to do once I've pulled it out of the databse. Can anyone maybe save me from this major headache and give me the code that would be needed? cheers. :bunny: <-- look, a cute bunny!!!! |
|
#5
|
||||
|
||||
|
Quote:
$output=bbcodeparse(a,b,c) A: is the text with vBcode to be parsed; B: is the forumid of the post; C: 1 to allow smilies, 0 to disallow (at least thats my understanding of the bbcodeparse() function) |
|
#6
|
||||
|
||||
|
I've just seen on another thread (here: https://vborg.vbsupport.ru/showthrea...ht=bbcodeparse) that when pulling info from the database, and you know how you want it displayed, you can bypass bbcodeparse and skip directly to bbcodeparse2
![]() I think that as long as I use addslashes() when inputting text, and htmlspecialchars() if viewing the text in a text box, then I should be OK. but please, someone correct me if I'm wrong. |
![]() |
|
|