Did you know that you may be allowed to hide miniBB credits
and remove miniBB's copyright notice? Click here to read more.
Copyright Removal allowance 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 /
Short link for this topic:

Color Picker

 
Author myarbro
Forums Member
#1 | Posted: 28 May 2008 10:19
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!
Author Paul
CEO
#2 | Posted: 28 May 2008 11:05 | Edited by: Paul
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.
Author myarbro
Forums Member
#3 | Posted: 28 May 2008 11:41
Nice! I misunderstood some of the directions. It's perfect now. Thanks!
Author Excalibor
Forums Member
#4 | Posted: 12 Jan 2009 19:00 | Edited by: Excalibor
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.
Author Paul
CEO
#5 | Posted: 13 Jan 2009 04:11
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...
Author Excalibor
Forums Member
#6 | Posted: 16 Jan 2009 21:13
Hello Paul,

Thank.
 
Official Addons and Solutions miniBB Community Forum / Official Addons and Solutions / Color Picker Top
Your Reply Click this icon to move up to the quoted message

» 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.

 
miniBB Community Forum Powered by Free Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts