Fight the automated spam - protect your miniBB-forums,
getting the Captcha addon! Click here to read more.
Captcha Addon for miniBB
miniBB ®
 
miniBB Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
Official Addons and Solutions miniBB Community Forum / Official Addons and Solutions /

Color Picker add-on discussions

 
myarbro
Forums Member
#1 | Posted: 28 May 2008 10:19
Reply 
How can I move the color_picker button from it's default location (near the PostTopic button) up above the text box alongside the bold, italic, and underline buttons. This is a toolbar area, of sorts, and it would look nice there and also save space.

Thanks for your advice!
Paul
CEO
#2 | Posted: 28 May 2008 11:05 | Edited by: Paul
Reply 
Sorry, it isn't clear for me why this button should be located near PostTopic button at all? The readme.txt file contains the instructions exactly as you see it... the button's code could be pasted exactly amongst text formatting menu, like it's done on our demo site. You may just view the source of main_post_form.html template on demo site and check where to paste the code.
myarbro
Forums Member
#3 | Posted: 28 May 2008 11:41
Reply 
Nice! I misunderstood some of the directions. It's perfect now. Thanks!
Excalibor
Forums Member
#4 | Posted: 12 Jan 2009 19:00 | Edited by: Excalibor
Reply 
Hello,

In the readme.txt say (bold style):

by default, miniBB is not allowing to use color BB code for regular users (but for admin only). You will need to modify bb_codes.php file and remove the condition which looks like:


if($admin==1) {

$pattern[]="/\[font(#[A-F0-9]{6})\](.+?)\[\/font\]/is";
$replacement[]='<span style="color:\\1">\\2</span>';


}

But i have a error...:

Parse error: syntax error, unexpected T_LOGICAL_OR in /home/www/domain.com/foro/bb_codes.php on line 57

... when i erase this if($admin==1 or $GLOBALS['isMod']==1)

$pattern[]="/\[font(#[A-F0-9]{6})\](.+?)\[\/font\]/is";
$replacement[]='<span style="color:\\1">\\2</span>';


bb_codes.php:
if($admin==1 or $GLOBALS['isMod']==1){

$pattern[]="/\[[uU]\](.+?)\[\/[uU]\]/s";
$replacement[]='<u>\\1</u>';

$pattern[]="/\[urlc=((f|ht)tp[s]?:\/\/[^<> \n\r\[\]]+?)\](.*?)\[\/url\]/i";
$replacement[]="<a href=\"\\1\" target=\"_blank\">\\3</a>";

$pattern[]="/\[font(#[A-F0-9]{6})\](.+?)\[\/font\]/is";
$replacement[]='<span style="color:\\1">\\2</span>';


}

Thank.
Paul
CEO
#5 | Posted: 13 Jan 2009 04:11
Reply 
You need to erase not just the string saying if($admin==1 or $GLOBALS['isMod']==1), you need to know how PHP works to move that condition :-)

Your code should be:

if($admin==1 or $GLOBALS['isMod']==1){

$pattern[]="/\[[uU]\](.+?)\[\/[uU]\]/s";
$replacement[]='<u>\\1</u>';

$pattern[]="/\[urlc=((f|ht)tp[s]?:\/\/[^<> \n\r\[\]]+?)\](.*?)\[\/url\]/i";
$replacement[]="<a href=\"\\1\" target=\"_blank\">\\3</a>";

}

$pattern[]="/\[font(#[A-F0-9]{6})\](.+?)\[\/font\]/is";
$replacement[]='<span style="color:\\1">\\2</span>';

so you just need to move the closing quote a bit higher...
Excalibor
Forums Member
#6 | Posted: 16 Jan 2009 21:13
Reply 
Hello Paul,

Thank.
 
Your Reply

» Username  » Password 
You are welcome to post anonymously by entering a nickname with no password (if that nickname has not been taken by another member) or by leaving both fields empty. If you have a forums membership account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

 
Online now: Guests - 5
Members - 0
Most users ever online: 214 [11 Jan 2009 10:23]
Guests - 214 / Members - 0

Forums are powered by miniBB®