938 Posts in 271 Topics by 291 members
Forum Module
SilverStripe Forums » Forum Module » Short Codes (or Extending BBCode) in the Forum Module
Discuss the Forum Module.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 501 Views |
-
Short Codes (or Extending BBCode) in the Forum Module

20 October 2011 at 4:44am
We added some custom short codes to the "core" site code to allow various media embedding. We are now installing the Forum Module. The customer's two biggest requirements are:
- BBCode or similar, not full HTML, for security reasons
- Authors must be able to embed the same kinds of media as the core site.Is this possible out of the box? Do I understand correctly that the BBCode components are totally separate from the SS ShortCode capabilities? If that is the case, is there a way to *add* a custom BBCode similar to how I added the SS shortcodes? (I don't mind hacking into the bbcode php, if that is possible.)
Thanks!
-John
-
Re: Short Codes (or Extending BBCode) in the Forum Module

20 October 2011 at 4:55am
Hi John,
I can't comment too much on the forum module, however regarding bbcode. out of the box silverstripe itself supprots basic bbcode. Just replace $Content this in your template with...
$Content.Parse(BBCodeParser)
have a look at "sapphire\parsers\BBCodeParser.php" for the available tags
-
Re: Short Codes (or Extending BBCode) in the Forum Module

20 October 2011 at 5:56am
Thanks swaiba, I actually need to go in the other direction (get SS shortcodes working inside blog/forum) but you've just pointed me in the right direction for hooking into the bbcode parser.
I think my short term fix is going to be simply adding the 2 or 3 custom codes there to try to function the same way as over on the main site. But I'm also wondering if I could make BBCodeParser.php look at the SS shortcode collection in real time, and include them, such that *any* custom shortcode also works in Blog/Forum. If that works out, maybe you folks would find it useful in the core? I'll let you know how it goes.
-
Re: Short Codes (or Extending BBCode) in the Forum Module

10 January 2013 at 9:56am
Hi johnmblack, have you managed to implement short codes in forums? I'd like to do exactly the same.
Regards,
wojt -
Re: Short Codes (or Extending BBCode) in the Forum Module

10 January 2013 at 10:49am
I'm actually not on that project anymore since last year; but I think the rest of the team worked something else out. I'll reach out to the current developers to see if they ever solved this, and if so, how.
-John
| 501 Views | ||
|
Page:
1
|
Go to Top |



