Center Tag In Phpbb3?!

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
User avatar
Rowan
Posts: 15
Joined: Sun Aug 13, 2006 4:27 pm
Location: Glasgow, Scotland
Contact:

Center Tag In Phpbb3?!

Post by Rowan »

How can I center text, images etc in my signature in phpbb3??

I want to use [center][/center] but its not working..

Any ideas?
Xbox Live Tag: Rowan88
Xbox Console: Xbox 360 Premium w/ Xtreme
Xbox Live Subscription: Gold 12 Month Subscription
Xbox Backup Media: Verbatim DVD+R Dual Layer Printable


Image

Case
Registered User
Posts: 60
Joined: Tue Jun 06, 2006 9:44 am
Contact:

Re: Center Tag In Phpbb3?!

Post by Case »

I think you need to add that tag yourself as a custom BBCode.

User avatar
Rowan
Posts: 15
Joined: Sun Aug 13, 2006 4:27 pm
Location: Glasgow, Scotland
Contact:

Re: Center Tag In Phpbb3?!

Post by Rowan »

So just put [center][/center] into the BBCode bit in AdminCP and its done?
Xbox Live Tag: Rowan88
Xbox Console: Xbox 360 Premium w/ Xtreme
Xbox Live Subscription: Gold 12 Month Subscription
Xbox Backup Media: Verbatim DVD+R Dual Layer Printable


Image

Case
Registered User
Posts: 60
Joined: Tue Jun 06, 2006 9:44 am
Contact:

Re: Center Tag In Phpbb3?!

Post by Case »

Use following for center alignment:

BB Usage:

Code: Select all

[center]{TEXT}[/center]

HTML Replace:

Code: Select all

<div align="center">{TEXT}</div>

Kokuei
Registered User
Posts: 64
Joined: Sun Nov 26, 2006 6:19 pm
Location: On the other end of the cable.
Contact:

Re: Center Tag In Phpbb3?!

Post by Kokuei »

You can find alot of usefull BBCode examples in the phpBB beta support forum.
http://www.phpbb.com/phpBB/viewtopic.php?t=405994

But remember, the current beta (3.0.B4 that is) have a bug that disrupts BBCodes with paramaters.

User avatar
Spiros-
Registered User
Posts: 29
Joined: Sun Sep 17, 2006 9:52 am

Re: Center Tag In Phpbb3?!

Post by Spiros- »

Using the custom BB codes utility, add this:

BB-Code:

Code: Select all

[center]{TEXT}[/center]
Replace:

Code: Select all

<center>{TEXT}</center>
...and it's done! ;)

User avatar
iyeru42
Registered User
Posts: 30
Joined: Thu Jan 18, 2007 6:50 pm
Location: Madison, WI
Contact:

Re: Center Tag In Phpbb3?!

Post by iyeru42 »

Or you could make an align tag if phpBB3's BBCode maker allows the BBCODE= deal.

Code: Select all

[align=$1]{TEXT}[/align]
Is in HTML:

Code: Select all

<div align="{$1}">{TEXT}</div>
Danopia: wats wrong with windows server?
Iyeru: Everything
Danopia: r u another stereotyper?
Iyeru: No, I'm not a stereotyper.
Iyeru: In fact, I don't think I can type in stereo.

code reader
Registered User
Posts: 653
Joined: Wed Sep 21, 2005 3:01 pm

Re: Center Tag In Phpbb3?!

Post by code reader »

just a small comment:
ttbomk, <center> was never standard, and does not appear in html specs. for sure it is not xhtml 1.0 compliant, although most (all?) browsers support it. not recommended.
<div align='left'|'center'|'right' > is standard, but it's deprecated, and also not recommended.

the recommended way to do alignment is with 'style', so:
<div style="text-align:left|center|right;"> ... </div>

personally, i use <p> rather than <div>, but i'm not sure which is better...

User avatar
iyeru42
Registered User
Posts: 30
Joined: Thu Jan 18, 2007 6:50 pm
Location: Madison, WI
Contact:

Re: Center Tag In Phpbb3?!

Post by iyeru42 »

code reader wrote: just a small comment:
ttbomk, <center> was never standard, and does not appear in html specs. for sure it is not xhtml 1.0 compliant, although most (all?) browsers support it. not recommended.
<div align='left'|'center'|'right' > is standard, but it's deprecated, and also not recommended.

the recommended way to do alignment is with 'style', so:
<div style="text-align:left|center|right;"> ... </div>

personally, i use <p> rather than <div>, but i'm not sure which is better...


P tag will add an extra space on the top and bottom of the encapsulated text (DIV does not.) If you add the below CSS, P will act exactly like DIV (to a degree.)

Code: Select all

P { /* Force P-HTML Tag to act like Tables Do */
     margin:0px;
}
Danopia: wats wrong with windows server?
Iyeru: Everything
Danopia: r u another stereotyper?
Iyeru: No, I'm not a stereotyper.
Iyeru: In fact, I don't think I can type in stereo.

User avatar
NNO-Stephen
Registered User
Posts: 398
Joined: Fri May 23, 2003 12:47 am
Location: Tulsa, Oklahoma
Contact:

Re: Center Tag In Phpbb3?!

Post by NNO-Stephen »

<center> is far better than div align whatnot because it's shorter and less prone to screwing up (typos).

besides, it works EVERYWHERE.

and besides, it IS valid HTML. it may have been depricated in 4.01, but it's still HTML. it's not valid XHTML 1.0 strict but *beep* it, it's HTML. so code reader, might wanna do some homework because you cannot say it was "never" valid.
Image

Post Reply