PDA

View Full Version : Table BBCode



sep
April 7th, 2008, 21:19
This BBCode (http://www.vbulletin.org/forum/showthread.php?t=107985) may prove useful for hosts posting their offers, seeing how usually when you visit a hosting website, the offers are in tables.

stuffradio
April 8th, 2008, 01:06
Nice,

it'll make things look nicer :D

BrandonTheG
April 8th, 2008, 01:08
I actually would like to see this implemented, as then it'll make plans and other things easier to read.

Peo
April 8th, 2008, 04:25
Looks good, I'll see what we can do about that.

themoose
April 8th, 2008, 09:13
Or just enable <table>, <th>, <td>, <tr> HTML codes... if that's possible.

Although then again, it may ---- with the layout..

But yeah this mod is a good idea.

Peo
April 8th, 2008, 13:48
I've installed it now, but the table icon doesn't show up.

Let's test this...



hm... this didn't work.

Jaaaaaaaaaan!

Peo
April 8th, 2008, 14:47
Hold on, this might be working after all...

red|blue|yellow
row1 col1|row1 col2|row1 col3
row2 col1|row2 col2|row2 col3

This is the code I posted:


[ table="head"]red|blue|yellow
row1 col1|row1 col2|row1 col3
row2 col1|row2 col2|row2 col3[/table ]

Remove the first space prior to 'table' and the last space after the last 'table'.

themoose
April 8th, 2008, 14:51
Attempt|Successful
First|FAIL
Second|FAIL (Jaaaan??)
Third|GREAT SUCCESS!


Very cool...!

SC-Daniel
April 8th, 2008, 15:29
That is pretty awesome! I will definitely start using this when I post offers and such.

Nice addition ;)

BrandonTheG
April 8th, 2008, 18:54
I like the organization part, were you can organize the data.

themoose
April 8th, 2008, 19:05
Brandon;980096']I like the organization part, were you can organize the data.

You mean all of it? :p

BrandonTheG
April 8th, 2008, 20:17
I would guess so but I forgot what i wrote that post about.

hamster
April 8th, 2008, 22:51
Woah, it's awesome ^^ Lovin it already. I like the colors.

Stan
April 9th, 2008, 05:03
It could be a little more user friendly and a LOT more customizable. Other than that, its a great new feature.

Darknight
April 9th, 2008, 05:56
I <3 this allready :D

fnixws
April 9th, 2008, 06:24
Awesome.. this will stop me going over 25 lines :D

hamster
April 9th, 2008, 07:00
Oh wait... the 25 lines restriction is for offering people when they're requesting right? Does it apply to hosts posting their offer threads?

fnixws
April 9th, 2008, 07:03
apparently not, people go way over it all the time in that section.

SC-Daniel
April 9th, 2008, 07:06
apparently not, people go way over it all the time in that section.

I'm pretty sure the 25 lines if for quote requests and not the offers section as everyone goes WAY over 25 lines

Peo
April 9th, 2008, 07:17
Yeah, that 25 lines rule is only when hosts reply to requests. But the table can be used in those posts too to present the info in fewer lines.

Don't copy and paste offers as replies to requests though!

Stan
April 9th, 2008, 08:48
Don't copy and paste offers as replies to requests though!

Is that ever enforced? I see it all the time, it's really annoying yet they get away with it.

fnixws
April 9th, 2008, 09:05
ye, i see it alot too. :(

Kinda hard to keep up for the mods tho i guess.

BTW, does this place kinda seem dead lately??

Jan
April 9th, 2008, 09:07
Is that ever enforced? I see it all the time, it's really annoying yet they get away with it.
If it is reported ;)

hamster
April 9th, 2008, 09:12
That's one hell of an incentive for hosting providers to report other hosts for breaking that rule because it'll be 1 less offer for the requester and a higher chance for themselves! ;) How smart!

Peo
April 9th, 2008, 10:29
BTW, does this place kinda seem dead lately??

Traffic has been up and so has number of posts over the last couple of months. Since september last year it's increased slightly every single month. The last 7 days were also more active than previous weeks. Yesterday was the second most active day of the last week. The last couple of seconds though... I've been refreshing in panic in hope of finding new posts. Nothing! :cry2:

krakjoe
April 9th, 2008, 13:03
<?php
function create_vb_table( $html )
{
if( ereg( 'table', $html ) )
{
if( ( $rows = preg_split( '~<tr(.*?)>~si', $html ) ) )
{
$vb = array( );

foreach( $rows as $row )
{
if( ereg( 'tr', $row ) )
{
if( preg_match_all( '~<(td|th)(.*?)>(.[^(</\\1>)]*)</\\1>~si', $row, $values ) )
{
$vb[] = $values[3];
}
}
}

if( count( $vb ) )
{
if( $section = array_shift( $vb ) )
{
$row = 0 ;

do
{
if( $row == 0 )
{
printf( "" );
printf( "&#37;s\r\n", implode( "|", $section ) );
$top = true ;
}
else printf( "%s\r\n", implode( "|", $section ) );

$row++ ;
}
while( $section = array_shift( $vb ) );

printf( "\r\n" );
}
else die( "Invalid format" );
}
else die( "Invalid format" );
}
else die( "Invalid format" );
}
else die( "Invalid format" );
}

/** pretty standard table **/
$mytable = <<<HEREDOC
<table>
<tr>
<td>Feature</td>
<td>Enabled</td>
</tr>
<tr>
<td>Hosting</td>
<td>Tick</td>
</tr>
<tr>
<td>Hosting</td>
<td>Cross</td>
</tr>
</table>
HEREDOC;
/** turned into vbulletin code **/
create_vb_table( $mytable );
?>


Feature|Enabled
Hosting|Tick
Hosting|Cross

BrandonTheG
April 10th, 2008, 19:55
Is that to convert a table into a vBulletin table?