XF 2.0 Is there a way to pull any site-wide content in specific bbcode tags into a single page?

RobParker

Well-known member
Before trying to find someone to do this, I just wanted to ask if it's even possible?

Say we have a custom bbcode of [ news ] that can be used anywhere on our forums. Is there a way to pull all of the [ news ] content onto a single page that summarises all of the instances where it's used?

I don't know how bbcodes work, if the content inside them exists as some kind of object with it's own references or is it just text that's parsed when the post is displayed?
 
Hi

Yes, it's text.

In XF1, there was a cache table with some sort of tree format, but it was removed in XF2 (and there was no guarantee in the first place that your post is there etc.etc.)

With some own parsing when creating or editing posts, and a custom table to save the gained information, it shouldn't be a big problem to do this. However, depending on your use case, correctly parsing BB codes can get tricky (no, regexp are bad. very bad. And even XF itself doesn't do the full course, not even close). Eg. whats about [yourtag][b][yourtag][i]text[/i][/yourtag][/b][/yourtag] or [yourtag][b]text[/yourtag][/b] or just [yourtag] without anything closing?
Then, where spaces are ok and where not, quotation mark formats and escapes for parameters, recognizing with what nested structures XF has problems with, and so on...
 
Top Bottom