26 (edited by Ataxy 2005-04-27 21:14)

Re: adding bbcode

ok well i got it to work
so any way just a stupid error in the code of my previous code
the line to be added are the following it only gives two table but one may easly mod it to have more then two

'#\[table\](.*?),(.*?)\[/table\]#',

and

'<table><tr><td>$1</td><td>$2</td></tr></table>',

as i understood since xhtml is strict i had forgoten to close the <table> tag to </table>
and the result is the following
http://d-vault.peerforces.com/table2.png

EDIT:
ok to get 3 table just add this

'#\[table3\](.*?),(.*?),(.*?)\[/table3\]#',

and this

'<table><tr><td>$1</td><td>$2</td><td>$3</td></tr></table>',

27 (edited by Paul 2005-04-22 14:59)

Re: adding bbcode

You need to add cellspacing="0" to the table tag.
Try it with some text before and after the tables, you may find the tables are nested inside a paragraph.

28

Re: adding bbcode

Paul wrote:

You need to add cellspacing="0" to the table tag.
Try it with some text before and after the tables, you may find the tables are nested inside a paragraph.

ok will try right away

29 (edited by Ataxy 2005-04-27 21:14)

Re: adding bbcode

ok i dont know what the cellspacing="0" changed but here is the result with the [table3] tag and text after and before the table
http://d-vault.peerforces.com/table3.png

30 (edited by Ataxy 2005-04-27 21:14)

Re: adding bbcode

weird now my image dont show up any more i tried to change it to another image but all i get now is the cell with the text and a small empty cell next to it

edit:
***************ok the problem seem to be only with firefox but not with explorer***************

edit2:
***************ok the image is not disapearing in fire fox it seemed to be resized to leave space for the text so as the text grow instead of changing line firefox seems to want to force the text to appear on one line

example in firefox
http://d-vault.peerforces.com/table4.png

example in explorer
http://d-vault.peerforces.com/table5.png

edit3:
**************Opera seems to disply it well to

also i noticed that on my laptop the third image was cut off due to the smaller size of the screen  when i check the table that was made with the [table3] tag

Re: adding bbcode

See  #106 post( by codeXP) in this thread http://punbb.org/forums/viewtopic.php?pid=37484#p37484

32 (edited by Ataxy 2005-04-22 20:47)

Re: adding bbcode

druvans wrote:

See  #106 post( by codeXP) in this thread http://punbb.org/forums/viewtopic.php?pid=37484#p37484

humm interesting but the problem i that this code if i get it well will only shift the image to the right or to the left of the center of the page but you will still be unable to to post text next to the image only over or under the image height and/or you wont be able to have text on both side of an image
but correct me if i am wrong

33 (edited by druvans 2005-04-23 14:22)

Re: adding bbcode

I think you should be, but as you have a working solution, why bother wink.

34

Re: adding bbcode

yeah well as you can see i have but one problem and its with firefox it does not react like explorer and opera to the tag and i dont know how to fix it so i am waiting to see if someone as a idea on how to fix it

Re: adding bbcode

where is the link to your test post

36 (edited by Ataxy 2005-04-26 21:45)

Re: adding bbcode

http://d-vault.peerforces.com/forum/vie … 1216#p1216

so as you will see in explorer the image appear but in firefox they get resized to fit the height of the text

ok problem is partialy solved by forcing cell width but IE does not seem to care about cell width

Re: adding bbcode

there is one reason why I'm working on the CSS version so I can avoid problems like that

38

Re: adding bbcode

yeah i cant wait too see how your mod is going to come out

Re: adding bbcode

oops, it is beyond my reach

Re: adding bbcode

Earlier, shinko_metsuo wrote:

...

      '<p/><div align="$1">$2</div><p>',

...

<p/> should probably be </p>. (PLEASE forgive me if this has already been said; I'm on a handheld right now.)

Re: adding bbcode

Ataxy wrote:

ok well i got it to work
so any way just a stupid error in the code of my previous code
the line to be added are the following it only gives two table but one may easly mod it to have more then two

'#\[table\](.*?),(.*?)\[/table\]#',

and

'<table><tr><td>$1</td><td>$2</td></tr></table>',

as i understood since xhtml is strict i had forgoten to close the <table> tag to </table>
and the result is the following
http://d-vault.peerforces.com/table2.png

EDIT:
ok to get 3 table just add this

'#\[table3\](.*?),(.*?),(.*?)\[/table3\]#',

and this

'<table><tr><td>$1</td><td>$2</td><td>$3</td></tr></table>',

I guess this is just a newbie question, but what is the # for? I know the \ escapes things.

42

Re: adding bbcode

scottywz wrote:
Ataxy wrote:

ok well i got it to work
so any way just a stupid error in the code of my previous code
the line to be added are the following it only gives two table but one may easly mod it to have more then two

'#\[table\](.*?),(.*?)\[/table\]#',

and

'<table><tr><td>$1</td><td>$2</td></tr></table>',

as i understood since xhtml is strict i had forgoten to close the <table> tag to </table>
and the result is the following
http://d-vault.peerforces.com/table2.png

EDIT:
ok to get 3 table just add this

'#\[table3\](.*?),(.*?),(.*?)\[/table3\]#',

and this

'<table><tr><td>$1</td><td>$2</td><td>$3</td></tr></table>',

I guess this is just a newbie question, but what is the # for? I know the \ escapes things.

i dont have any idea i just copyed the pattern in the parser file to figure how to make it

Re: adding bbcode

You know of the EasySmilies mod? Well, I thought, Why doesn't someone apply the same concept (smilies in the DB) to BBCode (BBCode in the DB)? smile

Re: adding bbcode

the #'s at the beginning and end allow you to call flags at the end (not sure if thats their correct name) e.g.

#regex#i

is case insensitive

#regex#e

gets parsed by php after the replacement

Re: adding bbcode

Why would you want to call a flag or whatever at the end?

Re: adding bbcode

read my post

47

Re: adding bbcode

how would i go about adding lists, like this

Re: adding bbcode

instead of adding BBcode to your DB you could have it in a TXT (probly easyer)

49 (edited by scottywz 2005-06-16 02:11)

Re: adding bbcode

Gizzmo wrote:

how would i go about adding lists, like this

The people who wrote that page wrote:


  • Red

  • Blue

  • Yellow

The proper syntax should be:


  • Red

  • Blue

  • Yellow

- - - - - - - - - - - - - - - - - - - - - - - -

shinko_metsuo wrote:

instead of adding BBcode to your DB you could have it in a TXT (probly easyer)

In a PHP instead so I can include() it in the parser.php file and it will get parsed by PHP. And maybe an admin plugin to edit said PHP file in an easier manner?
- - - - - - - - - - - - - - - - - - - - - - - -
Another BBCode suggestion: An [hr /] to add the <hr /> element ([hr /] to follow the rules of XHTML, maybe also a [hr])
- - - - - - - - - - - - - - - - - - - - - - - -

Ataxy wrote:

ok well i got it to work
so any way just a stupid error in the code of my previous code
the line to be added are the following it only gives two table but one may easly mod it to have more then two

'#\[table\](.*?),(.*?)\[/table\]#',

and

'<table><tr><td>$1</td><td>$2</td></tr></table>',

as i understood since xhtml is strict i had forgoten to close the <table> tag to </table>
and the result is the following
http://d-vault.peerforces.com/table2.png

EDIT:
ok to get 3 table just add this

'#\[table3\](.*?),(.*?),(.*?)\[/table3\]#',

and this

'<table><tr><td>$1</td><td>$2</td><td>$3</td></tr></table>',

Maybe a better way of making tables?
Eg.

[table][tr]Hi![/tr][tr]Hello, world![/tr][tr]Bye![/tr][/table]

Outputs:

<table><tr><td>Hi!</td></tr><tr><td>Hello, world!</td></tr><tr><td>Bye!</td></tr></table>

smile Allows users to have more than 3 or less than 2 rows.

Re: adding bbcode

There is not much other BB you would need besides the ones supplied and of course

<del>text</del>

to be

[s]text[/s]