Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Anguz on November 12, 2004, 05:35:27 AM

Title: Custom BB Code
Post by: Anguz on November 12, 2004, 05:35:27 AM
Link to Mod (http://mods.simplemachines.org/index.php?mod=48)

Requires FasterParsecode and ModSettingsTextarea to be installed first.
http://mods.simplemachines.org/index.php?mod=39
http://mods.simplemachines.org/index.php?mod=47

This mod will let you create your own BB code tags in the forum settings area. It does tags without attributes. Click on the [?] next to the setting for more information on how to do it.
      
Copyright 2004 by Cristian Lavaque. http://anguz.net
Title: Re: Custom BB Code
Post by: Jerry on November 12, 2004, 10:21:57 AM
I installed this mod on my board and its terrific, the only thing I didn't like about it is you have to put everything in one box. Maybe something like the board news page would be good for the bbcode? thanks :) I am just happy to have this box now.
Title: Re: Custom BB Code
Post by: codenaught on November 12, 2004, 04:23:08 PM
Great mod!  :D This should make it quite a bit easier to add bbcode! I hope many people give out cool html codes to convert to BBcode so we can put them into that box.  ;)
Title: Re: Custom BB Code
Post by: Anguz on November 12, 2004, 05:27:23 PM
Glad you liked it ;)

Yeah, that's not a bad idea. You guys could use this topic to post the tags you create with the mod. :)
Title: Re: Custom BB Code
Post by: Anguz on November 12, 2004, 05:29:05 PM
Here's a couple of screenshots.
Title: Re: Custom BB Code
Post by: [darksteel] on November 12, 2004, 05:32:41 PM
good mod, thanks Anguz.
Title: Re: Custom BB Code
Post by: Jerry on November 12, 2004, 06:59:29 PM
I have one other question is it possible to use more than one number? the $1's

like
stream <embed height="$1" width="$2" src="$3" autostart="true"></embed> or would I just use $1 if possible at all?
Title: Re: Custom BB Code
Post by: Anguz on November 12, 2004, 08:08:53 PM
Quote from: Jerry on November 12, 2004, 06:59:29 PM
I have one other question is it possible to use more than one number?

Quote from: Anguz
It does tags without attributes.

I do have the code written for that already, though, but I have to figure out a couple of things before releasing it. For the example you gave, it could written like this


stream_w_h <embed src="$3" width="$1" height="$2" /><noembed>$3</noembed>


the tag would look like this


[stream w="100" h="100"]http://example.com/movie.mov[/stream]


but like I said, it's not in this version. Probably soon, stay tuned. ;)

PS: The embed tag has been deprecated in HTML 4.0 in favor of the object element, iirc.
Title: Re: Custom BB Code
Post by: Jerry on November 12, 2004, 08:52:41 PM
thanks for the embed/object info :), I cannot wait for the next versions of this mod. You are gr8 :)
Title: Re: Custom BB Code
Post by: ryanbsoftware on November 18, 2004, 12:14:26 PM
I installed this mod for someone but now got a blank screen, i installed it manually because the package manager dosen't work with the host.
Title: Re: Custom BB Code
Post by: Anguz on November 18, 2004, 04:33:16 PM
And after doing it by hand it worked?
Title: Re: Custom BB Code
Post by: ryanbsoftware on November 18, 2004, 07:12:15 PM
no it didn't i just get a blank screen when going to the site now.
Title: Re: Custom BB Code
Post by: Anguz on November 18, 2004, 11:11:39 PM
Hmm... well, that's odd, did you change something else? I don't know how this mod could be causing that. Did you install the FasterParsecode and ModSettingsTextarea ones first? Did you try uninstalling the mod to see if the blank page problem goes away?
Title: Re: Custom BB Code
Post by: ryanbsoftware on November 19, 2004, 12:40:51 AM
Quote from: Anguz on November 18, 2004, 11:11:39 PM
Hmm... well, that's odd, did you change something else? I don't know how this mod could be causing that. Did you install the FasterParsecode and ModSettingsTextarea ones first? Did you try uninstalling the mod to see if the blank page problem goes away?

i undertand you are trying to help me but obviously i know how to read and follow directions and uninstalling it would fix the problem as it was an unmodified version of RC2 until this, and i made the edits exactly as stated in the .mod files.
Title: Re: Custom BB Code
Post by: Jerry on November 19, 2004, 12:49:26 AM
Did you install the other 2 mods required by this mod (just asking)
Title: Re: Custom BB Code
Post by: Anguz on November 19, 2004, 04:24:05 AM
Quote from: ryanbsoftware on November 19, 2004, 12:40:51 AM
i undertand you are trying to help me but obviously i know how to read and follow directions and uninstalling it would fix the problem as it was an unmodified version of RC2 until this, and i made the edits exactly as stated in the .mod files.

You did the edits by hand? If it's a clean RC2 install, then the package manager can do it fine. Does it give you the blank page using the package manager?
Title: Re: Custom BB Code
Post by: ryanbsoftware on November 19, 2004, 12:00:18 PM
Quote from: Anguz on November 19, 2004, 04:24:05 AM
Quote from: ryanbsoftware on November 19, 2004, 12:40:51 AM
i undertand you are trying to help me but obviously i know how to read and follow directions and uninstalling it would fix the problem as it was an unmodified version of RC2 until this, and i made the edits exactly as stated in the .mod files.

You did the edits by hand? If it's a clean RC2 install, then the package manager can do it fine. Does it give you the blank page using the package manager?

something like that, i just know it dosen't work.
Title: Re: Custom BB Code
Post by: Anguz on November 19, 2004, 03:23:17 PM
I'm sorry. If somebody else has this problem, please let me know.
Title: Re: Custom BB Code
Post by: ryanbsoftware on November 19, 2004, 05:01:04 PM
could this be because the host has php safe mode enabled?
Title: Re: Custom BB Code
Post by: Anguz on November 19, 2004, 05:46:47 PM
It could be, I'm not familiar with the problems that causes. :-\
Title: Re: Custom BB Code
Post by: ryanbsoftware on November 19, 2004, 08:24:19 PM
Quote from: Anguz on November 19, 2004, 05:46:47 PM
It could be, I'm not familiar with the problems that causes. :-\

ne 1 else with php safe mode on have this problem?
Title: Re: Custom BB Code
Post by: allfripou on December 04, 2004, 07:36:31 PM
works perfect thx :)
Title: Re: Custom BB Code
Post by: jjgarza70 on December 09, 2004, 03:18:08 AM
guys..


i tried to install this mod however I got the an error on the first file

QuoteInstalling this package will perform the following actions:  Type Action Description
1. Execute Modification ./Sources/Subs.php Failure
2. Execute Modification ./Sources/ModSettings.php Success
3. Execute Modification ./Themes/default/languages/Help.english.php Success
4. Execute Modification ./Themes/default/languages/Modifications.english.php Succe

its about the subs.php

can someone help me here..?
Title: Re: Custom BB Code
Post by: [Unknown] on December 09, 2004, 03:36:08 AM
Did you install his other mod, which he mentioned was required, first?

-[Unknown]
Title: Re: Custom BB Code
Post by: jjgarza70 on December 09, 2004, 11:26:50 AM
thanks unknown,

I manage to change the chmode permissions, but I still can't get the "bgsound src"  tag to work.

thanks

Joe
Title: Re: Custom BB Code
Post by: Jerry on December 09, 2004, 07:54:54 PM
bgsound is not a very nice tag :( does not work in any other browser then Ie that I know of, better to use the object tag or embed if necessary ;)
Title: Re: Custom BB Code
Post by: jjgarza70 on December 10, 2004, 12:10:13 PM
I can't even make the code to work in IE

here's the code I am trying to insert

<bgsound Src="http://raypr.netfirms.com/musica/hits3/kilometros.wma"loop=infinite>

Title: Re: Custom BB Code
Post by: jjgarza70 on December 10, 2004, 12:23:54 PM
How about inserting Video Clips ?

:-\
Title: Re: Custom BB Code
Post by: Jerry on December 10, 2004, 06:10:30 PM
Quote from: jjgarza70 on December 10, 2004, 12:10:13 PM
I can't even make the code to work in IE

here's the code I am trying to insert

<bgsound Src="http://raypr.netfirms.com/musica/hits3/kilometros.wma"loop=infinite>


if you are trying to make a background sound with this mod I suggest:
<embed src="$1" hidden="true" autostart="true" loop=true><noembed><bgsound src="$1" loop="infinite"></noembed>
Title: Re: Custom BB Code
Post by: Anguz on December 10, 2004, 07:14:18 PM
I won't provide help to make a bgsound tag to work. I hate them too much in webpages to assist their use. Sorry. :P
Title: Re: Custom BB Code
Post by: jjgarza70 on December 10, 2004, 07:32:07 PM
where do I put this code?
Title: Re: Custom BB Code
Post by: Jerry on December 10, 2004, 08:13:45 PM
if you are trying to do it with the bbcode mod you do it on the admin panel by adding to the text area:
code_name_you_want <embed src="$1" hidden="true" autostart="true" loop=true><noembed><bgsound src="$1" loop="infinite"></noembed>
If change the code_name_you_want to anything and if you want that code to play that file just replace the $1's but if you leave it like that you can do the [code_name_you_want]file[/code_name_you_want] and it will play that sound file ;)
Title: Re: Custom BB Code
Post by: jjgarza70 on December 10, 2004, 08:27:35 PM
thanks for your help jerry...

I am still not able to play a song...

http://raypr.netfirms.com/musica/hits3/kilometros.wma

can you show me how for this particular file?

thanks
Title: Re: Custom BB Code
Post by: Jerry on December 10, 2004, 08:54:48 PM
lets say you add the code music to your forums (change the code_name_you_want to music) and you would just do this is posts [music]http://raypr.netfirms.com/musica/hits3/kilometros.wma[/music]
Title: Re: Custom BB Code
Post by: jjgarza70 on December 13, 2004, 12:34:58 AM
nope..

I entered the code in the bbcode box but nothing happened.. the song did not play instead the code is sh0wn in the post... :-[
Title: Re: Custom BB Code
Post by: jjgarza70 on December 13, 2004, 03:31:50 PM
Quote from: Anguz on December 10, 2004, 07:14:18 PM
I won't provide help to make a bgsound tag to work. I hate them too much in webpages to assist their use. Sorry. :P


That's a littble bit selfish...

some of us have forums that host music and video.. without these codes, SMF is practitly useless

what a Shame!
Title: Re: Custom BB Code
Post by: Anguz on December 14, 2004, 01:18:09 AM
Well, you can create tags for media and I help with that if I can, but what I don't like is the background music in webpages. Also, I can choose what to work on and what not, right?

This is just an advice, you're still free to do what you want with your own space in the web.
http://www.webmasterworld.com/forum10/3757.htm

Anyway, it'd help to help you, if you provide the HTML you want to have in your post and then figuring out the new BBcode to accomplish it will be easier.

BTW, what if more than one person uses the bgmusic tag in the same page? Will you have 2 or even more media files loading and playing simultaneously? Just wondering how that would be handled.
Title: Re: Custom BB Code
Post by: blsilks on December 14, 2004, 11:28:15 AM
I am using SMF 1.0 RC2 and I installed Faster Farsecode 1.00 and then updated to the 1.03 and then installed ModSettings TextArea and then installed the Customer BB Code and all 4 installs are listed as success! however when I go to Edit Features and Options (because I am using the default theme for RC2) I do not see the box to enter in custom tags.  I tried deleting and re-applying the Customer BB Code  mod and still couldnt find the tag box in the admin panel.  did i install wrong?
Title: Re: Custom BB Code
Post by: Anguz on December 14, 2004, 08:55:26 PM
If all steps in the install were successful, I don't know why you don't have the field in Features and Options... Do you at least have the setting there even if not with the box to input? Search for this in that page:

QuoteCustom BB Code tags
Title: Re: Custom BB Code
Post by: huijaa on January 04, 2005, 04:58:04 PM
It don't work because i've "SMF 1.0", no "SMF 1.0 RC2".

Can you get change this mod?
Title: Re: Custom BB Code
Post by: theantidote on January 04, 2005, 05:06:38 PM
I have this working successfully on 1.0. You will have to install it all by hand, the installer doesn't work.
Title: Re: Custom BB Code
Post by: huijaa on January 04, 2005, 05:09:07 PM
how do?

I can't even install FasterParserCode 1.04 for "SMF 1.0". But if succesful i can continue with Custom BB Code.

Title: Re: Custom BB Code
Post by: theantidote on January 04, 2005, 05:12:17 PM
Do it all by hand, the old mod files don't work with 1.0. Get subs.php from your sources directory and anything else you need and start working. Just download the archives, exract them, and open the .mod files with wordpad. DONT USE NOTEPAD! It mangles the php structure. Do exactly what it says in the .mod file and your fine.
Title: Re: Custom BB Code
Post by: Jerry on January 04, 2005, 07:02:59 PM
Quote from: theantidote on January 04, 2005, 05:06:38 PM
I have this working successfully on 1.0. You will have to install it all by hand, the installer doesn't work.
If you look at the package-info.xml carefully you can edit it so that it can install on SMF 1.0 ;) But its always best to wait for the mod authors to update the mod.
Title: Re: Custom BB Code
Post by: Atomsk on January 24, 2005, 04:11:24 PM
Google BBcode ->

CODE :
google <a href="http://www.google.com/search?q=$1" target="_blank">$1</a>

USE :
[google][/google]

This Custom BB Code MOD -> RLZ!!!
Title: Re: Custom BB Code
Post by: Squeakypants on January 24, 2005, 09:35:13 PM
That google thing is kinda cool

I hate installin mods by hand, too much risk (I did it with another mod, i think it was the shop one, and i did it right but it took to long, even if I am a web programmer). Any time it will work in  1.0.1? (i mean through teh package manager)

also, would this work?
$1 <$1>$2</$1>

one more thing, where is the forum settings? do you mean "Edit Features and Options"?
Title: Re: Custom BB Code
Post by: Anguz on January 29, 2005, 08:20:02 AM
1.01

Title: Re: Custom BB Code
Post by: Anguz on January 29, 2005, 08:21:24 AM
Quote from: Squeakypants on January 24, 2005, 09:35:13 PM
would this work?
$1 <$1>$2</$1>

I'm not sure I understand what you want to do.

Quote
one more thing, where is the forum settings? do you mean "Edit Features and Options"?

Yes.
Title: Re: Custom BB Code
Post by: maufonseca on January 29, 2005, 10:56:27 AM
This will work in all the Themes or only in the Default one?
Title: Re: Custom BB Code
Post by: maufonseca on January 29, 2005, 12:18:04 PM
I alredy Intalled it, and yeah, It works in other themes, but i dont know alot about code, so can anyone tell me how to make some cool tags  :D  maybe a list of diferent codes that can be installed

/me loves custom BBCode tags
Title: Re: Custom BB Code
Post by: Brett Patterson on January 30, 2005, 04:39:17 AM
Hey guys.  I'm kinda new to the whole write your own bbcode tags.  Lookin for some help.

Could someone point me in the right direction to either create a mod or custom BB tag for Macromedia ActionScript highlighting?

It would basically be highlighted code with some pre-defined vars.  The code tag exists for other boards, but I can't find it (or it's tough to get a hold of).

Thanks.

~Brett
Title: Re: Custom BB Code
Post by: Brett Patterson on January 30, 2005, 04:59:14 AM
QuoteWikipedia Search
wiki <a href="http://en.wikipedia.org/wiki/$1" target="_blank">$1</a>
[wiki]Search_Term(s)[/wiki]

eBay Search
ebay <a href="http://search.ebay.com/$1" target="_blank">$1</a>
[ebay]Search_Term[/ebay]

Amazon.com
amazon <a href="http://www.amazon.com/exec/obidos/external-search/103-2098341-7480628?field-keywords=$1" target="_blank">$1</a>
[amazon]Search_Term[/amazon]

Current Weather
weather <a href="http://www.weather.com/weather/local/$1" target="_blank">$1</a>
[weather]ZipCode[/weather]
Use the previous code as [weather]21250[/weather] Zipcode ONLY

That is basically all of what you can find in the Mozilla Firefox 1.0 integrated search (with some extras, and repeats excluded).

This is just to help people.  Some are useless (weather) but still fun and easy!!

~Brett
Title: Re: Custom BB Code
Post by: Anguz on January 30, 2005, 05:17:09 AM
Atomsk and Brett, thank you for those tags. :)

In fact, I've had this idea for a tag similar to those that'd be more or less like this:

[shortcut=google]keyword[/shortcut]

There'd be some default ones, but more could be added in the admin area. The problem I have is I still haven't found a good name for that tag, "shortcut" is just for the example. I thought maybe "link" but am not sure yet.
Title: Re: Custom BB Code
Post by: Tony Reid on February 03, 2005, 06:32:11 PM
Custom tag that looks up a meaning to a word from on answers.com

about <a href="http://www.answers.com/main/ntquery?s=$1" target="_blank">$1</a>

usage:

[about]purple[/about]

results in purple (http://www.answers.com/main/ntquery?s=purple)




Can I reccomend that the text area be expanded as wide as possible in the next version :)

Thanks for the great mod Anguz!

Title: Re: Custom BB Code
Post by: gor on February 19, 2005, 10:24:23 PM
new version out yet for smf 1.0.2? i upgraded my forum and this and the two mods needed to install custom bbcode were no longer useful  >:(

any help is appreciated
Title: Re: Custom BB Code
Post by: Anguz on February 20, 2005, 01:18:08 AM
Soon.
Title: Re: Custom BB Code
Post by: Anguz on February 22, 2005, 09:33:09 PM
1.02

Title: Re: Custom BB Code
Post by: Squeakypants on February 22, 2005, 10:25:30 PM
Quote from: Anguz on January 29, 2005, 08:21:24 AM
Quote from: Squeakypants on January 24, 2005, 09:35:13 PM
would this work?
$1 <$1>$2</$1>

I'm not sure I understand what you want to do.

To make it so you can do anything in html in bbcode. For example, with this you could do [strong]blah[/strong] and it should read it as <strong>blah</strong>
Title: Re: Custom BB Code
Post by: Anguz on February 22, 2005, 10:31:18 PM
You may be able to do it, although not exactly the way you wrote it, but do you realize that it could empower anyone in your forum to use dangerous code?
Title: Re: Custom BB Code
Post by: Waste on March 04, 2005, 01:07:31 AM
How could I make the text area in the admin area larger?
Getting kinda hard to weed through the code in such a small window.


Nevermind.
Figured it out myself.
Title: Re: Custom BB Code
Post by: Anguz on March 04, 2005, 02:47:51 AM
Quote from: Waste on March 04, 2005, 01:07:31 AM
How could I make the text area in the admin area larger?
Getting kinda hard to weed through the code in such a small window.


Nevermind.
Figured it out myself.

Cool. :)

