Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Custom BBCode

Started by Sarke, March 03, 2007, 02:40:26 PM

Previous topic - Next topic


Is it possible to use php code in the custom BBC?
I'm not great with PHP so I can't make my own BBC code outside this (currently, but i'll learn if i have to)
Right now I'm trying to make a BBC code which checks a user's status as a member, and if they're not logged in they can't read the {content} in the BBC code, and if they are logged in, they can.

Is that possible???
MotiveighT Music Forum: Assistance for Bands, Free music for fans.

Get MotiveighTed, Join The Revolution


It's not possible with this mod as it is.

My MODs          Please don't PM me for support, post in the appropriate topic.


Should this mod work with SMF 1.1.3?  I tried to download it thru the Packages tool, and it gave me an error message.  I uninstalled it, reinstalled it, and it seemed to take, but when I go to find the tab to create a new code, there's just a small space between Layout & Options and Karma, but it can't be clicked.

When I manually put index.php?action=featuresettings;sa=custombbc, I can see the option to add a new tag, but when I click on it I get a page that has no labels for its text fields and menus, plus about six or seven error codes in my log.


I was just going to ask if it was compatible with 1.1.3, as i need a [mod][/mod] bb code. looks like i got my answer from the post above ^ lol


Yes it is compatable with 1.13 , i am using it very successfully on my forum


Should I post the error codes that are showing up in my log?


my friend the problem is simply with your language file.....

a way to make it appear is to download the modoifications.english.php with the utf8 format and upload it....

or the shortcut could be just go to ur server settings and change the language to english.php


Ahhhh....took me a while to understand what you were talking about, but here's how I fixed it in case anyone else needs help later:

go to modifications.english.php and copy the contents into modifications.english-utf8.php and save.


Ok, new problem....I can't get the Custom BBC to do what I want  :(

Here's the idea:
There's a mod where I added/tweaked the following in my subs.php:

'tag' => 'tex',
'type' => 'unparsed_content',
'content' => '<img src="$1" />',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
  'disabled_content' => '($1)',

and put the mimetex.cgi in my cgi-bin directory, so if I type

[tex]c=\sqrt{a^2 + b^2}[/tex] my users will see

I wanted to create a set of buttons that would allow users to create custom equations, similar to what you find at [nonactive]

I tried creating the custom code [math] so that I could have a custom button:
Tag type  [tag]{content}[/tag]   
Parse enclosed BBCode: no parsing
Trim whitespace: inside    
Block level: unchecked
HTML: <img src=" [nonactive]" />

but when I tried to use it all I would see is [math]{content}[/math] in the post, instead of the pretty equation.  I tried playing with some of the options, but if anyone can quickly see my problem I'd appreciate any pointers!



Never mind...I figured out how to directly edit the post.template.php file, so I can do what I need to do w/o going thru the custom bbc mod.

Richard Wing

This is such a great MOD and very very close to what I am needing.

I do have a question and maybe someone can offer a suggestion or solution.

My question is....

Can I use php code so that I can display specific user data of the logged in viewer who is reading the post?

I would like to create personalization tags and I would set them as admin permission so that only I can use certain tags (I have a bbc permission mod)

For instance I might write a news post and address it to [FNAME] within the post and when Joe reads it he sees his name and Sue reads it she sees her name.

If this isnt set up to use php in that html area of the mod can someone add in a option so that we may fill in one form or the other (html or php).

Next I would like to say that the suggestion for people to share their creative ways they are using the custom bbc mod is great and would be awesome if more would post their bbc buttons.

Lastly can someone post here any php code snippet examples of what I would use when a php option comes available for me to create a first name, last name, and username tag?

Hopefully I can see and understand from those examples how to create more userdata tags

Thanks again for a great mod and I appreciate any assistance anyone can offer.

Richard Wing

Richard Wing

I forgot to ask...

In the Tag Type drop down would I just create the tags I want using the plain [tag] option to print user data in place of that tag.

Also another comment. once we can use php for these tags we could create some really cool self updating posts.. the possibilities are endless.

Next I hope there is a messaging mod to be able to do this with the PM system.

Thanks again.
Richard Wing


Hello There!
Should this mod work with SMF 1.1.4 ?



Sarke , this mod can work in smf 1.1.4?


It is advisable for you to have a spare test forum to try things out on prior to putting them on your main forum and had you had one you could have simply tried the mod for yourself and answered your own works perfectly on SMF 1.1.4


I downloaded this MOD and installed it. Well How do I add BBC code. Can some one please HELP. How and what do I enter. Or is there a mod that already has them in.

SMF Forums Where gamers go.

Richard Wing

I will pay to have this mod so that it will also allow for php when making the bbc codes since now it only allows you to use html.


Richard Wing

Richard Wing

I have added many tags. How do I get them to move down to the next row on the editor. Every tag I add adds it to the end of the same row and its creating a scroll bar at the bottom of the browser.

Would anyone know how to fix that?

Richard Wing


QuoteTo add a button to a custom tag, enable the "Add button" option for the tag,

where exactly i shooed enable this?


Can it be for only admins/moderators?