miniBB ®  
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual | miniBB Mobile
Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions /   

Color Picker

Author myarbro
Registered
#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
Lead Developer
#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
Registered
#3 | Posted: 28 May 2008 11:41 
Nice! I misunderstood some of the directions. It's perfect now. Thanks!

Author Excalibor
Registered
#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
Lead Developer
#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
Registered
#6 | Posted: 16 Jan 2009 21:13 
Hello Paul,

Thank.

Official Addons and Solutions miniBB Support Forums / Official Addons and Solutions / Color Picker Top
Your Reply Click this icon to move up to the quoted message
 Short link for this topic:

 ?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums 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 Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
  Extend your miniBB-forums, attaching the images and files,
get the File and Picture Attachments add-on!
Galleries / Attachments Addon for miniBB