News:

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

Main Menu

Color & BgColor Clickable BBCode Bar

Started by burtybob, June 03, 2008, 04:14:15 AM

Previous topic - Next topic

burtybob

Link to Mod

COLOR & BGCOLOR BBCODE BAR v3.3

Introduction
This modification adds a cool clickable color bar to the post & quick reply areas which can insert [color] and [bgcolor] tags.  The drop down color bar is removed as the bar makes it redundant.

Installation
Installs automatically on Default theme.
Manual edits will be required to install this on other themes.

After install you may need to Ctrl + F5 to force your browser to update your themes css stylesheet.

Languages
o English/English-Utf8
o English_British/English_British-Utf8
o French/French-Utf8 (Thanks to @ngel)
o Turkish-Utf8 (Thanks to Kapadokyali) Support Topic
o Brazilian/Brazilian-Utf8 (Thanks to Softcore)
o Dutch/Dutch-Utf8 (Thanks to Milly)
o German/German-Utf8 (Thanks to BigRandalo)
I'd appreciate any translations for more languages, please pm me them or post them in the mods topic.

Support
Please use the modification thread for support with this modification.
(Please don't ask me to do the edits for you)

Turkish Support Topic

Customising
o The color bar should fit in with almost any skin without any need for customizing, but should you want to
o Customizing the CSS:
- Use the following css classes: .colorbar, .colorcell, .colorbox, .colorboxspacer
o Customise the JS:
- To change the no. of shades per color, alter the cpm variable in the color.js file (default 26) (not recommended)

Changelog
3.0 - 10th August 2007
o Now complies with SMF standards for coding
o Language strings now taken from the language files for easier translation
3.1 - 27th September 2007
o Added Brazilian UTF-8 support (Thanks to Softcore)
3.2 - 9th October 2007
o Added Dutch/Dutch(UTF-8) support (Thanks to Milly)
3.3 - 20th October 2007
o Added German/German-Utf8 (Thanks to BigRandalo)
o Added English_British/English_British-Utf8
o Ensured all supported languages have utf-8 and non-utf8 versions
3.3.1 - 31st May 2008
o Burtybob has taken over the developement of this project with Karls permission and Burtybob wishes to thank Karl for the allready great mod this is :D
If your support topic does not have a link i will NOT assist you.
A link is easy to add AND is a massive help very often.
And a login account would be usefull even if its only pass and user =demo and its a normal account its not hard to add those two pieces of information.

I will do edits for you but not for free :) time costs money.

Apllicmz

nice work
update portuguese

<file name="$languagedir/Modifications.portuguese.php" error="skip">
<operation>
<search position="end"><![CDATA[]]></search>
<add><![CDATA[
$txt['yourtexthere'] = 'Seu texto aqui';
$txt['insert'] = 'Inserir';
$txt['changetoinsertcolor'] = 'Mude para inserir o código da COR';
$txt['changetoinsertbgcolor'] = 'Mude para inserir o código da COR DO FUNDO';
$txt['switchbetween'] = 'Selecionar COR/COR DE FUNDO';
$txt['insertlastclicked'] = 'Inserir cor selecionada (pelo clique)';
$txt['insertlasthovered'] = 'Inserir cor selecionada (pelo mouse)';
]]></add>
</operation>
</file>

<file name="$languagedir/Modifications.portuguese-utf8.php" error="skip">
<operation>
<search position="end"><![CDATA[]]></search>
<add><![CDATA[
$txt['yourtexthere'] = 'Seu texto aqui';
$txt['insert'] = 'Inserir';
$txt['changetoinsertcolor'] = 'Mude para inserir o c&oacute;digo da COR';
$txt['changetoinsertbgcolor'] = 'Mude para inserir o c&oacute;digo da COR DO FUNDO';
$txt['switchbetween'] = 'Selecionar COR/COR DE FUNDO';
$txt['insertlastclicked'] = 'Inserir cor selecionada (pelo clique)';
$txt['insertlasthovered'] = 'Inserir cor selecionada (pelo mouse)';
]]></add>
</operation>
</file>



burtybob

thank you Joomlamz :D for both the compliment and the translation :D
If your support topic does not have a link i will NOT assist you.
A link is easy to add AND is a massive help very often.
And a login account would be usefull even if its only pass and user =demo and its a normal account its not hard to add those two pieces of information.

I will do edits for you but not for free :) time costs money.

MissyNL

hello,

do you have a screenshot of what it's going to look like?  thanks!
Sorry for my poor English, but i think it's probably better then your Dutch :)

burtybob

#4
I have added Karls ones :D, if you get any better ones feel free to email them to me at [email protected].
Thanks
If your support topic does not have a link i will NOT assist you.
A link is easy to add AND is a massive help very often.
And a login account would be usefull even if its only pass and user =demo and its a normal account its not hard to add those two pieces of information.

I will do edits for you but not for free :) time costs money.

RustyBarnacle

This works fine for most of my users.  But I have 2 that say they only see a white box and a black box, no color stripe.

Any ideas?

burtybob

The only thing i can think of is that if it is a new install then they may need to force the browser to refresh the css by doing ctrl+F5, ask them to try that.
Do you have any other themes installed?
If so it may be that the themes have their own post.template.php and thats what the problem is if the 2 users are using different to the default theme.

