XMB Forum Software
Not logged in [Login - Register]
Go To Bottom

Printable Version  
 Pages:  1  
Author: Subject: [Answered] BBcode tables
mjavado
Member
***




Posts: 19
Registered: 7-1-2012
Member Is Offline


[*] posted on 7-1-2012 at 07:03 PM
[Answered] BBcode tables


One question, one suggestion:
- Is it possible to include tables to the BBcode supported by XMB, so the output this site gives you can be used?
- Perhaps it is even a good idea to add this very option to the bar just above the typing box while typing a reply.

Regards,

Marijn
View user's profile View All Posts By User
Mouser
XMB Contributor
********




Posts: 202
Registered: 4-14-2008
Member Is Offline

Mood: Christmasy. Yes, in September.

[*] posted on 7-1-2012 at 08:44 PM


Hi Martijn,

Those tags van be easily added to be used.
Adding them in the bar above the typing box, takes some more effort.



If you want very basic support..
Check out these two images.
This is file ./include/functions.php

Added to the first image, was line;
543-545
561-563


Added to the first image, were lines;
621-623
658-660

And a comma at the end of the lines before that 619/656


1.png - 26kB2.png - 93kB
View user's profile View All Posts By User
mjavado
Member
***




Posts: 19
Registered: 7-1-2012
Member Is Offline


[*] posted on 7-2-2012 at 11:40 AM


If I do this and generate a test table, my input is this

Code:
[table] [tr] [th]Test 1[/th] [th]Test 2[/th] [th]Test 3[/th] [/tr] [tr] [td]1'1[/td] [td]1'2[/td] [td]1'3[/td] [/tr] [tr] [td]2'1[/td] [td]2'2[/td] [td]2'3[/td] [/tr] [/table]


But at the forum, it turns out to be this
Code:
[/table] [/tr] [/th]Test 1[/th] [/th]Test 2[/th] [/th]Test 3[/th] [/tr] [/tr] [td]1'1[/td] [td]1'2[/td] [td]1'3[/td] [/tr] [/tr] [td]2'1[/td] [td]2'2[/td] [td]2'3[/td] [/tr] [/table]


I added an extra line to the triplet you added, taking [td] in account. Afterwards, the output was
Code:
[/table] [/tr] [/th]Test 1[/th] [/th]Test 2[/th] [/th]Test 3[/th] [/tr] [/tr] [/td]1'1[/td] [/td]1'2[/td] [/td]1'3[/td] [/tr] [/tr] [/td]2'1[/td] [/td]2'2[/td] [/td]2'3[/td] [/tr] [/table]


I guess this means that I now successfully made my forum replace [table], [tr], [th] and [td] into their [/...] counterparts.

I have tried replacing lines 658-660 as seen in picture 2 without the '/', with the result that my input was indeed the output. No table showed up, however...

After replacing the lines 658-660 with their <> counterparts, I saw some improvement, but my entire lay-out was changed.
Afterwards, I put the following in the file, instead of what you proposed in picture 2:

Code:
Under the //Replace simple tags, around your lines 621-623 29 => '[/rquote]', 30 => '[table]', 31 => '[tr]', 32 => '[th]', 33 => '[td]', 34 => '[/table]', 35 => '[/tr]', 36 => '[/th]', 37 => '[/td]', );

Code:
Around your lines 658-660 29 => ' </td></tr></table><font class="mediumtxt">', 30 => '<table>', 31 => '<tr>', 32 => '<th>', 33 => '<td>', 34 => '</table>', 35 => '</tr>', 36 => '</th>', 37 => '</td>', );


This yielded the desired result. However, there were some blank lines above the table.

Thanks for your support. Thanks to these pictures and a good look at the file, I now understand how to create these BBCode commands.

This leaves me with one question
Is there any way to remove the blank lines above the tables created this way? If neccessary, I will upload the functions.inc.php file I use now.

Regards,

Marijn Jansen van Doorn
View user's profile View All Posts By User
Mouser
XMB Contributor
********




Posts: 202
Registered: 4-14-2008
Member Is Offline

Mood: Christmasy. Yes, in September.

[*] posted on 7-2-2012 at 04:46 PM





