Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Smilie and VBB code parsing Details »»
Smilie and VBB code parsing
Version: , by Takara Takara is offline
Developer Last Online: Oct 2009 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 06-05-2002 Last Update: Never Installs: 0
 
No support by the author.

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 ) 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 ^_^)

Download Now

File Type: (21.3 KB, 7 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 06-05-2002, 07:33 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just use vBulletin's bbcodeparse2() function. It will parse everything.
Reply With Quote
  #3  
Old 06-05-2002, 07:48 AM
Takara's Avatar
Takara Takara is offline
 
Join Date: Apr 2002
Location: :bunny:
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thankies again FireFly ^_^.

Ever thought of making a FAQ in your spare time to keep idiots like me from spamming your forum? lol <^_^;;
Reply With Quote
  #4  
Old 06-05-2002, 07:53 AM
Takara's Avatar
Takara Takara is offline
 
Join Date: Apr 2002
Location: :bunny:
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
bbcodeparse2($row['pagetext'],0,1,1,1); 
But I would still know how to call it right ^_^
Reply With Quote
  #5  
Old 06-05-2002, 08:01 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
$pagetext = bbcodeparse2($row['pagetext'], 0, 1, 1, 1);
Reply With Quote
  #6  
Old 06-05-2002, 08:02 AM
Takara's Avatar
Takara Takara is offline
 
Join Date: Apr 2002
Location: :bunny:
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lol, you beat me to it. Thanks again again, hehe
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:00 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05018 seconds
  • Memory Usage 2,267KB
  • Queries Executed 20 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (1)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete