Jump to the post that solved this thread.
Not Solved [How To?] Custom BBcode
#1
Not Solved
Mybb custom bbcode editor allows to create bbcodes like this:

[bbcode]sometext[/bbcode]

And then display them as for example:

<div>$1</div> where $1 = sometext

But how to create a bbcode with tite (with two variables) like this:

[bbcode=sometitle]sometext[/bbcode]

So it would look like:

<div>$1 $2</div> where $1 = sometitle $2 =sometext

How to do so?
Reply
#2
Not Solved
In regular expression insert this code:
\[bbcode=([a-zA-Z0-9]+)\](.*?)\[/bbcode\]
and in replace this:
<div>$1 $2</div>
My Projects - Support My Projects

Don't forget to rate posts!
Reply
#3
Not Solved
Unforutnately it is not working.

In "Testing" field I wrote:

[bbcode=testtitle]testtext[/bbcode]

And hitting "Test" shows the same text. It replace nothing (
Reply
#4
Not Solved
Sorry, my mistake.
This is the correct code:
\[bbcode=([a-zA-Z0-9]+)\](.*?)\[/bbcode\]
My Projects - Support My Projects

Don't forget to rate posts!
Reply
#5
Not Solved
Thanks, That is working! By the way, do you know, how to figure out this problem (connected to mybb too): http://community.mybb.com/thread-196678.html
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)