XF 2.2 How to create custom bbcode this way?

Hi there,

I want to add a custom bbcode with a picture, so when you click it you go to where the links leads to.
The code this:

I have a link, and want to put it in the bbcode. (example "[link]the link where to go[/link]
In the topic itself you see a picture i made "click here", and when i click it i go tpo wherever the links goes to.
I also make a button in the editor so people can click it and add the link.

Can anyone tell me how to do this?

Regards
Bob
 
Solution
I have done something similar to have a Paypal button.

Try this in bbcode

BB code tag = imglink
Title= Image Link

html replacement:

Code:
<a href="https://example.com/link">
<img src="https://example.com/path_to_image.jpg" alt="name of image" width="xx" height="yy" />
 </a>



In advanced bbcode options at the bottom tick Display HTML replacement when empty

In the fontawesome icon field add the name of the fontawesome icon (then add it to the editor from the BB code button manager)
I have done something similar to have a Paypal button.

Try this in bbcode

BB code tag = imglink
Title= Image Link

html replacement:

Code:
<a href="https://example.com/link">
<img src="https://example.com/path_to_image.jpg" alt="name of image" width="xx" height="yy" />
 </a>



In advanced bbcode options at the bottom tick Display HTML replacement when empty

In the fontawesome icon field add the name of the fontawesome icon (then add it to the editor from the BB code button manager)
 
Last edited:
Solution
I have done something similar to have a Payapl button.




Try this in bbcode

BB code tag = imglink
Title= Image Link

html replacement:

Code:
<a href="https://example.com/link">
<img src="https://example.com/path_to_image.jpg" alt="name of image" width="xx" height="yy" />
 </a>



In advanced bbcode options at the bottom tick Display HTML replacement when empty

In the fontawesome icon field add the name of the fontawesome icon (then add it to the editor from theBB code button manager

Thanks @Mr Lucky

Will inform you how it goes ;)

Regards
Bob
 
Back
Top Bottom