I see the mistakes now ... My apolegies. I slept less then 8 hours in the entire weekend.
Please attach your functions.inc.php and i'll check it out :)
View user's profile View All Posts By User
mjavado
Member
***




Posts: 19
Registered: 7-1-2012
Member Is Offline


[*] posted on 7-2-2012 at 06:04 PM


Here it is. It's fully working except for the blank lines. I also noticed the table most of the time getting at the bottom of a post, before the signature.
Thanks for your support. I'm happy your mistakes thaught me something :D.

Regards,

Marijn

Attachment: functions_including_table.inc.php (85kB)
This file has been downloaded 491 times
View user's profile View All Posts By User
Mouser
XMB Contributor
********




Posts: 202
Registered: 4-14-2008
Member Is Offline

Mood: Christmasy. Yes, in September.

[*] posted on 7-2-2012 at 08:57 PM


Tested it on my own board this time :) Should work now.

[Attachment removed; old file]


Always good if you learn something :D
View user's profile View All Posts By User
mjavado
Member
***




Posts: 19
Registered: 7-1-2012
Member Is Offline


[*] posted on 7-2-2012 at 09:50 PM


It does not make any difference if I use your file, actually. I have replaced the file, this file being the only edited file in the installed forum. I'll try some more.

Edit:
I think it's weird that the 'quote' code does not behave this way. The <NOBR> does not solve the problem with my tables.

Since I added some other BBcodes, I'll upload that file as well. I don't see how the other lines would interfere, as not having these lines generates the same results. Maybe I'm wrong though.

Attachment: functions_all.inc.php (85kB)
This file has been downloaded 494 times
View user's profile View All Posts By User
Mouser
XMB Contributor
********




Posts: 202
Registered: 4-14-2008
Member Is Offline

Mood: Christmasy. Yes, in September.

[*] posted on 7-3-2012 at 04:34 PM


When I used the file I attached... I saw no extra line breaks anymore.
But I can see what happened, some of my changes were removed.

How does this work for ya ?
Screenshot perhaps , and the content of your post attached here as a TXT file ?

[Attachment removed; old file]
View user's profile View All Posts By User
mjavado
Member
***




Posts: 19
Registered: 7-1-2012
Member Is Offline


[*] posted on 7-3-2012 at 04:53 PM


With your functions.inc.php I get this result. The code is posted above my example, as per explanation on my forum. No blank rules are between them. AND the table is closed with [/table].

I don't see any differences, actually...

the entire visible part, with [ code ] replaced...:
Code:
[code d] [table] [tr] [th]Eerste kolom[/th] [th]Tweede kolom[/th] [/tr] [tr] [td]Dit is de eerste cel van de eerste rij[/td] [td]Dit is de tweede cel van de eerste rij[/td] [/tr] [tr] [td]Dit is de eerste cel van de tweede rij[/td] [td]Dit is de tweede cel van de tweede rij[/td] [/tr] Wordt [/code d] [table] [tr] [th]Eerste kolom[/th] [th]Tweede kolom[/th] [/tr] [tr] [td]Dit is de eerste cel van de eerste rij[/td] [td]Dit is de tweede cel van de eerste rij[/td] [/tr] [tr] [td]Dit is de eerste cel van de tweede rij[/td] [td]Dit is de tweede cel van de tweede rij[/td] [/tr] [/table] Het enige probleem met deze tabel is het volgende: hij komt vaak ineens onderaan de post. Ik typ dit namelijk in de post ONDER de tabel... Maargoed, ik heb de designer van het forum gecontacteerd over dit probleem, inclusief de witregels die altijd ontstaan.


Knipsel.PNG - 164kB
View user's profile View All Posts By User
mjavado
Member
***




Posts: 19
Registered: 7-1-2012
Member Is Offline


[*] posted on 7-3-2012 at 04:57 PM


Another set, this time with a .txt post.

Also, what changes did you make?

Attachment: knipsel2.txt (2kB)
This file has been downloaded 375 times

Knipsel2.PNG - 117kB
View user's profile View All Posts By User
Mouser
XMB Contributor
********




Posts: 202
Registered: 4-14-2008
Member Is Offline

Mood: Christmasy. Yes, in September.

[*] posted on 7-3-2012 at 09:05 PM


This is how it looks like on my own board.

