Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Adding new tags, and parsing each line within the tags.
I want two new tags for this plugin. One is [card]word[/card] that will handle individual words, and that much I have working fine.
I then want:
[cards]
One
Two
Three
Four
[/cards]
And that'll essentially do what [card] does, but for each line between the tags. I'm not the savviest programmer, but could probably figure it out with enough time.
Any suggestions? I wish their was an existing method in the plugin to do that. You'd think the [list] would work with one, instead of having to [*] each entry. Anyways, thanks for any possible help!
I then want:
[cards]
One
Two
Three
Four
[/cards]
And that'll essentially do what [card] does, but for each line between the tags. I'm not the savviest programmer, but could probably figure it out with enough time.
Any suggestions? I wish their was an existing method in the plugin to do that. You'd think the [list] would work with one, instead of having to [*] each entry. Anyways, thanks for any possible help!
0
Best Answer
-
Todd Vanilla StaffNBBC allows you to make completely custom tags and we fire an event to allow you to customize it. Here's some code to get you started.
public function NBBCPlugin_AfterNBBCSetup_Handler($Sender, $Args) {
$BBCode = $Args['BBCode'];
$BBCode->AddRule('cards', array(...)); // Look at the quote tag in the nbbc plugin for hints.
}0
Answers
I got it man, awesome. I just copied the QuoteTo function and removed the crap I didn't need, and within it exploded $content on \n and went from there. Very cool.
Thanks for the tip and man it took me forever to get around to this, heh.
sorry for asking the old topics, but i really interest with this project, i have script to show card tool tips from phpbb and want to use it in vanilla forum, any tips on how to do that? thx
Look at MathjaxCDN, PremHide, and Spoilers plugins for tips.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
thank you for your reply, will try for it
Hi, want to ask again, how to apply it on commentary? The code only execute on New Discussion only ..