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.
Scam Warning
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 » Mon Jan 28, 2008 12:51 pm

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 » Mon Jan 28, 2008 12:54 pm

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: 51555
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Question about custom BBCodes.

Post by Brf » Mon Jan 28, 2008 1:18 pm

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 » Mon Jan 28, 2008 1:44 pm

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 » Sat Oct 24, 2009 12:37 am

@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 » Fri Feb 10, 2012 5:37 pm

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: 51555
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Question about custom BBCodes.

Post by Brf » Fri Feb 10, 2012 5:49 pm

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 » Fri Feb 10, 2012 6:41 pm

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 » Fri Feb 10, 2012 6:46 pm

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 » Mon Feb 04, 2013 11:25 pm

[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: 65725
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Question about custom BBCodes.

Post by Lumpy Burgertushie » Mon Feb 04, 2013 11:35 pm

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
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

swalfd
Registered User
Posts: 16
Joined: Thu Jun 06, 2013 5:14 am
Contact:

Re: Question about custom BBCodes.

Post by swalfd » Mon Jul 01, 2013 5:07 pm

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”

Who is online

Users browsing this forum: No registered users and 50 guests