Actually, how I'd do it is, write the code in a text editor and then copy/paste to the textarea. :P
Title: Re: Custom BB Code
Post by: Waste on March 04, 2005, 03:34:48 AM
Quote from: Anguz on March 04, 2005, 02:47:51 AM
Quote from: Waste on March 04, 2005, 01:07:31 AM
How could I make the text area in the admin area larger?
Getting kinda hard to weed through the code in such a small window.


Nevermind.
Figured it out myself.

Cool. :)

Actually, how I'd do it is, write the code in a text editor and then copy/paste to the textarea. :P


Yea, that's what I usually do, but I had like 15 windows open and couldn't be arsed to open another. :P
Maybe you could make it have it's own section and move the already installed BBcodes to another text box?
Title: Re: Custom BB Code
Post by: Anguz on March 04, 2005, 04:35:43 AM
I think it's fine like this. :)
Title: Re: Custom BB Code
Post by: azuregenesis on March 04, 2005, 05:55:13 AM
Quote from: Anguz on March 04, 2005, 04:35:43 AM
I think it's fine like this. :)

it's perfect :)

i'm using Bloc's Themis theme and it works great!

oh BTW, the search code for amazon.com was way off. it searches forthe term typed in the "books" section.

here the real code for it (tried it mysellf)

Amazon.com - all products search
amazon <a href="http://www.amazon.com/exec/obidos/search-handle-url/index%3Dblended%26field-keywords=$1" target="_blank">$1</a>

where the $1 is, your search term goes there (but everyone already knew that, right?)

take care.
Title: Re: Custom BB Code
Post by: Waste on March 04, 2005, 10:18:50 AM
Quote from: Anguz on March 04, 2005, 04:35:43 AM
I think it's fine like this. :)

Ok, that's cool.
Just trying to make some suggestions. :)
Title: Re: Custom BB Code(Whoa)
Post by: rakuli on March 15, 2005, 04:48:27 AM
Hi
I liked the concept of custom BB code.
I downloaded it in the package manager and installed it. It advsied me of the success then on clicking proceed the page went blank. :o
I can't get into the forum at all now and did quite a bit of work between the error and the last backup. :(
The forum is just all white and veiwing the page source doesn't help as it is simply
<html><body></body></html>
I don't know where to start to get it fixed. Although it will not kill me to restore from backup I would prefer to get it working again. :-[
Title: Re: Custom BB Code
Post by: Anguz on March 15, 2005, 06:20:47 AM
You can probaby go to the previous version of the files with an FTP client. First open the .mod file in the package and make a list of the files it modifies, they're between <edit file> tags, and then look for those in your FTP server. The previous version is probably there renamed with a tilda "~" at the end, if so, remove the copies without the tilda and then rename the files taking the tilda away. I hope that made sense.

What SMF version are you using? Also, did you first apply the mods it requires? FasterParsecode and ModSettingsTextarea.
Title: Re: Custom BB Code
Post by: rakuli on March 15, 2005, 06:28:23 AM
Quote from: Anguz on March 15, 2005, 06:20:47 AM

What SMF version are you using? Also, did you first apply the mods it requires? FasterParsecode and ModSettingsTextarea.
I was just reading now the mod description and noticed it required thos other mods.
I downloaded it through the package manager and I am pretty certain that this is not mentioned there. <edit>It is there MY BAD<edit>
Quote from: Anguz on March 15, 2005, 06:20:47 AM

You can probaby go to the previous version of the files with an FTP client. First open the .mod file in the package and make a list of the files it modifies, they're between <edit file> tags, and then look for those in your FTP server. The previous version is probably there renamed with a tilda "~" at the end, if so, remove the copies without the tilda and then rename the files taking the tilda away. I hope that made sense

I am not entirely sure what you mean here. So in the .mod file in the package I will find where to go to change files back to old versions?
I wasn't aware that it renamed the original files.....I will check it now.


Title: Re: Custom BB Code
Post by: rakuli on March 15, 2005, 06:35:15 AM
Right.
I followed your instructions and the forum works again :D ;D
Thanks.

I will be careful to read all mod descriptions in the future.
Title: Re: Custom BB Code
Post by: Anguz on March 15, 2005, 08:26:23 AM
Quote from: rakuli on March 15, 2005, 06:35:15 AM
Right.
I followed your instructions and the forum works again :D ;D
Thanks.
Great!

Quote from: rakuli
I will be careful to read all mod descriptions in the future.
Good. ;)
Title: Re: Custom BB Code
Post by: azuregenesis on April 10, 2005, 05:46:45 PM
i accidentally uninstalled this since i wanted to try out the "spoiler tag" mod and i can't reinstall it now. :(

does anyone have a version that works for 1.03?

help is needed.
Title: Re: Custom BB Code
Post by: azuregenesis on April 12, 2005, 07:13:49 AM
no one? :(

anguz?
Title: Re: Custom BB Code
Post by: Anguz on April 12, 2005, 09:22:32 AM
Not updated to 1.0.3 yet, sorry. I've been pretty busy lately, but I hope I'll put some time aside in the next few days to work on my mods.
Title: Re: Custom BB Code
Post by: azuregenesis on April 13, 2005, 05:53:09 AM
Quote from: Anguz on April 12, 2005, 09:22:32 AM
Not updated to 1.0.3 yet, sorry. I've been pretty busy lately, but I hope I'll put some time aside in the next few days to work on my mods.

thank you :) i eagerly await the update for 1.0.3 :)
Title: Re: Custom BB Code
Post by: azuregenesis on April 17, 2005, 09:02:11 AM
still waiting :)
Title: Re: Custom BB Code
Post by: Anguz on April 20, 2005, 12:05:28 AM
1.03

Title: Re: Custom BB Code
Post by: azuregenesis on April 25, 2005, 05:12:43 PM
i love you :)
Title: Re: Custom BB Code
Post by: hartiberlin on May 06, 2005, 05:49:43 PM
Hi,
does this mod allow me as the admin of my forum
to add Javascript code to my signature ?

Only me as the admin should be able to use this,
so could this be set under permission to be able only to be used
by the admin ?

Can I also use <form> tags and other tags HTML code this way ?

Thanks.

Regards, Harti.

Title: Re: Custom BB Code
Post by: Anguz on May 06, 2005, 07:17:06 PM
Well, it still doesn't parse codes based on membergroups, so no, it wouldn't work. But SMF 1.1 has an HTML tag for admins, which would allow you to do what you want.
Title: Re: Custom BB Code
Post by: hartiberlin on May 06, 2005, 08:33:37 PM
Hmm, wouldn´t it be able to just don´t display the new BBcodes
to normal member in their posting window, so only me as the moderator
knows the new tags, so I could add Javascript and other code to postings ?

I don´t want to upgrade to a beta version in this moment, cause my forum runs pretty stable !

Thanks.

Regards, Stefan.
Title: Re: Custom BB Code
Post by: Anguz on May 07, 2005, 01:50:20 AM
You could, but the problem is that if the parsing of the code doesn't check that it was actually you who used it, then anyone quoting a message where you did, will know your code for the JS and then use it. If it's not life or death to have this, I'd say you should wait for a public release of 1.1, don't you think? I have the idea of doing the permissions based parsing, but I really don't know if that'll happen after or before 1.1 final. :P
Title: Re: Custom BB Code
Post by: hartiberlin on May 07, 2005, 12:55:19 PM
Hi Anguz,
thanks for the answers.
Would this also apply to the signature only ?

If I only use it in my signature, what if then someone
would quote my posting, I guess the signature is not quoted , right ?
So then he does not see the codes , right ?

Regards, Stefan.
Title: Re: Custom BB Code
Post by: Anguz on May 07, 2005, 02:35:11 PM
That is true, they can't quote your sig. Someone with the permission to edit profiles would, though. What is this JS that you really need? Just curious. :)
Title: Re: Custom BB Code
Post by: hartiberlin on May 07, 2005, 03:18:38 PM
Hmm,
Would a normal user have the permission to edit my admin profile ?
Probably not, right ?

I would need this to include a Google Adsense Javascript code
in my admin signature.
Only me as the admin of my forum should be able to do this.

Are there other options to do this ?

Thanks.

Regards, Stefan.
Title: Re: Custom BB Code
Post by: Anguz on May 08, 2005, 12:56:52 AM
It could be done, use the javascript in the replacing code of the new custom tag.
Title: Re: Custom BB Code
Post by: hartiberlin on May 14, 2005, 04:21:16 AM
Okay, I installed it now and the BB code mod works.
But how do I now make an iframe with it ?

