News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

BB Codes and how to add them

Started by meemzo, July 28, 2014, 08:30:56 PM

Previous topic - Next topic

meemzo

Where and how to you add BB codes and what is the code breakdown look like?  I want to add a BB code that adds a link with a title much like this does  [ur(l)=http://www.website.com/]Title Here[/ur(l)]  I have version 2.0.8

Arantor

[url=http://example.com/]Example.com[/url]

Example.com

Um, not sure what you need to do differently since that's a core feature...

Mstcool

That is a default bbc added pretty much every bcc is available. :p

kat

I wonder... If the WYSIWYG editor's disabled, you have to do that manually, don't you? Maybe he has it disabled...

meemzo

There is no code to add url with a title.  Not all people know how to use BB codes and hate using url's spelled out.  They need a way to put a title that links to a url.

Kindred

You are incorrect.
The standard URL Bbcode provides the ability to include a title...

What you seem to be looking for is not a Bbcode, but an interface that automatically fills the Bbcode win the URL and title.

Which leads to the question... Have you looked at the wysiwyg editor?  As poor as it is  I believe that it does that.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Burke ♞ Knight


Arantor

Quote from: mosomojo on July 29, 2014, 09:48:40 PM
There is no code to add url with a title.  Not all people know how to use BB codes and hate using url's spelled out.  They need a way to put a title that links to a url.

You mean other than the one I *specifically* gave you an example of?

kat

I was mistaken. With the WYSIWYG editor, you click the icon for inserting an image and a box leaps up, asking you for the URL. It doesn't ask for any text.

So, the best way, from what I can see, if for you to use the mod that BK mentioned.

http://custom.simplemachines.org/mods/index.php?mod=3832

Arantor

There's also one for images that is a variation on my mod, too.

jonesH

A bit of a story: the way this works is not the same here and on my forum.

On my forum, with the editor enabled, I type in the Title Here, select (highlight) it, click the second-from-left icon in the second row of buttons (above the emoticons), and in the popup box paste or type in the URL. (As an aside, I'd rahter not have the http:// prefilled, but that's just me.)

Here, when I do the same, instead of the popup I get Title Here

Arantor

Well, are you using WYSIWYG mode here or not? Are you using WYSIWYG mode on your forum or not?

The linked mod replaces the URL button in non WYSIWYG mode only.

jonesH

Sorry, my bad: different settings here and on my forum. So then with WYSIWYG enabled, K@ is right and the popup would be the way to go.

Arantor

The mod referenced does not touch or change WYSIWYG and it is generally recommended to avoid the WYSIWYG editor.

In any case, the correct use for WYSIWYG is to select some text for the link's text and then to click the button to make the link.

My mod pre-empts that by asking for both URL and displayed text, however it deliberately doesn't touch WYSIWYG because WYSIWYG behaves so differently.

Advertisement: