[Tutorial] Creating Table BBCodes

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

Re: [Tutorial] Creating Table BBCodes

Postby JuliusCaesar » 10 Feb 2007, 11:34

hey 2 questions,
  1. How can I add a bgimage to the table?
  2. How can I add a footer?

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




phpBB Academy at StarTrekGuide
Support STG
Using PayPal Donate

Re: [Tutorial] Creating Table BBCodes

Postby Handyman » 10 Feb 2007, 11:39

in the table tag
Code: Select all
<table class="tablebg" cellspacing="1" width="100%">
<tbody>{TEXT}</tbody></table>

just add bgimage
Code: Select all
<table class="tablebg" cellspacing="1" width="100%" bgimage="yourimagehere.gif">
<tbody>{TEXT}</tbody></table>
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: 7454
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 » 10 Feb 2007, 11:52

NO NO NO!!! BAD!! Rant
That's not even Transitional valid markup!! Rant

You must put it inside a style tag, or assign it a class attribute... for example...
Code: Select all
<table class="tablebg" cellspacing="1" width="100%" style="background-image:url('path/to/image.jpg');">....
is alright
and
Code: Select all
<table class="tablebg bgimgclass" cellspacing="1" width="100%">...
is alright as well.. and bgimgclass would be defined in your stylesheet, and contain the following example:
Code: Select all
.bgimgclass {
    background-image:url('path/to/image.jpg');
}
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 » 10 Feb 2007, 11:58

BBcode
Code: Select all
[Tabelle={NUMBER},{URL}]{TEXT}[/Tabelle]


html replace
Code: Select all
<table class="tablebg" cellspacing="1" width="{NUMBER}%" bgimage="{URL}">
<tbody>{TEXT}</tbody></table>

does this work??
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 » 10 Feb 2007, 12:06

JuliusCaesar wrote:BBcode
Code: Select all
[Tabelle={NUMBER},{URL}]{TEXT}[/Tabelle]


html replace
Code: Select all
<table class="tablebg" cellspacing="1" width="{NUMBER}%" bgimage="{URL}">
<tbody>{TEXT}</tbody></table>

does this work??

yes, that would work, but Highway is right... you don't want to use that. I was going for the 2 second fix, not the 30 second fix Blush
do this:
Code: Select all
<table class="tablebg" cellspacing="1" width="{NUMBER}%" style="background-image:url('{URL}');">
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: 7454
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 » 10 Feb 2007, 13:32

woooo
this one doesn't work
Code: Select all
[tabelle=90,http://www.zenhaiku.com/images/seattle-sunset.jpg][th=1]Tabllentest[/th]
[tr][td=row2,1]test[/td][/tr][/Tabelle]

forum.JPG
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 » 10 Feb 2007, 14:29

I can't get it to work either... I've tried just about everything and it shows up perfect in DreamWeaver.
Here is what I tried last:
Code: Select all
[table]{TEXT}[/table]


Code: Select all
<table width="100%" style="background-image:url(http://zenhaiku.com/images/seattle-sunset.jpg)">
<tr>
   <td>{TEXT}</td>
</tr>
</table>
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: 7454
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 » 10 Feb 2007, 16:17

can't I just use this one
Code: Select all
<table class="tablebg" cellspacing="1" width="{NUMBER}%" bgimage="{URL}">
<tbody>{TEXT}</tbody></table>
Confused Confused
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 » 10 Feb 2007, 16:29

I thought you said you tried that one.
If you can get anything to work, please let me know... I was not able to get a bgimage to work.
I wonder if it has to be on in-site image... I'm gonna try that in about an hour.

Edit, I can't seem to get it... and I've tried every possibility I can think of... even the bgimage.
I've tried making the image start with http://
I've tried working with it to find the path (i.e. ./beta5/styles, /beta5/styles beta5/styles ./styles /styles styles)
I can get it to work with just a basic html page, but I can't get it to work with the bbcodes... I'm thinking some code will need to be edited to be able to make this happen.
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: 7454
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 » 10 Feb 2007, 16:54

your problem is a missing [tr] tag...
Also, if they have parameters, you have to define them, even if they are empty... for example, if you are using my tr tag, you need it to do [tr=] not [tr]
so your code should be:

[tabelle=90,http://www.zenhaiku.com/images/seattle-sunset.jpg][tr=][th=1]Tabllentest[/th][/tr][tr=][td=row2,1]test[/td][/tr][/tabelle]

And make sure there are no newlines (returns) as that will just create spaces from the top of your table to the start, and you'll wonder why.
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

PreviousNext

Return to BBCode System

Who is online

Users browsing this forum: No registered users and 2 guests