![]() |
Smilie and VBB code parsing
1 Attachment(s)
Can anyone give me a hand on how to parse smilies and VB code? What Im doing is calling a post right from the sql and outputting it elsewhere.
I am building a columns system for my site, and this is the way it works. The columnist posts a column in his or her own forum. In that forum everyone can reply to the post (but only that person can post). The persons column is then avalable without all the frills (tables and replys) on a sperate page. So I made up this php script to do it. (See Attached) It works well and all, I still have to refine it a bit. I was able to figure out how to turn the page break ($crlf, \n etc :p) to a <p> ( $pagetext=str_replace("\n", "<p>", $row['pagetext']); ). But looking at the code everything looks so cryptic :/ Take a look at the attached file, see if you can give me a hand ^^ Oh yea, Im a sloppy coder, lol. So, dont blame me if you burn your eyes out looking at the code XD (btw, Im not sure if this is the right spot or not. This isnt about an exisiting hack and it isnt a hack I'll be releasing. So if its in the wrong spot just let me know ^_^) |
Just use vBulletin's bbcodeparse2() function. :) It will parse everything.
|
Thankies again FireFly ^_^.
Ever thought of making a FAQ in your spare time to keep idiots like me from spamming your forum? lol <^_^;; |
Warning: Missing argument 2 for bbcodeparse2() in /home/p0r1ng/public_html/forums/admin/functions.php on line 661
Warning: Missing argument 3 for bbcodeparse2() in /home/p0r1ng/public_html/forums/admin/functions.php on line 661 Warning: Missing argument 4 for bbcodeparse2() in /home/p0r1ng/public_html/forums/admin/functions.php on line 661 Warning: Missing argument 5 for bbcodeparse2() in /home/p0r1ng/public_html/forums/admin/functions.php on line 661 uh oh O.o Firefly, could you give me a quick howto on how to use functions like that? Im not quite sure, so what I ended up doing was $pagetext=bbcodeparse2($row['pagetext']); But the code for the bbcodeparse2 is function bbcodeparse2($bbcode,$dohtml,$dobbimagecode,$dosmi lies,$dobbcode) hmm. Do I even have to do the $pagetext= part? >.< Actually, looking at it, it looks like I have to do PHP Code:
|
Code:
$pagetext = bbcodeparse2($row['pagetext'], 0, 1, 1, 1); |
lol, you beat me to it. Thanks again again, hehe
|
All times are GMT. The time now is 02:33 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:
|