I want to embed this code:

<iframe src="http://rcm.amazon.com/e/cm?t=overunitcomth-20&o=1&p=8&l=as1&asins=1892062135&fc1=000000&=1&lc1=0000ff&bc1=000000&lt1=_blank&IS2=1&f=ifr&bg1=ffffff&f=ifr" width="120" height="240" scrolling="no" marginwidth="0" marginheight="0" frameborder="0">
</iframe>


Thanks thanks.

Regards, Stefan.
Title: Re: Custom BB Code
Post by: Anguz on May 14, 2005, 06:41:10 PM
You're welcome. If that's the HTML you want in the message, at the beginning add the name of the tag like it's explained in the mod to create a tag. :)
Title: Re: Custom BB Code
Post by: hartiberlin on May 15, 2005, 01:19:54 AM
Hi,
well the problem is, that I can not directly put the whole HTML code as it is:


<iframe src="http://rcm.amazon.com/e/cm?t=overunitcomth-20&o=1&p=8&l=as1&asins=1892062135&fc1=000000&=1&lc1=0000ff&bc1=000000&lt1=_blank&IS2=1&f=ifr&bg1=ffffff&f=ifr" width="120" height="240" scrolling="no" marginwidth="0" marginheight="0" frameborder="0">
</iframe>


into the posting, but I must first create the BBcode in the admin section this way:


if <iframe src="$1" width="120" height="240" scrolling="no" marginwidth="0" marginheight="0" frameborder="0">
</iframe>


and then copy the link like this into the posting:


[if]http://rcm.amazon.com/e/cm?t=overunitcomth-20&o=1&p=8&l=as1&asins=1892062135&fc1=000000&=1&lc1=0000ff&bc1=000000&lt1=_blank&IS2=1&f=ifr&bg1=ffffff&f=ifr[/if]



This is very annoying, as it takes a lot of manual work to copy and paste all
the single lines into a posting and add infront and at the end the [if] and [/if]
tags...
Hmm, is there a much easier way when I use the current 1.1 beta version ?
Can I then as the administrator  copy and paste the whole HTMLcode directly into the posting without having to care
about BBCodes ?
Does this then only work for the admin of the forum ?
That would be good !

I am willing to pay the 50 US$ for the 1.1 version, if this makes it possible
and could be easily updated from the now 1.03 to 1.1 with no problems.

Regards, Stefan.

Title: Re: Custom BB Code
Post by: Anguz on May 15, 2005, 04:03:43 AM
In 1.1, as an admin only, you can use HTML between html bbcode tags I really don't recommend that you use the custom bbcode tags for html that you don't want just anyone to use, cause anyone could use them then.

Example:

[center]
[html]
<iframe width="500" height="200" src="http://www.google.com"></iframe>
[/html]
[/center]


comes out like this:
Title: Re: Custom BB Code
Post by: hartiberlin on May 15, 2005, 04:59:57 AM
Does this code only work in version 1.1 ?
If only the admin can use it, then it is okay !
Title: Install error !
Post by: hartiberlin on May 15, 2005, 05:02:54 AM
I just found a bug in your 3 mods !

They just can only be installed if you have set the forum into real
name mode for calling the server via repair_settings.php

if you use this:
http://66.90.118.44/~overunit/index.php

then the mods can´t be installed !

Regards, Stefan
Title: Re: Custom BB Code
Post by: Anguz on May 15, 2005, 06:19:49 AM
What 3 mods? Faster Parsecode, ModSettings Textarea and Custom BB Code?

I don't understand what you mean by

QuoteThey just can only be installed if you have set the forum into real
name mode for calling the server via repair_settings.php
Title: Re: Custom BB Code
Post by: hartiberlin on May 15, 2005, 01:53:04 PM
Yes, all 3 mods have this error !
they only install , if I have set the forum
onto the real domain name usage !

YOu can change via repair_settings.php
the forum from being called via the IP number:
http://xx.xx.xx.xx/~username
or
http://domainname.com

If I use the first:
http://xx.xx.xx.xx/~username

then the mods don´t install !

I have installed my forum into the root directory of my domain.

Regards. Stefan.
Title: Re: Custom BB Code
Post by: Anguz on May 15, 2005, 05:52:40 PM
Why is it the mods' fault? :P
Title: Re: Custom BB Code
Post by: hartiberlin on May 15, 2005, 06:07:53 PM
It does not accept the password,
so it will not install from the package manager.

But maybe this is only a problem of the path settings ?
Title: Re: Custom BB Code
Post by: Anguz on May 15, 2005, 06:17:44 PM
Quote from: hartiberlin on May 15, 2005, 06:07:53 PM
It does not accept the password,
so it will not install from the package manager.

But maybe this is only a problem of the path settings ?

Well, it's not the mod's problem, that I'm sure. Doesn't the same happen with other mods you try to install? I'd post this issue in a support board, since it's a problem you're having with your forum settings.
Title: Re: Custom BB Code
Post by: hartiberlin on May 15, 2005, 06:45:23 PM
I did not yet install other mods !
Only change some template files to include
some Google adsense ads.
Title: Re: Custom BB Code
Post by: azuregenesis on July 03, 2005, 06:37:26 AM
waiting for this mod to updated as well :)
Title: Re: Custom BB Code
Post by: Anguz on July 03, 2005, 06:47:55 AM
1.04

Title: Re: Custom BB Code
Post by: spirulez on August 02, 2005, 10:27:42 AM
(some screencopy please ?)
Title: Re: Custom BB Code
Post by: azuregenesis on August 02, 2005, 10:29:01 AM
Quote from: spirulez on August 02, 2005, 10:27:42 AM
(some screencopy please ?)

http://www.simplemachines.org/community/index.php?topic=19738.msg159744#msg159744

5th post of this thread.
Title: Re: Custom BB Code
Post by: spirulez on August 02, 2005, 10:33:55 AM
Oops, sorry my browser makes me mad :P

Nice mod, I hope the next update for the 1.1 b3 ;)
Title: Re: Custom BB Code
Post by: hartiberlin on August 07, 2005, 02:35:35 PM
Quote from: Anguz on May 06, 2005, 07:17:06 PM
Well, it still doesn't parse codes based on membergroups, so no, it wouldn't work. But SMF 1.1 has an HTML tag for admins, which would allow you to do what you want.

Can you please tell me, where in the admin section I find the HTML tag for admins only ?
I have now installed
SMF 1.1 Beta 3 Public
on a test forum and don´t find it.
Thanks.

Regards, Stefan.
Title: Re: Custom BB Code in SMF 1.1 Beta3
Post by: hartiberlin on August 07, 2005, 03:01:27 PM
Hi,
I tried to post an iframe tag code like this without Custom BB code
in SMF 1.1 Beta3:


<iframe src="http://rcm.amazon.com/e/cm?t=overunitcomth-20&o=1&p=8&l=as1&asins=1892062135&fc1=000000&=1&lc1=0000ff&bc1=000000&lt1=_blank&IS2=1&f=ifr&bg1=ffffff&f=ifr" width="120" height="240" scrolling="no" marginwidth="0" marginheight="0" frameborder="0">
</iframe>


But it is not displayed right.

Will Anguz release also a custom BB code for SMF 1.1 Beta3
or can this be done differently without  a custom BB mod ?

Where is this hidden  "admin only" html tags ?

Thanks.
Title: Re: Custom BB Code
Post by: Anguz on August 08, 2005, 03:58:35 AM
If you're the admin, just use [html][/html]. I will most probably release this mod for 1.1 when it reaches Final.
Title: Re: Custom BB Code
Post by: hartiberlin on August 08, 2005, 06:00:43 AM
Thanks Anguz,
now the iframe tag works inside a posting !

This now solves all my needs. :D
Many thanks !

Regards. Stefan.
Title: Re: Custom BB Code
Post by: Anguz on August 09, 2005, 12:33:05 PM
Quote from: eldacar on August 09, 2005, 09:14:16 AM
QuoteCan't open file: 'smf_sessions.MYI' (errno: 145)
I am receiving this message every few weeks. I have to fix it from myphpadmin. It only ever occurs on _sessions, and I'm sure its not a SMF error. Is there some minor bug in this mod that might be corrupting this table?

This mod doesn't use sessions, why do you think the error is being caused by this mod?
Title: Re: Custom BB Code
Post by: frost on September 01, 2005, 09:43:15 AM
how could a align tag be created? or float tags? i'm sorry but i'm lost, i'm trying to make images align to places but...
Title: Re: Custom BB Code
Post by: ivo2296 on September 03, 2005, 12:36:57 AM
Missing line:

<edit file>
$sourcedir/Subs.php
</edit file>

<search for>
      I can't find that in my Subs.php:  // What tags are used in this message?
</search for>

<add before>
      // Prepare the custom tags.
      if(!isset($custom)){
         static $custom = array();
         if(!empty($modSettings['customBBC'])){
            preg_match_all('~^(\w+) (.*?)$~im', $modSettings['customBBC'], $match);
            for($i=count($match[0]); --$i>=0;)
               $custom[$match[1][$i]] = $match[2][$i];
         }
      }

</add before>



Can you  tell me after which line to put the code instead?
I'm using v1.0.5
Title: Re: Custom BB Code
Post by: Anguz on September 03, 2005, 03:33:10 AM
Did you install FasterParsecode?
Title: Re: Custom BB Code
Post by: ivo2296 on September 03, 2005, 10:48:43 AM
Quote from: Anguz on September 03, 2005, 03:33:10 AM
Did you install FasterParsecode?
Sure, that was the first mod i have installed - Faster Parsecode      1.08
Title: Re: Custom BB Code
Post by: Anguz on September 03, 2005, 02:24:34 PM
Could you please post your parsecode function from Subs.php between code tags?
Title: Re: Custom BB Code
Post by: ivo2296 on September 03, 2005, 10:35:22 PM
Quote from: Anguz on September 03, 2005, 02:24:34 PM
Could you please post your parsecode function from Subs.php between code tags?

   // Parses the code in message, using the normal syntax used by some many forums...
function parsecode(&$message)
{
global $modSettings, $scripturl, $txt, $settings, $context;
static $codefromcache = array(), $codetocache = array();

// If it wasn't already set, set it.
if (empty($codefromcache))
{
// If any tags are disabled then we won't add them.
if (!empty($modSettings['disabledBBC']))
{
$disabled = array_flip(explode(',', $modSettings['disabledBBC']));

foreach ($disabled as $tag => $dummy)
$disabled[trim($tag)] = true;
}

$code_to_from = array(
// A named email address. [[email protected]]me[/email]  And, you can't have []s in your email, I should know.
'~\[email=(.+?)\](.+?)\[/email\]~ie' => isset($disabled['email']) ? '"$2 ($1)"' : '"<a href=\"mailto:" . strtr("$1", array("\"" => "&quot;", "]" => "", "[" => "")) . "\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\])~i", "", strtr("$2", array("@" => "&#64;"))) . "</a>"',
// An image.  Width and height can be are optional.
'~\[img(\s+width=([\d]+))?(\s+height=([\d]+))?\s*\](?:<br />)*(.+?)(?:<br />)*\[/img\]~ie' => isset($disabled['img']) ? 'preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$5", array("@" => "&#64;")))' : '"<img src=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$5", array("@" => "&#64;", "\"" => "&quot;"))) . "\" alt=\"\"" . ("$2" != "" ? " width=\"$2\"" : "") . ("$4" != "" ? " height=\"$4\"" : "") . " border=\"0\" />"',
'~\[img(\s+width=([\d]+))?(\s+align=(.+?))?\s*\](?:<br />)*(.+?)(?:<br />)*\[/img\]~ei' => isset($disabled['img']) ? '\'$5\'' : '\'<img src="$5" alt=""\' . (\'$2\' != \'\' ? \' width="$2"\' : \'\') . (\'$4\' != \'\' ? \' align="$4"\' : \'\') . \' border="0" hspace="5"/>\'',
// Find an inside link. (named?) ie. [iurl]www.simplemachines.org[/iurl]
'~\[iurl=(.+?)\](.+?)\[/iurl\]~ie' => isset($disabled['iurl']) ? (!isset($disabled['url']) ? '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$2", array("@" => "&#64;"))) . "</a>"' : 'preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", "$2") . " ($1)"') : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$2", array("@" => "&#64;"))) . "</a>"',
'~\[iurl\](.+?)\[/iurl\]~ie' => isset($disabled['iurl']) ? (!isset($disabled['url']) ? '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">$1</a>"' : '"$1"') : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[iurl.*?\]|\[/iurl\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\">$1</a>"',
// FTP link.  Named...?  [ftp=upload.sourceforge.net]Sourceforge[/ftp]
'~\[ftp\](.+?)\[/ftp\]~ie' => isset($disabled['ftp']) ? 'preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", "$1")' : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array("@" => "&#64;"))) . "</a>"',
'~\[ftp=(.+?)\](.+?)\[/ftp\]~ie' => isset($disabled['ftp']) ? 'preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", "$2") . " ($1)"' : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">" . preg_replace("~(\[url.*?\]|\[/url\]|\[ftp.*?\]|\[/ftp\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$2", array("@" => "&#64;"))) . "</a>"',
// Find a (named?) URL... [url]www.simplemachines.org[/url] or [url=www.simplemachines.org]SMF[/url]
'~\[url=([^:\]]+?)\]([^\]]*?\[url(?:=[^\]]+?)?\].+?\[/url\].*?)\[/url\]~ie' => isset($disabled['url']) ? 'preg_replace("~(\[url.*?\]|\[/url\])~i", "", "$2") . " ($1)"' : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">" . preg_replace("~(\[url.*?\]|\[/url\])~i", "", strtr("$2", array("@" => "&#64;"))) . "</a>"',
'~\[url=(.+?)\](.+?)\[/url\]~ie' => isset($disabled['url']) ? '"$2 ($1)"' : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">" . strtr("$2", array("@" => "&#64;")) . "</a>"',
'~\[url\](?:<br />)*(.+?)(?:<br />)*\[/url\]~ie' => isset($disabled['url']) ? '"$1"' : '"<a href=\"" . preg_replace("~(\[url.*?\]|\[/url\]|\[img.*?\]|\[/img\]|\[email.*?\]|\[/email\])~i", "", strtr("$1", array(":" => "&#58;", "\"" => "&quot;"))) . "\" target=\"_blank\">$1</a>"',
// Bold, italics, underline, strikeout.
'~\[b\](.+?)\[/b\]~i' => isset($disabled['b']) ? '$1' : '<b>$1</b>',
'~\[i\](.+?)\[/i\]~i' => isset($disabled['i']) ? '$1' : '<i>$1</i>',
'~\[u\](.+?)\[/u\]~i' => isset($disabled['u']) ? '$1' : '<span style="text-decoration: underline;">$1</span>',
'~\[s\](.+?)\[/s\]~i' => isset($disabled['s']) ? '$1' : '<del>$1</del>',
// A quote.  May or may not specify an author and/or link and date.
'~\[quote(?: author)?=&quot;(.{1,80}?)&quot;\](?:<br />)?~i' => isset($disabled['quote']) ? '<div>' : '<div class="quoteheader">' . $txt['smf239'] . ': $1</div><div class="quote">',
'~\[quote author=(.{1,80}?) link=(?:board=\d+;)?((?:topic|threadid)=[\dmsg#\./]{1,40}(?:;start=[\dmsg#\./]{1,40})?) date=(\d+)\](?:<br />)?~ei' => isset($disabled['quote']) ? '\'<div>\'' : '\'<div class="quoteheader"><a href="' . $scripturl . '?$2">' . $txt['smf239'] . ': $1 ' . $txt[176] . ' \' . timeformat(\'$3\') . \'</a></div><div class="quote">\'',
'~\[quote author=(.{1,80}?)\](?:<br />)?~i' => isset($disabled['quote']) ? '<div>' : '<div class="quoteheader">' . $txt['smf239'] . ': $1</div><div class="quote">',
'~\[quote\](?:<br />)?~i' => isset($disabled['quote']) ? '<div>' : '<div class="quoteheader">' . $txt['smf240'] . '</div><div class="quote">',
'~\[/quote\](?:<br />)?~i' => isset($disabled['quote']) ? '</div>' : '</div>',
// Size the font.  [size=large]HELLO![/size]
'~\[size=([\d]{1,2}p[xt]|(?:x-)?small(?:er)?|(?:x-)?large[r]?)\](.+?)\[/size\]~i' => isset($disabled['size']) ? '$2' : '<span style="font-size: $1;">$2</span>',
'~\[size=([\d])\](.+?)\[/size\]~i' => isset($disabled['size']) ? '$2' : '<font size="$1">$2</font>',
// Performat/justify text.  [center]Justifying is good.[/center]
'~\[pre\](.+?)\[/pre\]~i' => isset($disabled['pre']) ? '$1' : '<pre>$1</pre>',
'~\[left\](.+?)\[/left\]~i' => isset($disabled['left']) ? '$1' : '<div align="left">$1</div>',
'~\[right\](.+?)\[/right\]~i' => isset($disabled['right']) ? '$1' : '<div align="right">$1</div>',
'~\[center\](.+?)\[/center\]~i' => isset($disabled['center']) ? '$1' : '<div align="center">$1</div>',
// Teletyped text.  Monospace, in other words.
'~\[tt\](.+?)\[/tt\]~i' => isset($disabled['tt']) ? '$1' : '<tt>$1</tt>',
// Subscript and superscript.  6[sup]2[/sup] = 36.
'~\[sub\](.+?)\[/sub\]~i' => isset($disabled['sub']) ? '$1' : '<sub>$1</sub>',
'~\[sup\](.+?)\[/sup\]~i' => isset($disabled['sup']) ? '$1' : '<sup>$1</sup>',
// An email address. [email][email protected][/email]
'~\[email\](?:<br />)*(.+?)(?:<br />)*\[/email\]~ie' => isset($disabled['email']) ? '"$1"' : '"<a href=\"mailto:" . strtr("$1", array(":" => "&#58;", "\"" => "&quot;", "[" => "", "]" => "")) . "\">$1</a>"',
// Specify a specific font.  [font=Comic Sans]Blah![/font]
'~\[font=([\w,\-\s]+?)\](.+?)\[/font\]~i' => isset($disabled['font']) ? '$2' : '<span style="font-family: $1;">$2</span>',
// Colors.... [red]See?[/red]
'~\[color=(#[\da-fA-F]{3}|#[\da-fA-F]{6}|[\w]{1,12})\](.*?)\[/color\]~i' => isset($disabled['color']) ? '$2' : '<span style="color: $1;">$2</span>',
'~\[(black|white|red|green|blue)\](.+?)\[/\1\]~i' => isset($disabled['color']) ? '$2' : '<span style="color: $1;">$2</span>',
'~\[(chr|k)issy\](.+?)\[/\1issy\]~i' => isset($disabled['color']) ? '$2' : '<span style="color: #CC0099;">$2 :-*</span>',
// Lists... [list][*]First, ...[o]Second![li]THIRD!!![/li][/list]
'~\[list\](?:<br />)?~i' => isset($disabled['list']) || isset($disabled['li']) ? '' : '<ul style="margin-top: 0; margin-bottom: 0;">',
'~\[/list\](?:<br />)?~i' => isset($disabled['list']) || isset($disabled['li']) ? '' : '</ul>',
'~(?:<br />|&nbsp;|\s)*\[li\](.+?)\[/li\](?:<br />|&nbsp;|\s)*~i' => isset($disabled['list']) || isset($disabled['li']) ? '<br />$1<br />' : '<li>$1</li>',
// Horizontal rule. [hr] => ------------------.
'~\[hr(?:\s*/)?\]~i' => isset($disabled['hr']) ? '' : '<hr />',
// A break.  [br] or [br /]. (it makes no sense to disable this one :P.)
'~\[br(?:\s*/)?\]~i' => '<br />',
// Right-to-left and left-to-right strings.
'~\[(ltr|rtl)\](.+?)\[/\1\]~i' => isset($disabled['ltr']) || isset($disabled['rtl']) ? '$2' : '<div dir="$1">$2</div>',
// Acronyms and abbreviations... [acronym=Bulletin Board Code]BBC[/acronym]
'~\[abbr=((?:&quot;)?)(.+?)\\1\](.+?)\[/abbr\]~ie' => isset($disabled['abbr']) ? '"$3 ($2)"' : '"<abbr title=\"" . strtr("$2", array("\"" => "&quot;")) . "\">$3</abbr>"',
'~\[acronym=((?:&quot;)?)(.+?)\\1\](.+?)\[/acronym\]~ie' => isset($disabled['acronym']) ? '"$3 ($2)"' : '"<acronym title=\"" . strtr("$2", array("\"" => "&quot;")) . "\">$3</acronym>"',
// [me=Comment]does something[/me]
'~\[me=((?:&quot;)?)(.{1,80}?)\\1\](.+?)\[/me\](?:<br />)?~i' => isset($disabled['ftp']) ? '/me $3<br />' : '<div class="meaction">* $2 $3</div>',
// An email address they just typed in.  Don't match if there's already a mailto: or = before it.
'~(?<=[\?\s\xA0[\]()*\\\;>]|^)([\w\-\.]{1,80}@[\w\-]+\.[\w\-\.]+[\w\-])(?=[?,\s\xA0\[\]()*\\\]|$|<br />|&nbsp;|&gt;|&lt;|&quot;|&#039;|\.(?:\.|&nbsp;|\s|$|<br />))~i' => '<a href="mailto:$1">$1</a>',
'~(?<=<br />)([\w\-\.]{1,80}@[\w\-]+\.[\w\-\.]+[\w\-])(?=[?\.,\s\xA0\[\]()*\\\]|$|<br />|&nbsp;|&gt;|&lt;|&quot;|&#039;)~i' => '<a href="mailto:$1">$1</a>',
// This last one fixes spaces at the beginning of lines.
'~<br /> ~' => '<br />&nbsp;',
// Match a table... hopefully with everything in the right place.
'~\[table\](?:\s|\xA0|<br />|&nbsp;)*((?:\[tr\](?:\s|\xA0|<br />|&nbsp;)*\[td\]).*?(?:(?:\s|\xA0|<br />|&nbsp;)*\[/td\]\[/tr\])*)(?:\s|\xA0|<br />|&nbsp;)*\[/table\](?:\s|\xA0|<br />|&nbsp;)?~i' => '<table>$1</table>',
);

$codefromcache = array_keys($code_to_from);
$codetocache = array_values($code_to_from);

// GLOWING or /shadowed/ text.
$codefromcache[] = '~\[glow=([#\w]{3,12}),([012]\d{1,2}|\d{1,2})(,[^]]+)?\](.+?)\[/glow\]~i';
$codetocache[] = isset($disabled['glow']) ? '$4' : '<table border="0" cellpadding="0" cellspacing="0" style="display: inline; vertical-align: middle; font: inherit;"><tr><td style="filter: Glow(color=$1, strength=$2); font: inherit;">$4</td></tr></table> ';
$codefromcache[] = '~\[shadow=([#\w]{3,12}),(left|right|top|bottom|[0123]\d{0,2})\](.+?)\[/shadow\]~ei';
$codetocache[] = isset($disabled['shadow']) ? 'strtr(\'$3\', array(\'\\"\' => \'"\'))' : '\'<table border="0" cellpadding="0" cellspacing="0" style="display: inline; vertical-align: middle; font: inherit;"><tr><td style="filter: Shadow(color=$1, direction=\' . (isset($shadow_directions[\'$2\']) ? $shadow_directions[\'$2\'] : (int) \'$2\') . \'); font: inherit;">\' . strtr(\'$3\', array(\'\\"\' => \'"\')) . \'</td></tr></table> \'';

// Moving text... [move]stuff[/move]
$codefromcache[] = '~\[move\](.+?)\[/move\]~i';
$codetocache[] = isset($disabled['move']) ? '$1' : '<marquee>$1</marquee>';

// Handle flash.
$codefromcache[] = '~\[flash=(\d+),(\d+)\](?:<br />)*([^<>]+?)(?:<br />)*\[/flash\]~ie';
if (empty($modSettings['enableEmbeddedFlash']) || isset($disabled['flash']))
$codetocache[] = isset($disabled['url']) ? '"$3"' : '"<a href=\"" . strtr("$3", array("\"" => "&quot;")) . "\" target=\"_blank\">$3</a>"';
// Internet Explorer for Windows.
elseif ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'])
$codetocache[] = '"<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"$1\" height=\"$2\"><param name=\"movie\" value=\"" . strtr("$3", array("\"" => "&quot;")) . "\" /><param name=\"play\" value=\"true\" /><param name=\"loop\" value=\"true\" /><param name=\"quality\" value=\"high\" /><param name=\"AllowScriptAccess\" value=\"never\" /><embed src=\"" . strtr("$3", array("\"" => "&quot;")) . "\" width=\"$1\" height=\"$2\" play=\"true\" loop=\"true\" quality=\"high\" AllowScriptAccess=\"never\" /><noembed><a href=\"" . strtr("$3", array("\"" => "&quot;")) . "\" target=\"_blank\">$3</a></noembed></object>"';
// Anything else.
else
$codetocache[] = '"<embed type=\"application/x-shockwave-flash\" src=\"" . strtr("$3", array("\"" => "&quot;")) . "\" width=\"$1\" height=\"$2\" play=\"true\" loop=\"true\" quality=\"high\" AllowScriptAccess=\"never\" /><noembed><a href=\"" . strtr("$3", array("\"" => "&quot;")) . "\" target=\"_blank\">$3</a></noembed>"';
}

// Nothing to parse... ?
if (!strstr($message, '[') && !strstr($message, '://') && !strstr($message, '@') && !strstr($message, '/me') && !strstr($message, '&lt;'))
return;

$message = strtr($message, array('$' => '&#036;'));

