[2.0.17] Table BBCode

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
23
50%
Very Good
8
17%
Good
11
24%
Fair
2
4%
Poor
2
4%
 
Total votes: 46

Koyaanis
Registered User
Posts: 74
Joined: Sun Sep 04, 2005 3:05 pm

Post by Koyaanis »

Well, I tried it again, making sure the extra blank lines were between each one, but still no good.

The errors always seem to hit on any line that his this long string of code in it:

"[0-9A-Fa-f]{6}|non[^e]?[a-z\-]?+|no[^n]e?[a-z\-]?+|no[^n][^e]?[a-z\-]?+(etc.)...."

back to the proverbial drawing board for me....

[cR@zY]Null
Registered User
Posts: 160
Joined: Sun Aug 10, 2003 1:23 pm

Post by [cR@zY]Null »

Delete all tareeks code and test it again. Does the table work then?

tareek
Registered User
Posts: 22
Joined: Thu Jul 28, 2005 2:32 am

Post by tareek »

[cR@zY]Null wrote: ... Also how do I set the table to width=100% Using: [table border=0, size=100%] Does set the table too 100% bus ALSO show this in the table:
[table border=0 size=100%]
Table comes here ...
if you want ALL of you Table BBcodes to appear with 100% width of the "Message" column of phpbb (SubSilver)pages , then ...

add below code
width="100%"

in the four code lines (in bbcode.tpl file modified with SlapShot's Table BBcode only) , which begins with ...
<!-- BEGIN table_open , <!-- BEGIN table_color , <!-- BEGIN table_size , <!-- BEGIN table_cs

or , in the tweleve code lines (in bbcode.tpl file modified with my and SlapShot's codes) , which begins with ...
<!-- BEGIN table_open , <!-- BEGIN table_color , <!-- BEGIN table_size , <!-- BEGIN table_cs , <!-- BEGIN table_ncolor , <!-- BEGIN table_csn , <!-- BEGIN table_border , <!-- BEGIN table_cb , <!-- BEGIN table_cbn , <!-- BEGIN table_sb , <!-- BEGIN table_csb , <!-- BEGIN table_csbn

just before the below symbols/words ...
><!-- END table_

then , no need to use , the size attribute ... size=100%

but if you want to change the widthness to only specific table , which includes this attribute , then , you have to wait for a newer release of Table BBCode MOD , as this attribute is still not recognized by current MOD . In future release it might simply be width=100%

tareek
Registered User
Posts: 22
Joined: Thu Jul 28, 2005 2:32 am

Post by tareek »

[cR@zY]Null wrote: Oke and how about this:
At each table it sets a brake above it so like:

<brake you dont see>
Table comes here
...
when you're typing table bbcode code into the post/reply text-box , if you've pressed keyboard's "Enter" button , inside the [table ....][mrow] ... then you'll see extra "brake" / line .

if you're copy-pasting from another soft to this post-reply text box , even then , it might happen , if EOL's are inside the table bbcode codes . ( take/move your cursor to each line , press "End" and then press "Delete" to remove EOL ) .

also , if you've used/typed something inbetween the tags [table...] [mrow] then , those words might appear like that , so everyone must/should use [mrow] right after the [table] tag/word , for a proper table to appear .

so try to keep the full table bbcode [table...][/table] in one single long line . that is , no keyboard's "Enter" inside the table bbcode . CR / enter can be used , after [mrow] , [row] , [mcol] , [col] .

because , any CR / (Keyboard's enter) or LF (in the text box) will become <br /> in the final delivered html page , which goes to phpbb user .

tareek
Registered User
Posts: 22
Joined: Thu Jul 28, 2005 2:32 am

Post by tareek »

Koyaanis wrote: Well, I tried it again, making sure the extra blank lines were between each one, but still no good.
The errors always seem to hit on any line that his this long string of code in it:
"[0-9A-Fa-f]{6}|non[^e]?[a-z\-]?+|no[^n]e?[a-z\-]?+|no[^n][^e]?[a-z\-]?+(etc.)...."
back to the proverbial drawing board for me....
for example ... in below codebox you'll see 3 (three) line of codes ( to be used inside the function bbencode_first_pass($text, $uid) in bbcode.php ) ...

Code: Select all

	$text = preg_replace("#\[table border=([0-1]) color=(\#[0-9A-Fa-f]{6}|non[^e]?[a-z\-]?+|no[^n]e?[a-z\-]?+|no[^n][^e]?[a-z\-]?+|n[^o]ne?[a-z\-]?+|n[^o]n[^e]?[a-z\-]?+|n[^o][^n]e?[a-z\-]?+|n[^o][^n][^e]?[a-z\-]?+|[^n]one?[a-z\-]?+|[^n]on[^e]?[a-z\-]?+|[^n]o[^n]e?[a-z\-]?+|[^n]o[^n][^e]?[a-z\-]?+|[^n][^o]ne?[a-z\-]?+|[^n][^o]n[^e]?[a-z\-]?+|[^n][^o][^n]e?[a-z\-]?+|[^n][^o][^n][^e]?[a-z\-]?+) fontsize=([1-2]?[0-9])\](.*?)\[/table\]#si", "[table color=\\2 fontsize=\\3 border=\\1:$uid]\\4[/table:$uid]", $text);

	$text = preg_replace("#\[table border=([0-1]) fontsize=([1-2]?[0-9]) color=(\#[0-9A-Fa-f]{6}|non[^e]?[a-z\-]?+|no[^n]e?[a-z\-]?+|no[^n][^e]?[a-z\-]?+|n[^o]ne?[a-z\-]?+|n[^o]n[^e]?[a-z\-]?+|n[^o][^n]e?[a-z\-]?+|n[^o][^n][^e]?[a-z\-]?+|[^n]one?[a-z\-]?+|[^n]on[^e]?[a-z\-]?+|[^n]o[^n]e?[a-z\-]?+|[^n]o[^n][^e]?[a-z\-]?+|[^n][^o]ne?[a-z\-]?+|[^n][^o]n[^e]?[a-z\-]?+|[^n][^o][^n]e?[a-z\-]?+|[^n][^o][^n][^e]?[a-z\-]?+)\](.*?)\[/table\]#si", "[table color=\\3 fontsize=\\2 border=\\1:$uid]\\4[/table:$uid]", $text);

	$text = preg_replace("#\[table color=(none) fontsize=([1-2]?[0-9]) border=([0-1])\](.*?)\[/table\]#si", "[table color=\\1 fontsize=\\2 border=\\3:$uid]\\4[/table:$uid]", $text);

each code line starts with the invisible tab (\t) character
and then $text = ... and ends with the semicolon character ( ; )
and then they have one blank line after . (CR-LF, CR-LF) .
2 code lines are long and last code line is short

Koyaanis
Registered User
Posts: 74
Joined: Sun Sep 04, 2005 3:05 pm

Post by Koyaanis »

[cR@zY]Null wrote: Delete all tareeks code and test it again. Does the table work then?


Yep, works just fine. Even if I leave all his other code in in all the other files and just remove that one section in bbcodes.php. I can even leave the two other blocks of Tareek's edits in that file and still no problems. It's just that central section that's causing these problems. (Of course, if I remove that center section of code from that file, I can't use his additional commands for border and cell options, but everything else works just fine, including the [table], [m/row] [m/col] tags.)
tareek wrote: each code line starts with the invisible tab (\t) character
and then $text = ... and ends with the semicolon character ( ; )
and then they have one blank line after . (CR-LF, CR-LF) .
2 code lines are long and last code line is short


I loaded up the file I've been using to copy from and found a few leading spaces in some lines of the code (not sure how they got there). But the code you posted here on page 10 of this thread, didn't have any leading TABs so I put those in, in a fresh copy & paste from there just now (page 10 of this thread). So ... will try again and see what happens.

I'm suspecting that maybe one of my Custom BBCodes might be interfering, but I'm not sure how. I created custom codes for the HTML tags of center, right, justify, scroll (an simple version of marquee), and marquee. They've not interfered in the standard Table bbcode mod from this thread, nor any others, so ... kind of scratching my head here trying to figure out why it's not working.

Thanks for your patience and advice.

I'll see what happens when I start from scratch again this time.

(editing time passes ....)

Well, that still didn't fix it. It's not a problem with TABs or CR/LF characters. :-(

Out of curiosity, I just now "commented-out" (put the // in front of), the 11 lines of your code that have those long strings in them that I mentioned in my post at the top of this page, and it works just fine without them. Of course, those tags they refer to will no longer be accepted, but everything else works. It's something in those long strings that my board doesn't like.

A string of code like this one:

Code: Select all

	$text = preg_replace("#\[table color=(\#[0-9A-Fa-f]{6}|non[^e]?[a-z\-]?+|no[^n]e?[a-z\-]?+|no[^n][^e]?[a-z\-]?+|n[^o]ne?[a-z\-]?+|n[^o]n[^e]?[a-z\-]?+|n[^o][^n]e?[a-z\-]?+|n[^o][^n][^e]?[a-z\-]?+|[^n]one?[a-z\-]?+|[^n]on[^e]?[a-z\-]?+|[^n]o[^n]e?[a-z\-]?+|[^n]o[^n][^e]?[a-z\-]?+|[^n][^o]ne?[a-z\-]?+|[^n][^o]n[^e]?[a-z\-]?+|[^n][^o][^n]e?[a-z\-]?+|[^n][^o][^n][^e]?[a-z\-]?+)\](.*?)\[/table\]#si", "[table color=\\1:$uid]\\2[/table:$uid]", $text); 
I just now tested all the original table commands, and the color tags weren't working, so I put back in the original strings of code that you had // (commented out) in those sections, and got all my color commands working again now too. Ah well...
Last edited by Koyaanis on Thu Sep 22, 2005 11:28 am, edited 2 times in total.

[cR@zY]Null
Registered User
Posts: 160
Joined: Sun Aug 10, 2003 1:23 pm

Post by [cR@zY]Null »

tareek wrote:
[cR@zY]Null wrote:Oke and how about this:
At each table it sets a brake above it so like:

<brake you dont see>
Table comes here
...
when you're typing table bbcode code into the post/reply text-box , if you've pressed keyboard's "Enter" button , inside the [table ....][mrow] ... then you'll see extra "brake" / line .

if you're copy-pasting from another soft to this post-reply text box , even then , it might happen , if EOL's are inside the table bbcode codes . ( take/move your cursor to each line , press "End" and then press "Delete" to remove EOL ) .

also , if you've used/typed something inbetween the tags [table...] [mrow] then , those words might appear like that , so everyone must/should use [mrow] right after the [table] tag/word , for a proper table to appear .

so try to keep the full table bbcode [table...][/table] in one single long line . that is , no keyboard's "Enter" inside the table bbcode . CR / enter can be used , after [mrow] , [row] , [mcol] , [col] .

because , any CR / (Keyboard's enter) or LF (in the text box) will become <br /> in the final delivered html page , which goes to phpbb user .
It worked, the last part with the keyboard enters, was the problem.

Normaly I make a table like I would in a html file like:
[table]
<tr>
etc to make it readable but well it works now.

Got another problem with images
I have 1 row and one col
In row one i have some text, in the col i have this:
[col]Image[/table]

This results that the image is nor in the middle or at the top. Its something below the middle, but not at the bottom. I also have the <td/tr valing is top> in the bbcc. Al text align on top, but the images seem to have no effect! Also there are NO keyboard spaces this time...

Any ideas?

tareek
Registered User
Posts: 22
Joined: Thu Jul 28, 2005 2:32 am

Post by tareek »

[cR@zY]Null wrote: Oke and how about this:
At each table it sets a brake above it so like:

<brake you dont see>
Table comes here

It does it above each table (clean install of the mod)
...
when you're starting table bbcode's table tag then keep no space ,
no LF (Line-Feed) , no EOL , no CR , etc (control char) in front of the [table ...] tag ,
use it right after the last character of previous line and make sure
you have the code align="top" in those ( previously mentioned ) 4 line ( or , 12 line ) ,
like the code SlapShot434 has used in his released MOD .
this should/will remove any unwanted break / line above the table , that you're having.
Last edited by tareek on Thu Sep 22, 2005 10:54 am, edited 1 time in total.

[cR@zY]Null
Registered User
Posts: 160
Joined: Sun Aug 10, 2003 1:23 pm

Post by [cR@zY]Null »

Got another problem with images
I have 1 row and one col
In row one i have some text, in the col i have this:
[col][img]http://www.xxx.com/images/pand.jpg[/img][/table]

This results that the image is nor in the middle or at the top. Its something below the middle, but not at the bottom. I also have the <td/tr valing is top> in the bbcc. Al text align on top, but the images seem to have no effect! Also there are NO keyboard spaces this time...

Any ideas?

EDIT: got some connections probs here, sorry for the double posts, the inv brake is solved!

tareek
Registered User
Posts: 22
Joined: Thu Jul 28, 2005 2:32 am

Post by tareek »

new table bbcode i'm working on now , will have the feature of
vertical / horizontal alignment of text/object inside the cell ,
so that , new attributes can be used to fine tune the position
of text lines in one cell and/or pictures in another cell , or,
text &/or picture in same cell .

[cR@zY]Null
Registered User
Posts: 160
Joined: Sun Aug 10, 2003 1:23 pm

Post by [cR@zY]Null »

tareek wrote: new table bbcode i'm working on now , will have the feature of
vertical / horizontal alignment of text/object inside the cell ,
so that , new attributes can be used to fine tune the position
of text lines in one cell and/or pictures in another cell , or,
text &/or picture in same cell .

Any timeframe on the new release?

tareek
Registered User
Posts: 22
Joined: Thu Jul 28, 2005 2:32 am

Post by tareek »

how about changing [img] bbcode's code so that it contains ...
<img src="www.website.com/images/test.jpg" alt="test.jpg" align="middle" border="0" vspace="0" />
and in bbcode.tpl ( table bbcode area ) ...
</td></tr><tr><td valign="middle" style="text-align: center;">

minor bugs are getting removed , and i'm stuck in ... , may be next one after SlapShot434 releases one , then i'll submit to him for his approval .

SlapShot434
Registered User
Posts: 364
Joined: Wed May 12, 2004 2:43 am

Post by SlapShot434 »

Hey guys, could i request something? If you have modified your code with tareek's changes, could you possibly PM him if you need help? I will be evacuating my house in a matter of hours and will have no internet access for an indefinate amount of time, and would rather not have people getting confused about what has to be changed if they have NOT modified their code. Tareek, if you would like to use my forum (slapshot.termee.com) as your HQ, please feel free. In the mean time, Please remember that I will be unable to provide any support, so please dont think I'm ignoring you or anything.

Once again, Please refer all support questions regarding tareek's changes to him personally, so that when I return from thid dreadful Hurricane, I can get right back into action in helping you all out.

Thank you very much for understanding, and please stay safe,
Matt Halpin (SlapShot434)
PLEASE NOTE: I have left the coding community and no longer provide support for any coding I may have contributed to in the past. I apologize for the inconvenience and fully welcome anyone perfecting my code for the betterment of this community.

[cR@zY]Null
Registered User
Posts: 160
Joined: Sun Aug 10, 2003 1:23 pm

Post by [cR@zY]Null »

SlapShot434 wrote: Hey guys, could i request something? If you have modified your code with tareek's changes, could you possibly PM him if you need help? I will be evacuating my house in a matter of hours and will have no internet access for an indefinate amount of time, and would rather not have people getting confused about what has to be changed if they have NOT modified their code. Tareek, if you would like to use my forum (slapshot.termee.com) as your HQ, please feel free. In the mean time, Please remember that I will be unable to provide any support, so please dont think I'm ignoring you or anything.

Once again, Please refer all support questions regarding tareek's changes to him personally, so that when I return from thid dreadful Hurricane, I can get right back into action in helping you all out.

Thank you very much for understanding, and please stay safe,
Matt Halpin (SlapShot434)

Good luck!

tareek
Registered User
Posts: 22
Joined: Thu Jul 28, 2005 2:32 am

REQUEST

Post by tareek »

so please , everyone , if you're having any problem
related to the addition of my (tareek's) extra code (page 10) for table bbcode ,
please use the PM , no need to bog down this thread ,
THIS THREAD SHOULD ONLY DISCUSS ABOUT (RELEASED) TABLE BBCODE MOD ,
Thanks .

Post Reply

Return to “[2.0.x] MOD Database Releases”