[Tutorial] Creating Table BBCodes

New BBCodes, tips and tricks, hacks and MODs for the BBCode system

Re: [Tutorial] Creating Table BBCodes

Postby Handyman » 10 Feb 2007, 16:56

why would I need a TR tag? I was just trying to put it all in there so there was only 1 row and cell and a background image... not a custom one defined in the post.
I just can't seem to get the background image to work.
Please contact me if you have any news to submit to SCOFF News.
SCOFFing at the candidates while you sleep.
My Mods || My Mod Queue
Image
User avatar
Handyman    
Rear Fleet Admiral
Rear Fleet Admiral
 
Posts: 7459
Joined: 08 May 2006, 04:45
Location: Where no man has gone before!
Favorite Team: Seattle Seahawks
Gender: Male




phpBB Academy at StarTrekGuide
Support STG
Using PayPal Donate

Re: [Tutorial] Creating Table BBCodes

Postby Handyman » 11 Feb 2007, 02:00

Ok, I finally got the table bbcode to work.
I used this
Code: Select all
[table={URL}]{TEXT}[/table]

Code: Select all
<table width="100%" style="background-image:url({URL});" border="1" cellspacing="3" cellpadding="1">
<tr>
   <td>{TEXT}</td>
</tr>
</table>[/url]

You'll probably want to create the tr and td tags separately , but for my test, I put them together.

