Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
Prev Previous Post   Next Post Next
  #1  
Old 01-01-2005, 11:04 PM
TheWolverine TheWolverine is offline
 
Join Date: Mar 2003
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Displaying Posts Stored In Database

Hi all,

I'm currently writing a front-end website to accompany my forums and I've hit a metaphorical brick wall. The problem is that posts that are created using vBulletin when stored in the db don't contain the html formatting tags, in particular for paragraphing. I've searched through the source files to see how vBulletin goes about reading these posts from the db and converting them correctly with all the paragraphs intact but I can't for the life of me figure out how it's done. Basically instead of there being <p> or <br /> tags stored along with the posts in the db there are simply lines in between the text. I don't know how to parse this though into paragraphs when I display the posts on the website though in HTML. Here's an example article of how it's stored in the db in case you don't know what I'm on about:

Code:
This is the fifth and final article I am posting right now for testing purposes. What should happen is that all of the 5 articles that have been posted should appear on the website with the alternating colour scheme working as well. I haven't tested the length of an article yet, but I've got to somehow only post a certain number of words of the article so that the layout isn't messed up.
 
This is the fifth and final article I am posting right now for testing purposes. What should happen is that all of the 5 articles that have been posted should appear on the website with the alternating colour scheme working as well. I haven't tested the length of an article yet, but I've got to somehow only post a certain number of words of the article so that the layout isn't messed up.
This is exactly how it is stored in my database now. My problem is parsing the test as two separate paragraphs. When I retreive the data from the db it grabs it as continuous text and I don't know what the delimitation is between the two paragraphs that I could use to split them up. I hope that's clear enough. Bit difficult to explain. The only way it's working now is if the article is for instance entered originally with the HTML formatting included i.e.

Code:
This is the fifth and final article I am posting right now for testing purposes. What should happen is that all of the 5 articles that have been posted should appear on the website with the alternating colour scheme working as well. I haven't tested the length of an article yet, but I've got to somehow only post a certain number of words of the article so that the layout isn't messed up.
<br /><br /> 
This is the fifth and final article I am posting right now for testing purposes. What should happen is that all of the 5 articles that have been posted should appear on the website with the alternating colour scheme working as well. I haven't tested the length of an article yet, but I've got to somehow only post a certain number of words of the article so that the layout isn't messed up.
Since this formatting is done by vBulletin when the user enters the post in the editor I don't know what to take as the reference point to differentiate between the different paragraphs.

Anyhow assistance would be helpful. I'm still fairly new to vB so go easy on me

Thanks in advance

The Wolverine
Reply With Quote
 

Thread Tools
Display Modes

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 04:49 AM.


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.03418 seconds
  • Memory Usage 2,340KB
  • Queries Executed 12 (?)
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
  • (2)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)showthread_list
  • (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_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • 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_threaded
  • showthread_threaded_construct_link
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete