MyBB Community Forums

Full Version: [Request] Remove Inverted Commas from BBcode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm sorry but you have lost me with the editor.
(2013-08-15, 10:16 PM)imagey Wrote: [ -> ]Ok i've got it to become click-able, but its loading a page on my forum instead of taking me to the website.

Regular expression: \[url="(.*?)\"](.*?)\[/url\]

Replacement: <a href="\1">\2</a>

If i do a link like
[url="www.google.com"]google[/url]

It takes me to http://myforum.com/www.google.com instead of taking me directly to google.com

The syntax for MyCode replacements is $1, $2, $3, etc, not \1, \2, \3. So, try this:

Regular expression: \[url="(.*?)\"](.*?)\[/url\]

Replacement: <a href="$1">$2</a>
That gave me the same results as with the one I used above.

http://mysite.com/www.google.com
(2013-08-15, 10:16 PM)imagey Wrote: [ -> ]Ok i've got it to become click-able, but its loading a page on my forum instead of taking me to the website.

Regular expression: \[url="(.*?)\"](.*?)\[/url\]

Replacement: <a href="\1">\2</a>

If i do a link like
[url="www.google.com"]google[/url]

It takes me to http://myforum.com/www.google.com instead of taking me directly to google.com

Since you did not provide a protocol in the URL, it gets resolved relative to the current page. You should almost always use an absolute URL.

www.google.com => http://myforum.com/www.google.com
http://www.google.com => http://www.google.com
Pages: 1 2