Failing those 2 the only things i can think of are re-installing the MOD and seeing if that works :), sorry about hearing the problems are there but i can not think why it would work for most people but not 2.
Thanks,
Burtybob
If your support topic does not have a link i will NOT assist you.
A link is easy to add AND is a massive help very often.
And a login account would be usefull even if its only pass and user =demo and its a normal account its not hard to add those two pieces of information.

I will do edits for you but not for free :) time costs money.

RustyBarnacle

I'll try the CtlF5

One person said the problem just went away so could thats a definite could be.

Thanks

burtybob

No worries then :D, like i said it is kinda weird that most dont but a couple do :D, so if that works do please let me know so that if it happens again in the future there is a answer to it :D.
If your support topic does not have a link i will NOT assist you.
A link is easy to add AND is a massive help very often.
And a login account would be usefull even if its only pass and user =demo and its a normal account its not hard to add those two pieces of information.

I will do edits for you but not for free :) time costs money.

RustyBarnacle


msPaula

I installed it and it works great even on a non-default theme with very little edits needed. My members love it but I am now getting request for them to be able to set a default color that they would use in most posts. I have added 2 fields to the user settings table in the database but can not seem to find where and what to write the values to. The idea is in there profile page they would have to enter the hex value for the color they want then when they log in I would get the values from the data base and set the color bar.

Can anyone help me out here?


Thanks in advance

Paula

LLStarks

Is there any way to get this mod working on SMF 2.0?

burtybob

Quote from: LLStarks on July 01, 2008, 09:53:50 PM
Is there any way to get this mod working on SMF 2.0?

Im working on it, i thought the changeing would be easy but little things here and there keep creeping up that put a holt to it and i have to revise the changes.
Do my best to get it done tonight :D
If your support topic does not have a link i will NOT assist you.
A link is easy to add AND is a massive help very often.
And a login account would be usefull even if its only pass and user =demo and its a normal account its not hard to add those two pieces of information.

I will do edits for you but not for free :) time costs money.

LLStarks

At the moment, I have bits and pieces of the mod working in SMF 2.0 since I applied the code manually. Other than a desire for WYSIWYG support, I need to figure out how to get bgcolor up and running.

burtybob

#14
Quote from: LLStarks on July 02, 2008, 04:51:35 PM
At the moment, I have bits and pieces of the mod working in SMF 2.0 since I applied the code manually. Other than a desire for WYSIWYG support, I need to figure out how to get bgcolor up and running.

Simple Question but there was no support in the current upload release for 2.0 as far as i can remember and i mean completyl and utterly Zip Zero Nada, so what files did you edit?
If your support topic does not have a link i will NOT assist you.
A link is easy to add AND is a massive help very often.
And a login account would be usefull even if its only pass and user =demo and its a normal account its not hard to add those two pieces of information.

I will do edits for you but not for free :) time costs money.

LLStarks

Like I mentioned, I uploaded all the relevant files and edited all the appropriate files, placing the bits of code from the mod (using the SMF 2.0 package manager as rough guide for what goes where).

The end result is a clickable bar that works in bbcode mode

burtybob

Quote from: LLStarks on July 02, 2008, 05:11:18 PM
Like I mentioned, I uploaded all the relevant files and edited all the appropriate files, placing the bits of code from the mod (using the SMF 2.0 package manager as rough guide for what goes where).

The end result is a clickable bar that works in bbcode mode

so it actually works on 2.0 for you?
If your support topic does not have a link i will NOT assist you.
A link is easy to add AND is a massive help very often.
And a login account would be usefull even if its only pass and user =demo and its a normal account its not hard to add those two pieces of information.

I will do edits for you but not for free :) time costs money.

LLStarks

somewhat. as per the name of the extension, it works in bbcode mode but converts properly when wysiwyg is activated. other than that, the only thing that doesn't work is the background colors since the bgcolor tag doesn't register.

burtybob

Quote from: LLStarks on July 02, 2008, 06:07:55 PM
somewhat. as per the name of the extension, it works in bbcode mode but converts properly when wysiwyg is activated. other than that, the only thing that doesn't work is the background colors since the bgcolor tag doesn't register.
I am haveing opposite problem with mine :/ the only tag that works is bgcolor but i will look into it :D see whats wrong its gotta be the javascript!
:/
Thanks
If your support topic does not have a link i will NOT assist you.
A link is easy to add AND is a massive help very often.
And a login account would be usefull even if its only pass and user =demo and its a normal account its not hard to add those two pieces of information.

I will do edits for you but not for free :) time costs money.

Lady Night Owl

I just installed this mod (love it), but if anyone is having a hard time with getting the bgcolor tag to work, you need to make the change in the Subs.php file (just like in Karl's, but it wasn't included in this one):

./Sources/Subs.php

Find:


array(
            'tag' => 'hr',
            'type' => 'closed',
            'content' => '<hr />',
            'block_level' => true,
),


Add After:


array(
              'tag' => 'bgcolor',
              'type' => 'unparsed_equals',
              'test' => '(#[\da-fA-F]{3}|#[\da-fA-F]{6}|[A-Za-z]{1,12})\]',
              'before' => '<span style="background-color:$1;">',
              'after' => '</span>',
),


If you don't do that, then there will be no 'bgcolor' option to enable in Posts and Topics > BBCode
Running SMF 2.0.1

Advertisement: