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

Reply
 
Thread Tools
How can I parse this easily? (vb 2.3) Details »»
How can I parse this easily? (vb 2.3)
Version: , by SpeedStreet SpeedStreet is offline
Developer Last Online: Feb 2011 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 12-04-2003 Last Update: Never Installs: 0
 
No support by the author.

I have this code:

PHP Code:
 echo $row_rsNewsForum['pagetext']; 


As you can tell, its my pagetext. This appears on a non-vb page.



What is the best way for this echo to adhere to vB codes, smilies, etc?



Is there a function I should include from elsewhere?



I'm already including global.php in this code, so any help additionally would be greatly appreciated and shared.



Thanks in advance!

Show Your Support

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

Comments
  #2  
Old 12-04-2003, 03:40 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I believe you need to look into the bbcodeparse and bbcodeparse2 functions
Reply With Quote
  #3  
Old 12-04-2003, 04:01 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Using the bbcodeparse2 function directly works fine.
Reply With Quote
  #4  
Old 12-04-2003, 04:01 PM
SpeedStreet SpeedStreet is offline
 
Join Date: Aug 2002
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mist
I believe you need to look into the bbcodeparse and bbcodeparse2 functions
Ok, I've located the functions (in functions.php) and written the include into my page.

Now, how would I edit the echo to parse it?

Thanks Mist, you seem to answer everyones' issues in this section!
Reply With Quote
  #5  
Old 12-04-2003, 04:07 PM
SpeedStreet SpeedStreet is offline
 
Join Date: Aug 2002
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lesane
Using the bbcodeparse2 function directly works fine.
Focusing now on bbcodeparse2...
Reply With Quote
  #6  
Old 12-04-2003, 04:38 PM
SpeedStreet SpeedStreet is offline
 
Join Date: Aug 2002
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've altered my code as such;

PHP Code:
bbcodeparse2 ($row_rsNewsForum['pagetext']); 
Along with trying a number of other different options...nothing is working.

Can anyone throw me a bone so that I can work this out? I think we should post this as a hack as well, since there seem to be alot of people who have requested this, but nobody ever finishes it up.
Reply With Quote
  #7  
Old 12-04-2003, 04:40 PM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
$row_rsNewsForum['pagetext'] = bbcodeparse2($row_rsNewsForum['pagetext'],0,1,1,1); 

The numbers after the variable is, allowhtml,allowsmilies,allowimages and allowbbcode
Reply With Quote
  #8  
Old 12-04-2003, 06:42 PM
SpeedStreet SpeedStreet is offline
 
Join Date: Aug 2002
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by assassingod
PHP Code:
$row_rsNewsForum['pagetext'] = bbcodeparse2($row_rsNewsForum['pagetext'],0,1,1,1); 

The numbers after the variable is, allowhtml,allowsmilies,allowimages and allowbbcode
YOU ROCK.

Now, I got bbcode parsing (I had to add an echo to the beginning, but that is neither here nor there).

The only problem I am having now, is that my htmlcode within posts is not registering now...is there a way to fix this issue, or am I going to have make due with just vbcode only?
Reply With Quote
  #9  
Old 12-04-2003, 06:46 PM
SpeedStreet SpeedStreet is offline
 
Join Date: Aug 2002
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is what my HTML is outputting as:

PHP Code:
<H3 class=title>A Letter&lt
My code outputting this is:

PHP Code:
<?php 
        
                    
echo $row_rsNewsForum['pagetext'] = bbcodeparse($row_rsNewsForum['pagetext'],0,1,1,1);
                   
?>
Reply With Quote
  #10  
Old 12-04-2003, 08:49 PM
SpeedStreet SpeedStreet is offline
 
Join Date: Aug 2002
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SpeedStreet
Here is what my HTML is outputting as:

PHP Code:
&lt;H3 class=title&gt;A Letter&lt
My code outputting this is:

PHP Code:
<?php 
        
                    
echo $row_rsNewsForum['pagetext'] = bbcodeparse($row_rsNewsForum['pagetext'],0,1,1,1);
                   
?>
I'm digging through showthread, but I can't find how they parse both vbcode and htmlcode at the same time...

grr.
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 01:44 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05893 seconds
  • Memory Usage 2,309KB
  • Queries Executed 23 (?)
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
  • (8)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete