miniBB Support Forums | 15 years on The Web
miniBB ®

miniBB

®
  
 | Begin | 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
Partaker
#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.

Jay

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
8-)
#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) {

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

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

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

}

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

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

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

3) CSS file - add:

.forumhead{
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
8-)
#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
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


 ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


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 ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
↑ TOP