Giving out information from the forum database on front page
Hi guys.
A short request , since I cannot think of how to do this.
Basically, I would like someone to make me or lead me to a function which converts a MyBB post message (lets say $body) into HTML format so I can post it on the index page.
What it will need to do is close the important tags, such as [QUOTE], [B] and [COLOR], and make it HTML friendly - so that symbols such as ? are converted to their appropriate HTML code.
RE: Giving out information from the forum database on front page
Hi xDario,
Why not just use the default portal.php page? This will automatically pull the latest threads from your forum.
In addition, if you look at that file you should be able to find the function in that file.
Hope this helps.
EDIT: I reread your post and I might not be understanding what you're asking. Do you want to pull a specific post ID from your forum, and display it on the index page?
RE: Giving out information from the forum database on front page
Well, I need it to show a preview of a thread. I've got the WHOLE text right now, so it is quite annoying (especially with long posts), but I would much prefer it only showing e.g 300 chars.
Now, the peoblem with cutting it off after 300 chars, is that the tags dont close, making it look ugly.
What I need is a piece of php which trims it down to 300 chars, closes and displays the tags that mybb uses.
Bookmarks