News:

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

Main Menu

Custom BBCode

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

Previous topic - Next topic

dakpluto

I got hit with an "unexpected T_Variable in line 98" in Modifications.english.php:

$txt['customBBCode_tabtitle'] = 'Custom BBC';

Beagleboys

Hi guys,
just installed the mod and i don't get the image for my custom bbc button.
The genrate address for the image is:
http://www.aviaonline.it/public/smf/Themes/default/images/bbc/.gif
I get this error:
8: Undefined index: imageFile: /web/htdocs/www.aviaonline.it/home/public/smf/Themes/default/GenericControls.template.php (main sub template - eval?)
Line: 114

and that is the line:
114: sImage: ', JavaScriptEscape($settings['images_url'] . '/bbc/' . $tag['image'] . '.gif'), ',

Eliana Tamerin

You need to put a gif image with the same name as the BBC into the /public/smf/Themes/default/images/bbc/ folder.

So, for instance, you need to create an image, save it as a GIF and call it imageFile. Then upload it so that this url works properly: http://www.aviaonline.it/public/smf/Themes/default/images/bbc/imageFile.gif

That should work.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Beagleboys

Quote from: Eliana Tamerin on November 17, 2009, 07:30:35 PM
You need to put a gif image with the same name as the BBC into the /public/smf/Themes/default/images/bbc/ folder.

So, for instance, you need to create an image, save it as a GIF and call it imageFile. Then upload it so that this url works properly: http://www.aviaonline.it/public/smf/Themes/default/images/bbc/imageFile.gif

That should work.
i know. but the system search for a pix named only ".gif" not for anet.gif... thats the problem

digger

Quote from: Beagleboys link=topic=154997.msg2363499#msg2363499
i know. but the system search for a pix named only ".gif" not for anet.gif... thats the problem

I have this problem with this mod and RC2 too.

Indy74

Quote from: digger on November 18, 2009, 08:14:43 AM
I have this problem with this mod and RC2 too.

Same here. Can't find what line to modify in order to make it work.

ElvenCat

Quote from: Beagleboys on November 18, 2009, 04:20:23 AM
i know. but the system search for a pix named only ".gif" not for anet.gif... thats the problem

Any solution to this yet? Same problem here. Worked perfectly in RC1

Arantor

The editor was overhauled in RC2. The mod will need a fair amount of update to make it work.
Holder of controversial views, all of which my own.


xmouvelianx

Can anyone tell me the html tag for a CSS bbcode?
I tried finding it everywhere but to no avail...

Arantor

What would a CSS bbcode do, exactly?
Holder of controversial views, all of which my own.


KensonPlays

This I would love in RC2 of 2.0! I used to use a free host for a phpBB forum, and they had something built in to make custom BBcodes.

I would either like this mod for 2.0RC2, or a new one specifically made for 2.0???

Owner of Mesozoic Haven

Arantor

Would be a rewrite of big chunks for 2.0 RC2 and up.
Holder of controversial views, all of which my own.


KensonPlays

Would it be easier to make a new mod for 2.0?

Owner of Mesozoic Haven

Arantor

Probably, actually. But such mods are always limited because there are so many things that can be done with bbcode items that simply cannot be done with something like this.

You couldn't implement my dice roller mod in this, for example.
Holder of controversial views, all of which my own.


KensonPlays

Well, all I would need is something simple, to add text/url, etc bbcodes, nothing like your dice BBcode.
in the phpBB one, you added the HTML you wanted, and if you did it right, you have a custom BBcode!

Owner of Mesozoic Haven

Arantor

As you've found there is such a mod for 1.1.x. But no-one is interested in updating it, and that's partly because it is actually very limited as a result :(
Holder of controversial views, all of which my own.


Eliana Tamerin

This seems to work for me, even with the bbc images.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Garou

#197
Adding BBC to SMF isn't that hard in fact its one of the first things I learned when I started coding for it.

You can also take a look at my mods for Quote Source just adds a new BBC code and  World of Warcraft tooltips adds the code and a button.

Primarily you need only to edit one file to add the code  ./Sources/Subs.php
Look for the section that starts with
array(
'tag' => 'center',

and ends with...
array(
'tag' => 'white',
'before' => '<span style="color: white;" class="bbc_color">',
'after' => '</span>',
),


These are the codes that already exist in SMF and should give you a decent idea of how to add the BB code you want.

If you want to add a button to the message editor look at ./Sources/Subs-Editor.php
Look for the section that begins with
// The below array makes it dead easy to add images to this control.
Look at how everything else is entered there and its even easier then adding the code.

If you want to have text description when a user hovers their mouse over the button then you will need to add a description in ./Themes/default/languages/Modifications.english.php

Muldoon

Hi, I am having issues installing my Ad Management mod after installing Custom BB Code.  I initially had it installed when I was running SMF 1.1.10 and Tiny Portal v0.9.8 along with the Ad Management mod, however I just upgraded to SMF 1.1.11 tonight.  However, prior to upgrading I uninstalled both Custom BB Code and Ad Management mod.

Now after successfully upgrading to SMF 1.1.11 I went ahead and installed Custom BB Code. It said it installed successfully, HOWEVER, under Features and Options there is absolutely no 'Custom BB Code' tab.  I'd like to figure this out, however I want to just simply uninstall it at this time as it is more important for me to have the Ad management mod installed.  And when I attempt to install the Ad Management Mod it gives me an error with the Display.template.php file so I am unable to install the mod.  Now, I know the Custom BB Code is causing this error, because prior to installing the Custom BB Code mod I was able to successfully install and uninstall the Ad Management mod.  The reason I uninstalled it was because I received the same error when attempting to install the Custom BB Code mod AFTER the Ad Management mod.

However, when I attempt to uninstall the Custom BB Code mod, I continue to get an error that test failed for the following files:

    Delete File     ./Sources/CustomBBCode.php     
2.    Execute Modification    ./Sources/ModSettings.php    Test failed
3.    Execute Modification    ./Sources/Subs.php    Test failed
4.    Execute Modification    ./Themes/default/Post.template.php    Test failed
5.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test failed

And I've made sure all these files are 777


What can I do to fix this???  I am very nervous right now and could really use some sound advice.  Thank you.

Garou

The best advice I could give you is to use the parser on the downloads page and compare those changes to your files. Either add the missing code or remove the code that is there manually.

Advertisement: