MyBB Community Forums

Full Version: Parse BBcode to HTML
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I am very new to customizing MyBB. I am attempting to display post content only on a landing page.

Below is my sample page.

https://forum.escambiabayhomebrewers.org...Events.php

I believe, I am missing a translation script for bbcode, but search has failed me. I would appreciate any help.

Cheers,
Matt
Wait I don't understand, you want to use MyBB built-in parser to parse this page to properly display it on your own custom landing page?

You'll need to add postParser (class_parser.php) to your new custom file (make sure that it is properly using MyBB things). Then just create parser at the top of php file and make array of parse options. Then simply user parse_message method to actually parse your page. I think that everything you need to find is in showthread.php. Based on this file you should be able to add MyBB parser to your custom page.
(2018-08-21, 08:47 PM)MinusPL Wrote: [ -> ]Wait I don't understand, you want to use MyBB built-in parser to parse this page to properly display it on your own custom landing page?

You'll need to add postParser (class_parser.php) to your new custom file (make sure that it is properly using MyBB things). Then just create parser at the top of php file and make array of parse options. Then simply user parse_message method to actually parse your page. I think that everything you need to find is in showthread.php. Based on this file you should be able to add MyBB parser to your custom page.

MinusPL,

Thank you for your response. My club has a home page that links to the forum. I would like to display post content from an events thread to create fresh content on the club home page.

I will take a look at the MyBB parser project and see if I can make it work.

Cheers
Matt
In MyBB you have in inc directory file called class_parser.php - this one you must use. Also to know how to use it look in showthread.php and search for $parser - this is variable used by MyBB to actually use parser. On top of showthread.php file you have how to initialize it, somewhere deeper you'll find hwo to actually use it.