// Replace <a href="something">somewhere</a> with HTML.
if (!empty($modSettings['enablePostHTML']) && strstr($message, '&lt;'))
{
$message = preg_replace('~&lt;a\s+href=(?:&quot;)?(?:\[url\])?((?:http://|ftp:/\|https://|ftps://|mailto:).+?)(?:\[/url\])?(?:&quot;)?&gt;(.+?)&lt;/a&gt;~ie', '\'<a href="$1">\' . preg_replace(\'~(\[url.*?\]|\[/url\])~\', \'\', \'$2\') . \'</a>\'', $message);

// Do <img ... /> - with security... action= -> action-.
preg_match_all('~&lt;img\s+src=(?:&quot;)?(?:\[url\])?((?:http://|ftp://|https://|ftps://).+?)(?:\[/url\])?(?:&quot;)?(?:\s+alt=(?:&quot;)?(.*?)(?:&quot;)?)?(?:\s?/)?&gt;~i', $message, $matches, PREG_PATTERN_ORDER);
if (!empty($matches[0]))
{
$replaces = array();
foreach ($matches[1] as $match => $imgtag)
{
// No alt?
if (!isset($matches[2][$match]))
$matches[2][$match] = '';

// Remove action= from the URL - no funny business, now.
if ($imgtag != preg_replace('~action(=|%3d)(?!dlattach)~i', 'action-', $imgtag))
$replaces[$matches[0][$match]] = '<img src="' . preg_replace('~action(=|%3d)(?!dlattach)~i', 'action-', $imgtag) . '" alt="' . $matches[2][$match] . '" border="0" />';

// Check if the image is larger than allowed.
if (!empty($modSettings['maxwidth']) && !empty($modSettings['maxheight']))
{
list ($width, $height) = url_image_size($imgtag);

if ($width > $modSettings['maxwidth'] || $height > $modSettings['maxheight'])
{
if ($width > $modSettings['maxwidth'] && !empty($modSettings['maxwidth']))
{
$height = floor($modSettings['maxwidth'] / $width * $height);
$width = $modSettings['maxwidth'];
if ($height > $modSettings['maxheight'] && !empty($modSettings['maxheight']))
{
$width = floor($modSettings['maxheight'] / $height * $width);
$height = $modSettings['maxheight'];
}
}
else
{
if ($height > $modSettings['maxheight'] && !empty($modSettings['maxheight']))
{
$width = floor($modSettings['maxheight'] / $height * $width);
$height = $modSettings['maxheight'];
}
}
}

// Set the new image tag.
$replaces[$matches[0][$match]] = '<img src="' . preg_replace('~action(=|%3d)(?!dlattach)~i', 'action-', $imgtag) . '" width="' . $width . '" height="' . $height . '" alt="' . $matches[2][$match] . '" border="0" />';
}
elseif (strpos($matches[0][$match], '[url]') !== false || substr($matches[0][$match], 0, 4) == '&lt;')
$replaces[$matches[0][$match]] = '<img src="' . preg_replace('~action(=|%3d)(?!dlattach)~i', 'action-', $imgtag) . '" alt="' . $matches[2][$match] . '" border="0" />';
}

$message = strtr($message, $replaces);
}
}

// Do the code if necessary.
if (strstr($message, '[') || strstr($message, '://') || strstr($message, '@') || strstr($message, '/me'))
{
$shadow_directions = array('left' => '270', 'right' => '90', 'top' => '0', 'bottom' => '180');

$message = preg_replace($codefromcache, $codetocache, $message);

// Tables need to be done twice or they won't work properly.
if (strpos($message, '<table>') !== false)
{
for ($i = 0; $i < 2; $i++)
$message = preg_replace(
array(
'~((?:<table>|</tr>|\[/tr\])(?:\s|\xA0|<br />|&nbsp;)*(?:<tr>|\[tr\])|</td>|\[/td\])(?:\s|\xA0|<br />|&nbsp;)*\[td\](?:\s|\xA0|<br />|&nbsp;)*(.*?)(?:\s|\xA0|<br />|&nbsp;)*\[/td\](?:\s|\xA0|<br />|&nbsp;)*((?:</tr>|\[/tr\])(?:\s|\xA0|<br />|&nbsp;)*(?:<tr>|\[tr\]|</table>)|<td(?: valign="top")?>|\[td\])~i',
'~(<table>|</tr>|\[/tr\])(?:\s|\xA0|<br />|&nbsp;)*\[tr\](?:\s|\xA0|<br />|&nbsp;)*(.*?)(?:\s|\xA0|<br />|&nbsp;)*\[/tr\](?:\s|\xA0|<br />|&nbsp;)*(</table>|<tr>|\[tr\])~i'
),
array(
'$1<td valign="top">$2</td>$3',
'$1<tr>$2</tr>$3'
), $message
);
}
}

// Enable Basic HTML?
if (!empty($modSettings['enablePostHTML']) && strstr($message, '&lt;'))
{
// b, u, i, s, pre... basic tags.
$closable_tags = array('b', 'u', 'i', 's', 'pre', 'blockquote');
foreach ($closable_tags as $tag)
{
$opens = substr_count($message, '&lt;' . $tag . '&gt;');
$closes = substr_count($message, '&lt;/' . $tag . '&gt;');
$message = str_replace(array('&lt;' . $tag . '&gt;', '&lt;/' . $tag . '&gt;'), array('<' . $tag . '>', '</' . $tag . '>'), $message);

if ($closes < $opens)
$message .= str_repeat('</' . $tag . '>', $opens - $closes);
}

// <br /> should be empty.
$empty_tags = array('br');
foreach ($empty_tags as $tag)
$message = str_replace(array('&lt;' . $tag . '&gt;', '&lt;' . $tag . '/&gt;', '&lt;' . $tag . ' /&gt;'), '<' . $tag . ' />', $message);
}
}


Title: Re: Custom BB Code
Post by: Anguz on September 04, 2005, 03:48:58 PM
Faster Parsecode didn't install. That's the original function's code. That's why this mod doesn't install.
Title: Re: Custom BB Code
Post by: modtang on September 04, 2005, 07:30:44 PM
IRC BBcode

irc <a href="$1" target="_blank">$1</a>

[irc]irc://server:channel.etc.[/irc]

Allows linking to IRC servers and/or channels.
Title: Re: Custom BB Code
Post by: ivo2296 on September 05, 2005, 07:41:51 PM
Quote from: Anguz on September 04, 2005, 03:48:58 PM
Faster Parsecode didn't install. That's the original function's code. That's why this mod doesn't install.

I hope you are right - to me shows installed?!?
How should i proseed?
Title: Re: Custom BB Code
Post by: Anguz on September 05, 2005, 10:49:41 PM
It shows installed cause you hit proceed when installing although it most probably gave a failure in the step it has. Just "uninstall" and it'll give failure, but proceed anyway. Then try installing it again and fix any issue until you get a success in the installation preview before hitting proceed. Then you can install other mods that require Faster Parsecode.
Title: Re: Custom BB Code
Post by: ivo2296 on September 07, 2005, 04:04:33 AM
Thnaks a lot!!!!
Title: Re: Custom BB Code
Post by: Washi on September 23, 2005, 01:06:02 AM
I just installed this mod, and it's fab! I have one question though... How can I add a button for the new bbcode on the posting interface? Thanks for this, it rocks!
Title: Re: Custom BB Code
Post by: Anguz on September 23, 2005, 02:30:24 PM
You need to edit Post.template.php in your theme. If I update this mod for 1.1 when it reaches final, I have to remember to try and add a simple way to have a new button in the post form.
Title: Re: Custom BB Code
Post by: Washi on September 23, 2005, 03:20:54 PM
Believe me, when I used to use phpBB, it took me about 6 hours of coding to get this bit of extra bbcode, so anything you think of rocks. :D
Title: Re: Custom BB Code
Post by: Anguz on September 23, 2005, 07:42:29 PM
Glad you liked the mod. :)
Title: Re: Custom BB Code
Post by: Washi on September 24, 2005, 10:44:31 AM
Quote from: Anguz on September 23, 2005, 07:42:29 PM
Glad you liked the mod. :)

Just to let you know, I added the button I needed in record time... about one minute or less. :D
Title: Re: Custom BB Code
Post by: Anguz on September 24, 2005, 04:51:28 PM
:)
Title: Re: Custom BB Code
Post by: Washi on October 21, 2005, 07:52:08 PM
I wanted to ask you something though. Are you going to make this compatible with 1.1 RC 1? People on one of the boards I host just keep moaning about the blockquote code.
It was a phpBB board, and it wouldn't let me switch to 1.0.5, and would only do it from 1.1 RC. So, I'm kinda stuck ATM, unless I try to downgrade it to 1.0.5, which I have no idea how to do... Hmm, I should look into it though. I'm babbling.
My question remains: are you going to update this great mod for 1.1 RC 1, or wait until the final version is up? Thank you.
Title: Re: Custom BB Code
Post by: Anguz on October 23, 2005, 02:44:46 AM
I'm gonna wait for 1.1 Final to update my mods for 1.1.

I didn't get the part where you mention the blockquotes.
Title: Re: Custom BB Code
Post by: Synn on December 09, 2005, 03:43:10 PM
Hello,

Very new to all the bb coding....but this seems like a great mod. Not quite sure I'm following though, now that it's installed will I be able to use something like...

<script src="http://somewhere.com"></script> ???
And if so what code will actually go into the forum post?

Sorry for all the newbie questions.
Title: Re: Custom BB Code
Post by: Anguz on December 09, 2005, 06:12:16 PM
For your example it'd be something like this
script <script src="$1"></script>
and used like this
[script]http://somewhere.com[/script]

You should consider carefully, though, the security issues that the code you enable could cause.
Title: Re: Custom BB Code
Post by: solid0207 on January 13, 2006, 11:06:16 PM
Is it work on RC2 ????????!!!!!!!!???????????

I can't install it (CustomBBCode104_SMF105)


The package you tried to upload either is not a valid package or has become corrupted.
Title: Re: Custom BB Code
Post by: Washi on February 02, 2006, 06:24:15 PM
Anguz, does this work for 1.0.6? Or are there any changes to be made to the code?
Title: Re: Custom BB Code
Post by: Anguz on February 02, 2006, 07:58:36 PM
It should, but the installer may be restricted to version 1.0.5. You can remove it in package-info.xml or wait for me to do it.
Title: Re: Custom BB Code
Post by: yeahimsteve on February 11, 2006, 03:46:51 PM
Ok, since nobody can use this mod who upgrades their board until you come out with an updated version (mostly because of the fast parser incompatibility), I was wondering if you could help me manually with this ONE tag that I need, and then I'll never bother you again.  Plus, other's will start using the tag more often I'm sure. ;)

Its the [ snapback ] tags, that IPB uses in quotes, that isn't available by default with SMF as you probably know.  For those that aren't aware, the snapback tags function in Invision Power Board allows the user to click a little button below a quote, which will send them to the original post.  The code that IPB uses for the snapback is as follows:

<a href="index.php?act=findpost&pid={content}"><{POST_SNAPBACK}></a>

Now, seeing as though I have no admin panel because this mod won't work yet, what file do I edit, and what do I paste?  How far off is the code that I pasted?  Anybody?   :-*
Title: Re: Custom BB Code
Post by: Anguz on February 11, 2006, 04:51:42 PM
This is not something that you could do with this mod anyway.

Quote from: yeahimsteve on February 11, 2006, 03:46:51 PM
For those that aren't aware, the snapback tags function in Invision Power Board allows the user to click a little button below a quote, which will send them to the original post.

Try clicking on the quote's header link.
Title: Re: Custom BB Code
Post by: yeahimsteve on February 11, 2006, 06:30:14 PM
What do you mean I couldn't use this mod for that?  Surely I could?  It's a snapback tag...and there's code for it.  The code I pasted in my last post was straight from the IPB "custom bbcode" section......
By default, every quote from IPB contains these tags at the bottom.....
It definitely IS bbcode though, and it's totally possible........I'm just an idiot when it comes to coding.

Here, check out my more detailed problem here, because I know you can help me........you are one smart dude:

http://www.simplemachines.org/community/index.php?topic=70743.0

Heck, even if the bbcode just makes whatever is between [snapback] tags completely blank....
Title: Re: Custom BB Code
Post by: Anguz on February 12, 2006, 02:43:54 AM
From the other topic I understood better what your problem is. You have all these unparsed tags in your messages.

Well, SMF doesn't use snapback tags cause the information is in the quote tags, like when you click on the quote button of a message, and the header of that quote will have a link to the original post.

Now, to remove the snapback tags, you could add a tag using this mod, Custom BB Code, that simply replaces the tag and what's enclosed, with nothing. The thing will still be in the database, but not displayed.

Doesn't the SMF converter use this snapback info in quotes to add to the quote's header? If not, it'd be good to mention it in the converters board so that it gets looked into.
Title: Re: Custom BB Code
Post by: yeahimsteve on February 12, 2006, 05:01:14 AM
Quote from: Anguz on February 12, 2006, 02:43:54 AM
Now, to remove the snapback tags, you could add a tag using this mod, Custom BB Code, that simply replaces the tag and what's enclosed, with nothing. The thing will still be in the database, but not displayed.

Yes, this is what I suggested in my last post (last sentence).  Like I said, I cannot use your mod because it's not compatible with RC2. 

Can you please tell me how I can add this custom tag to make it display as blank....... manually?  Or better yet, can you tell me what the mysql query command would be to remove everything in the database that says: [right][snapback]any-number-here[/snapback][right]?
Title: Re: Custom BB Code
Post by: Anguz on February 12, 2006, 02:43:20 PM
Sorry, I won't try my luck with the query. And the mod will not be updated to 1.1 until it reaches final. You can go to the file Subs.php in the Sources directory of your SMF, open it and look for the function do_bbc, IIRC, and read it. You may get the idea of how it works and figure how to write the new tag.
Title: Re: Custom BB Code
Post by: redaccion on February 21, 2006, 05:33:28 PM
do you have any idea for when can preparate for 1.1 RC2 ???

   Thank's man...
Title: Re: Custom BB Code
Post by: Anguz on February 22, 2006, 12:36:00 AM
I won't update my mods for 1.1 until it reaches Final.
Title: Re: Custom BB Code
Post by: redaccion on February 22, 2006, 08:13:53 AM
Quote from: Anguz on February 22, 2006, 12:36:00 AM
I won't update my mods for 1.1 until it reaches Final.

Thankyou ;) ;) ;)
Title: Re: Custom BB Code
Post by: Dr. Jones on April 05, 2006, 01:22:04 AM
Is there going to be a 1.0.7 update for this mod?  I've tried hacking it to work with 1.0.7 but I can't seem to get it to work (the Faster Parsecode mod gave me trouble too, but I've finally got it installed now)... thanks!
Title: Re: Custom BB Code
Post by: aaho on August 23, 2006, 07:03:35 AM
can you please update it now for 1.1 RC2 or RC3
Title: Re: Custom BB Code
Post by: ltdeta on January 03, 2007, 08:03:14 AM
Quote from: Anguz on February 22, 2006, 12:36:00 AM
I won't update my mods for 1.1 until it reaches Final.

We have 1.1 Final  ;)
Title: Re: Custom BB Code
Post by: babjusi on February 09, 2007, 04:47:17 PM
Will this mod be updated for the latest version, 1.1.1. Thank u
Title: Re: Custom BB Code
Post by: choloman05 on June 01, 2007, 01:27:12 PM
Latest is not 1.1.2 and now I'm eye-ing this mod. Looks great.
Title: Re: Custom BB Code
Post by: SneakyWho_am_i on July 23, 2007, 12:14:20 AM
Lol... Latest is now 1.1.3, maybe I'm just not looking hard enough but I would love to find this mod ready to go somewhere....
Also if development does ever restart, I would like to see permissions for the bbcode (I fear it's too much to ask?) so that say, I can introduce a certain tag for registered members, and then create a second and more dangerous/powerful one for gmods? Then we could have:
"Only forum staff may post flash in the forums" for example, although flash isn't what i want it for. I want it because the handling of tables and lists in 1.1.3, and the handling of formatting opptions after say, line breaks and bullet points, makes me feel a bit uneasy in the stomach and it would take a very, very long time for gmods to do in bbcode what I can do with fairly safe html.

OH GEE WHIZ, I can't shut up. Too much alcohol. Just see for yourself what damage we managed to do with nothing other than the standard bbcode (with a modbreak tag at the end as a joke...):

http://www.sneakywhoami.com/smf/index.php/topic,37.0.html

Although I can see myself using malformed bbcode to create adspace above and beside forum posts.... Could be a sneaky revenue source...
Title: Re: Custom BB Code
Post by: TrueSatan on July 23, 2007, 04:22:24 AM
@ Itdeta, babjusi, choloman05 and SneakyWho_am_i

Please consider using the following mod instead...active developer and works with current and recent versions of SMF.

http://custom.simplemachines.org/mods/index.php?mod=621 (http://custom.simplemachines.org/mods/index.php?mod=621)
Title: Re: Custom BB Code
Post by: choloman05 on September 09, 2007, 11:26:10 PM
TrueSatan, you are great as usual. Thanks bud.
Title: Re: Custom BB Code
Post by: TrueSatan on September 10, 2007, 05:40:19 AM
It's a pleasure...and maybe we could put together a list of codes for it on SMF Helper...might be an idea don't you think?
Title: Re: Custom BB Code
Post by: bigjoe11a on October 21, 2007, 08:15:22 PM
I never have done this before. How do you add BBC codes in. I didn't know that was the case. Or is there an easy way to add BBC codes.

Thanks
Title: Re: Custom BB Code
Post by: bigjoe11a on October 26, 2007, 08:57:01 PM
Can any one give me some samples please

Like
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Furl%2Fimage.jpg&hash=c839dee2813ca3b7c2c79527b7088a39b24c107c)
http://url (http://url)

what commands do you put in and in what boxes so that I can add these options to my forms.

Tag Name
Description
Tag type
Parse enclosed BBCode
Trim whitespace
Block level

The HTML used for the tag
<tag>{content}</tag>
<tag alt={option}>{content}</tag>

What information so I add in the labels above to create a BBC



Thanks
Title: Re: Custom BB Code
Post by: falguni1 on December 28, 2007, 10:46:36 AM
where to get updated version.
Title: Re: Custom BB Code
Post by: TrueSatan on December 28, 2007, 09:33:32 PM
Didn't you read my post #147 above?
Title: Re: Custom BB Code
Post by: jimvy on June 30, 2008, 12:43:17 AM
How can I make this so when someone puts [village]###|###[/village] it will search my village table for those numbers, the first 3 numbers in the X column and the last 3 in the Y column, then to get the village ID number and make the bbcode when clicked go to http://en4.tribalwars.net/staemme.php?&screen=info_village&id=insert village ID here.

When someone puts [player]player name[/player] it will search my player table for that name, then get the player ID number and make the bbcode when clicked go to http://en4.tribalwars.net/staemme.php?&screen=info_player&id=insert player ID here.

When someone puts [ally]player name[/ally] it will search my ally table for that name, then get the ally ID number and make the bbcode when clicked go to http://en4.tribalwars.net/staemme.php?&screen=info_ally&&id=insert ally ID here.
Title: Re: Custom BB Code
Post by: SerbiaDDL on January 16, 2010, 10:11:02 AM
I have problem

when i start massage with custom BBCode i got error the message body was left empty

How fix?