Let's go for more ways to format posts & see how to align pictures.
Images are in most of forums aligned by default on the left side, to change that you need to use one of three tags we already saw in a previous lesson, the [left], [center] & [right] tags, see their use with text here: How to Change Text Alignment.
To summarize, you use one of those tags at once to wrap your text (or image as we'll see):
[left] for left alignment, [center] to center an element & [right] to align an element on the right.
The use of those tags with images is not different than the use for text, you just need to combine them with the [img] tag (learn more about how to combine tags here: How to Correctly Insert Tags).
Examples:
Again let's use Google Logo image as an example:
http://www.google.com/intl/en_ALL/images/logo.gif
Wrap it with the [img] tag:
[img]http://www.google.com/intl/en_ALL/images/logo.gif[/img]
Then according to if you want the image on the left, center or the right, wrap the whole with [left], [center] or [right] tags respectively:
[left][img]http://www.google.com/intl/en_ALL/images/logo.gif[/img][/left]
[center][img]http://www.google.com/intl/en_ALL/images/logo.gif[/img][/center]
[right][img]http://www.google.com/intl/en_ALL/images/logo.gif[/img][/right]
That's all :)
Notes:
1. As with Fonts Change, unfortunately the guys from phpBB seem to think it useless to let users change text or images alignment, let's hope they fix that soon. With other popular forums platforms text alignment works fine: vBulletin, IP.Board & Simple Machines. To know if your posts are on a phpBB powered forum, see: What Kind of Forum are You Using?
2. When you combine tags, most of time, it doesn't matter in which order you insert them as long as the ones you open first are closed last & so on.
However, when you combine [img] tag with other tags, it must the closest to the image URL it wraps (i.e. directly in contact with it) or else you get an error ..
Example:
[center][img]http://www.google.com/intl/en_ALL/images/logo.gif[/img][/center] - Right
[img][center]http://www.google.com/intl/en_ALL/images/logo.gif[/center][/img] - Wrong
What is This All About?
When you participate on forums discussions, sometimes to type plain text would make it, but often, you need to make your posts more interesting: to add styles, change fonts, play with colors, insert links or to display images ...
In web development, HTML is used for all that, but in forums posts, a simplified code inspired from it allows users to format text, that code's called the "bbCode".
This blog will help you easily understand & use bbCode. Have Fun!!! :)
ps: don't hesitate to post a comment for any help needed or a suggestion, or just to say hi! :)
In web development, HTML is used for all that, but in forums posts, a simplified code inspired from it allows users to format text, that code's called the "bbCode".
This blog will help you easily understand & use bbCode. Have Fun!!! :)
ps: don't hesitate to post a comment for any help needed or a suggestion, or just to say hi! :)
Saturday, September 22, 2007
Subscribe to:
Post Comments (Atom)


1 comments:
Hi,
also in phpBB this is possible without much hacking - once the forum admin adds those BBcodes in the Admin Control Panel (tab "Posting" => "BBCodes" => button "add a new BBCode" in phpBB 3.0.* I use, don't know about previous versions).
Short example to add the [center] tag:
in the box "BBCode usage" enter:
[center]{TEXT}[/center]
in the box "HTML replacement" enter:
<div align="center">{TEXT}</div>
Then add a recognizable description in "Help line text", which will be shown below the corresponding button in edit and post windows in case the bottom box "Display on posting page" is checked.
Quite simple, but yeah, it's unfortunate that it must be added manually.
Have fun
Rico
Post a Comment