How make this?(link)
#1
Hello,
I have this html:
<a href="{$link}" title="{$title}" onclick="Modalbox.show(this.href, {title: this.title, overlayClose: false, width: 250,height:150}); return false;" class="button3 orange">{$title}</a>
Now I want to use:
[alink={$link}]{$title}[/alink]
How can I do it?
Also it it possible to add width and height??

Reply
#2
I think you will need to use preg_replace() for existing posts, fo new ones just create the bbcode.
Soporte en Español

[Image: signature.png]

Discord at omar.gonzalez (Omar G.#6117); Telegram at @omarugc;
Reply
#3
\[alink\=(.*?)\](.*?)\[/alink\]

<a href="$1" title="$2" onclick="Modalbox.show(this.href, {title: this.title, overlayClose: false, width: 250,height:150}); return false;" class="button3 orange">$2</a>

i can wrong the first code in PHP tag.... not checked if work


------EDIT--

For width and height i think u can use:

\[alink\=(.*?) style\=(.*?)x(.*?)\](.*?)\[/alink\]

<a href="$1" title="$2" onclick="Modalbox.show(this.href, {title: this.title, overlayClose: false, width: $3,height:$4}); return false;" class="button3 orange">$2</a>

Usage example: [alink=http://mybb.com style=100x100]MyBB.com[/alink]
[Image: sig.png]
Reply
#4
It doesn't work for me.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)