[BBCode] Table
Posted: 20 Apr 2012, 06:38
Description: Lets you add custom table.
Features:
- How many lines you want.
- How many columns you want
BBCode:
HTML replacement:
Use:
Obs.:
- The style can be changed completely.
- The first style is referred to the header and the second table with all the other lines.
Screen: Demo:
http://www.mundophpbb.com.br/forum/view ... p?f=11&t=8
Features:
- How many lines you want.
- How many columns you want
BBCode:
Code: Select all
[tabela]{TEXT}[/tabela]
Code: Select all
<script language="Javascript">
var texto = '{TEXT}';
texto = texto.replace("\r\n","");
texto = texto.replace("<br>","");
texto = texto.replace(" ","");
var linha = new Array();
linha = texto.split('L=');
var table = '<div align="center"><TABLE width=70% cellpadding=1 cellspacing=1 border=0>';
for (var i=1; i<linha.length; i++)
{
table = table + '<TR>';
var coluna = new Array();
coluna = linha[i].split('&');
for (var j=0; j<coluna.length; j++)
{
if (i == 1)
{
table = table + '<TD align=center style="background: #FF8904; font-size:11px; color:black; font-family: Verdana,Arial, Helvetica, sans-serif;"><b>' + coluna[j].replace("amp;","") + '</b></TD>';
}
else
{
table = table + '<TD style="background: #878282; font-size:11px; color:white; font-family: Verdana,Arial, Helvetica, sans-serif;">' + coluna[j].replace("amp;","") + '</TD>';
}
}
table = table + '<TR>';
}
table = table + '</TABLE></div>';
document.write(table);
</script>
Code: Select all
Separate the L rows and columns with = &
[tabela]
L=Nome&Nick&Sexo
L=Tiago&Sapporo&Masculino
L=Laura&Witch&Feminino
L=Cesar&Rasec&Masculino
[/tabela]
- The style can be changed completely.
- The first style is referred to the header and the second table with all the other lines.
Screen: Demo:
http://www.mundophpbb.com.br/forum/view ... p?f=11&t=8