Could you save me the HTML source of the page you are viewing?
Maybe I can see something there...

Capture.PNG - 67kB
View user's profile View All Posts By User
mjavado
Member
***




Posts: 19
Registered: 7-1-2012
Member Is Offline


[*] posted on 7-3-2012 at 11:48 PM


It looks perfect! Why can't it at my forum... ?
I have copied the source HTML

Attachment: HTML of page.txt (94kB)
This file has been downloaded 322 times

View user's profile View All Posts By User
Mouser
XMB Contributor
********




Posts: 202
Registered: 4-14-2008
Member Is Offline

Mood: Christmasy. Yes, in September.

[*] posted on 7-4-2012 at 03:10 PM


I'm quite surprised how you can receive that HTML output with the functions.inc.php I provided. Because something that is in there, should have been filtered out by the file I've uploaded.
Could you provide me with the file you're using right now?
I'd like to check :) Thank you
View user's profile View All Posts By User
mjavado
Member
***




Posts: 19
Registered: 7-1-2012
Member Is Offline


[*] posted on 7-4-2012 at 05:33 PM


I don't quite understand what you mean. Am I to rightclick and 'save page as'?
In that case: here it is, including a .rar of the files the browser saved with it.

If not, what file shoud I upload?

Attachment: viewthread.php (101kB)
This file has been downloaded 387 times

Attachment: viewthread_bestanden.rar (120kB)
This file has been downloaded 37 times

View user's profile View All Posts By User
Mouser
XMB Contributor
********




Posts: 202
Registered: 4-14-2008
Member Is Offline

Mood: Christmasy. Yes, in September.

[*] posted on 7-4-2012 at 07:19 PM


De HTML die je vanacht poste was precies wat ik wilde zien hoor :)

Maar daar staat iets in, dat eigenlijk weg gefilterd had moeten zijn door de functions.inc.php (tenminste, in die wat ik als laatste gepost heb)

Daarom zou ik graag eens willen zien welke functions.inc.php je nu live gebruikt op je forum ;)


Want ik begin het nu niet meer te snappen :D
View user's profile View All Posts By User
mjavado
Member
***




Posts: 19
Registered: 7-1-2012
Member Is Offline


[*] posted on 7-4-2012 at 08:27 PM


Ah, Nederlands!

Ok ik upload 'm nu.
Ik heb niet zo kunnen zien waar je de veranderingen had gemaakt.

Attachment: functions.inc.php (85kB)
This file has been downloaded 527 times
View user's profile View All Posts By User
Mouser
XMB Contributor
********




Posts: 202
Registered: 4-14-2008
Member Is Offline

Mood: Christmasy. Yes, in September.

[*] posted on 7-6-2012 at 10:06 AM


Ik zie al waarom het niet werkt. Je gebruikt niet het bestand dat ik telkens upload :P

Hernoem je bestand naar "functions.inc.php.bck" bijvoorbeeld.
Upload dan dit hier :)

[Attachment removed; old file]
View user's profile View All Posts By User
mjavado
Member
***




Posts: 19
Registered: 7-1-2012
Member Is Offline


[*] posted on 7-6-2012 at 04:02 PM


De witregels staan er nog steeds. Ik heb de file die jij hier gepost hebt gebruikt, maar ik zie geen verschil.

Knipsel.PNG - 69kB
View user's profile View All Posts By User
Mouser
XMB Contributor
********




Posts: 202
Registered: 4-14-2008
Member Is Offline

Mood: Christmasy. Yes, in September.

[*] posted on 7-8-2012 at 09:00 PM


Het is weekend geweest, dan ben ik nooit online :)

Kun je de HTML source eens posten van dat wat ik daar zie ?Thx!
View user's profile View All Posts By User
mjavado
Member
***




Posts: 19
Registered: 7-1-2012
Member Is Offline


[*] posted on 7-10-2012 at 10:58 AM


Bij dezen

Attachment: HTMLvoorbeeld.rar (131kB)
This file has been downloaded 40 times

View user's profile View All Posts By User
 Pages:  1  

  Go To Top

Powered by XMB 1.9.12 (Debug Mode)
XMB Forum Software © 2001-2024 The XMB Group
[Queries: 16] [PHP: 62.9% - SQL: 37.1%]