Then in my post I used
[code][table=http://localhost/tetracirc04.gif]this is a test[/table]
and I used this image:
tetracirc04.gif
tetracirc04.gif (14.16 KiB) Viewed 3032 times

if that image makes any difference to you... I thought it was really cool for a table backgrou Wink
Please contact me if you have any news to submit to SCOFF News.
SCOFFing at the candidates while you sleep.
My Mods || My Mod Queue
Image
User avatar
Handyman    
Rear Fleet Admiral
Rear Fleet Admiral
 
Posts: 7459
Joined: 08 May 2006, 04:45
Location: Where no man has gone before!
Favorite Team: Seattle Seahawks
Gender: Male

Re: [Tutorial] Creating Table BBCodes

Postby JuliusCaesar » 11 Feb 2007, 09:35

hm something still doesn't work
bbcode
Code: Select all
[tab={URL}][/tab]


html replace
Code: Select all
<table width="100%" style="background-image:url({URL});" border="1" cellspacing="3" cellpadding="1"></table>


and
Code: Select all
[tr]{TEXT}[/tr]

html replace
Code: Select all
<tr>{TEXT}</tr>



and
Code: Select all
[td={TEXT1},{NUMBER}]{TEXT2}[/td]


html replace
Code: Select all
<td class="{TEXT1}" colspan="{NUMBER}" align="center"><span class="gensmall">{TEXT2}</span></td>



so I used
Code: Select all
[tab=http://www.zenhaiku.com/images/seattle-sunset.jpg]
[tr][td=row1]this is a test[/td][/tr]
[/tab]


please help Cry Cry
JuliusCaesar    
Lieutenant Commander
Lieutenant Commander
 
Posts: 430
Joined: 03 Aug 2006, 04:41
Location: Germany
Favorite Team: Germany :D
Gender: Male
phpBB Knowledge: 5

Re: [Tutorial] Creating Table BBCodes

Postby Handyman » 11 Feb 2007, 12:02

I think you need to change this:

Code: Select all
<table width="100%" style="background-image:url({URL});" border="1" cellspacing="3" cellpadding="1"></table>

to this:
Code: Select all
<table width="100%" style="background-image:url({URL});" border="1" cellspacing="3" cellpadding="1">{TEXT}</table>

and this:
Code: Select all
[tab={URL}][/tab]

to this:
Code: Select all
[tab={URL}]{TEXT}[/tab]
Please contact me if you have any news to submit to SCOFF News.
SCOFFing at the candidates while you sleep.
My Mods || My Mod Queue
Image
User avatar
Handyman    
Rear Fleet Admiral
Rear Fleet Admiral
 
Posts: 7459
Joined: 08 May 2006, 04:45
Location: Where no man has gone before!
Favorite Team: Seattle Seahawks
Gender: Male

Re: [Tutorial] Creating Table BBCodes

Postby Highway of Life » 11 Feb 2007, 12:06

Okay, try doing this EXACTLY:

BBCode:
Code: Select all
[table={TEXT1},"{URL}"]{TEXT2}[/table]

HTML:
Code: Select all
<table class="{TEXT1}" cellspacing="1" width="100%" style="background-image:url('{URL}');">{TEXT2}</table>


BBCode:
Code: Select all
[tr={TEXT1}]{TEXT2}[/tr]

HTML:
Code: Select all
<tr class="{TEXT1}">{TEXT2}</tr>


BBCode:
Code: Select all
[th={NUMBER}]{TEXT}[/th]

HTML:
Code: Select all
<th colspan="{NUMBER}">{TEXT}</th>


BBCode:
Code: Select all
[td={NUMBER}]{TEXT}[/td]

HTML:
Code: Select all
<td colspan="{NUMBER}">{TEXT}</td>


Usage:
Code: Select all
[table=tablebg,"http://startrekguide.com/forum/styles/Sniper_Blue/imageset/stglogo.gif"][tr=][th=2]Table Test[/th][/tr][tr=row1][td=1]Cell one[/td][td=1]Cell two[/td][/tr][/table]


If that does not work exactly like that, try taking out the quotes in the Table BBCode and the usage.
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: [Tutorial] Creating Table BBCodes

Postby JuliusCaesar » 11 Feb 2007, 16:03

If that does not work exactly like that, try taking out the quotes in the Table BBCode and the usage.

It doesn't work,if you create a 2nd row,only the 4th cell got an bgimgage Clapping Clapping
If you take out the quotes the table is not displayed at all Cry Cry
JuliusCaesar    
Lieutenant Commander
Lieutenant Commander
 
Posts: 430
Joined: 03 Aug 2006, 04:41
Location: Germany
Favorite Team: Germany :D
Gender: Male
phpBB Knowledge: 5

Re: [Tutorial] Creating Table BBCodes

Postby Handyman » 11 Feb 2007, 18:41

JuliusCaesar wrote:
If that does not work exactly like that, try taking out the quotes in the Table BBCode and the usage.

It doesn't work,if you create a 2nd row,only the 4th cell got an bgimgage Clapping Clapping
If you take out the quotes the table is not displayed at all Cry Cry

did you try what I posted? because I posted it exactly how I have it on my local beta 5 and it works very nice.
Once you get that working, then try changing it little by little until you either have it perfect or it isn't working anymore... at that time, we'll discuss how far you got.
Please contact me if you have any news to submit to SCOFF News.
SCOFFing at the candidates while you sleep.
My Mods || My Mod Queue
Image
User avatar
Handyman    
Rear Fleet Admiral
Rear Fleet Admiral
 
Posts: 7459
Joined: 08 May 2006, 04:45
Location: Where no man has gone before!
Favorite Team: Seattle Seahawks
Gender: Male

Re: [Tutorial] Creating Table BBCodes

Postby JuliusCaesar » 12 Feb 2007, 15:39

did you try what I posted? because I posted it exactly how I have it on my local beta 5 and it works very nice.
Once you get that working, then try changing it little by little until you either have it perfect or it isn't working anymore... at that time, we'll discuss how far you got.

yeah I tried it but it didn't work. I removed the class tags and replaced the styletags by standart html,now it works Grin Grin

Code: Select all
[table={URL}]{TEXT}[/table]
<table width="100%" background="{URL}" border="1" cellspacing="3" cellpadding="1">{TEXT}</table>

[td={NUMBER}]{TEXT}[/td]
<td colspan="{NUMBER}" align="center">{TEXT}</td>

[th={NUMBER}]{TEXT}[/th]
<th colspan="{NUMBER}">{TEXT}</th>



thx for your help guys,I think that should work now Thumbsup Thumbsup
Last edited by JuliusCaesar on 13 Feb 2007, 08:02, edited 1 time in total.
JuliusCaesar    
Lieutenant Commander
Lieutenant Commander
 
Posts: 430
Joined: 03 Aug 2006, 04:41
Location: Germany
Favorite Team: Germany :D
Gender: Male
phpBB Knowledge: 5

Re: [Tutorial] Creating Table BBCodes

Postby Highway of Life » 12 Feb 2007, 16:51

You are going to make Bertie cry with that non XHTML compatible code.

Well, I do have some good news and bad news... first, the bad news, you found a bug... the good news?
You found a bug.

http://www.phpbb.com/bugs/viewreport.php?b=8090
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: [Tutorial] Creating Table BBCodes

Postby JuliusCaesar » 13 Feb 2007, 08:02

You are going to make Bertie cry with that non XHTML compatible code.

at least it is working Grin Grin


Well, I do have some good news and bad news... first, the bad news, you found a bug... the good news?
You found a bug.

Oh that explains it,I got strange outputs as well some times Wink Wink

but why did you put
Code: Select all
<?php
in front of every code??
JuliusCaesar    
Lieutenant Commander
Lieutenant Commander
 
Posts: 430
Joined: 03 Aug 2006, 04:41
Location: Germany
Favorite Team: Germany :D
Gender: Male
phpBB Knowledge: 5

PreviousNext

Return to BBCode System

Who is online

Users browsing this forum: No registered users and 5 guests