15 years on The Web
miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

BB codes for centering the image and headlines

Author Jay Graves
#1 | Posted: 30 Oct 2005 16:18 | Edited by: Jay Graves 
What is the code for the light blue background color behind a message? I want to create space around my images and want a matching color.

How can I avoid text wrapping around an image so my image will be between paragraphs? So there is no text on the sides of my image.

How can I CENTER an image?

How can I make just one sentence a larger typestyle (headline)?

Thanks. I like this script alot.


Author Ivan
Advanced Member
#2 | Posted: 31 Oct 2005 09:49 | Edited by: Ivan 
The options for the colors and all other layout is in the file bb_default_style.css

As per the text wrapping, the normal is what you want, Team may say why you have text around the picture.

Normally, it must be:

text text text

text text text

and not:

text text text
text text text
text text text

Author Team
#3 | Posted: 31 Oct 2005 11:06 
Jay Graves
By default, miniBB is not the publishing platform, so there are no codes provided for your needs. However, they are easily implementable. We recommend to use suggested codes (centering, heading) only for admin, so the steps for implementing this are the following:

1) Edit bb_codes.php and in admin section (function enCodeBB), add:

if($admin==1) {

$replacement[]='<font color="\\1">\\2</font>';

$replacement[]='<div align="center">\\1</div>';

$replacement[]='<span class="forumhead">\\1</span>';


2) bb_codes.php - in the function deCodeBB(), before $msg=..., add:

$pattern[]="/<div align=\"center\">(.+?)<\/div>/is";

$pattern[]="/<span class=\"forumhead\">(.+?)<\/span>/is";

3) CSS file - add:

font-size: 14px;
font-weight: bold;

4) After that, you will be able to use the following codes:

[head]Your Header Text Here[/head] - for your headings
[center]Any Text or IMGS code here[/center] - for centering the content.

Author Ivan
Advanced Member
#4 | Posted: 31 Oct 2005 11:14 
Should one receive also right alignment if he adds also the same lines as "center", but with the word "right"?

Author Team
#5 | Posted: 31 Oct 2005 12:18 
Yes, the code for "right" is the same.

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications / BB codes for centering the image and headlines 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
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB