Question about custom BBCodes.

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
Zedicius
Registered User
Posts: 4
Joined: Mon Jan 28, 2008 12:41 pm

Question about custom BBCodes.

Post by Zedicius »

I added table, and respectively th, tr and td tags to the custom BB code list. They're hidden and the actual bbcode tags are named uniquely so that ordinary members can't mess up the lay-out by accidentally putting these tags in.

The tags work perfectly, though for some reason there's an unexplainable blank space above my table. The more rows I add, the bigger this space becomes. I checked the page source, the forum and the style/template files and didn't really find anything unusual that could cause it.

Has anyone had this problem before, or even better, know how to fix it?
User avatar
karlsemple
Former Team Member
Posts: 39802
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK
Contact:

Re: Question about custom BBCodes.

Post by karlsemple »

Not tested this, but I came across a topic somewhere on this board discussing this and an apparent work around so I copied it thinking it may be of use in the future, it can be found here
Image
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53400
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Question about custom BBCodes.

Post by Brf »

This one works, and doesnt need the trf and tdf tags:

Code: Select all

[table]{TEXT}[/table]

Code: Select all

<table><!-- {TEXT} --></table>

Code: Select all

[tr]{TEXT}[/tr]

Code: Select all

tr --><tr><!-- {TEXT} --></tr><!-- tr

Code: Select all

[td]{TEXT}[/td]

Code: Select all

td --> <td>{TEXT}</td> <!-- td
It can mess things up though if someone posts tr or td tags without the table wrapper.
Zedicius
Registered User
Posts: 4
Joined: Mon Jan 28, 2008 12:41 pm

Re: Question about custom BBCodes.

Post by Zedicius »

Both are working perfectly. Thank you very much. :)
User avatar
waxxie
Registered User
Posts: 119
Joined: Fri Oct 16, 2009 5:21 pm

Re: Question about custom BBCodes.

Post by waxxie »

@Brf

thanks for that!
exactly what I needed!!!

5/5 stars for you
BROnstott
Registered User
Posts: 8
Joined: Sun Dec 18, 2011 1:23 am

Re: Question about custom BBCodes.

Post by BROnstott »

For some reason I can't seem to make this work.

I added three custom BB Codes as shown above:

In the BBCode Usage box I put
[table]{SIMPLETEXT}[/table]

and in the HTML Replacement box I put
<table><!-- {SIMPLETEXT} --></table>

and
[td]{SIMPLETEXT}[/td]
and
td --> <td>{SIMPLETEXT}</td> <!-- td

and
[tr]{SIMPLETEXT}[/tr]

paired with

tr --><tr><!-- {SIMPLETEXT} --></tr><!-- tr

Now when I put this in my post:

[table][tr][td]TEST[/td][/tr][/table]

and preview the results I get this:

Preview:
[table][tr]td --> TEST

Obviously I'm missing something. Can someone point out my error?
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53400
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Question about custom BBCodes.

Post by Brf »

Why are you using SIMPLETEXT, when the examples plainly show TEXT?
BROnstott
Registered User
Posts: 8
Joined: Sun Dec 18, 2011 1:23 am

Re: Question about custom BBCodes.

Post by BROnstott »

Because I got a warning message when I used TEXT. Some sort of security warning.
BROnstott
Registered User
Posts: 8
Joined: Sun Dec 18, 2011 1:23 am

Re: Question about custom BBCodes.

Post by BROnstott »

I changed it to TEXT and ignored the warnings, and it works fine now. Sorry to bother.
agus6salim
Registered User
Posts: 14
Joined: Thu Jul 19, 2012 12:44 am
Name: Agus Salim
Contact:

Re: Question about custom BBCodes.

Post by agus6salim »

[table]
[tr]
[td]Cinta[/td]
[td]Love[/td]
[/tr]
[tr]
[td]Cinta2[/td]
[td]Love2[/td]
[/tr]
[/table]
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Question about custom BBCodes.

Post by Lumpy Burgertushie »

agus6salim wrote:[table]
[tr]
[td]Cinta[/td]
[td]Love[/td]
[/tr]
[tr]
[td]Cinta2[/td]
[td]Love2[/td]
[/tr]
[/table]
you should probably put that all in one continuous line to avoid layout problems.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
swalfd
Registered User
Posts: 16
Joined: Thu Jun 06, 2013 5:14 am
Contact:

Re: Question about custom BBCodes.

Post by swalfd »

This works well just what i needed. How can i increase the width of the table? And add blank line between each row? thank you!
tearoom-hk.com a Hong Kong Based chatroom
Locked

Return to “[3.0.x] Support Forum”