Pages:
1
2 |
mjavado
Member
 
Posts: 19
Registered: 7-1-2012
Member Is Offline
|
|
[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
|
|
Mouser
XMB Contributor
      
Posts: 202
Registered: 4-14-2008
Member Is Offline
Mood: Christmasy. Yes, in September.
|
|
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
 
|
|
mjavado
Member
 
Posts: 19
Registered: 7-1-2012
Member Is Offline
|
|
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
|
|
Mouser
XMB Contributor
      
Posts: 202
Registered: 4-14-2008
Member Is Offline
Mood: Christmasy. Yes, in September.
|
|
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 
|
|
mjavado
Member
 
Posts: 19
Registered: 7-1-2012
Member Is Offline
|
|
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  .
Regards,
Marijn
Attachment: functions_including_table.inc.php (85kB) This file has been downloaded 566 times
|
|
Mouser
XMB Contributor
      
Posts: 202
Registered: 4-14-2008
Member Is Offline
Mood: Christmasy. Yes, in September.
|
|
Tested it on my own board this time  Should work now.
[ Attachment removed; old file]
Always good if you learn something 
|
|
mjavado
Member
 
Posts: 19
Registered: 7-1-2012
Member Is Offline
|
|
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 574 times
|
|
Mouser
XMB Contributor
      
Posts: 202
Registered: 4-14-2008
Member Is Offline
Mood: Christmasy. Yes, in September.
|
|
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]
|
|
mjavado
Member
 
Posts: 19
Registered: 7-1-2012
Member Is Offline
|
|
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.
|

|
|
mjavado
Member
 
Posts: 19
Registered: 7-1-2012
Member Is Offline
|
|
Another set, this time with a .txt post.
Also, what changes did you make? Attachment: knipsel2.txt (2kB) This file has been downloaded 406 times
|
|
Mouser
XMB Contributor
      
Posts: 202
Registered: 4-14-2008
Member Is Offline
Mood: Christmasy. Yes, in September.
|
|
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... 
|
|
mjavado
Member
 
Posts: 19
Registered: 7-1-2012
Member Is Offline
|
|
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 364 times
|
|
Mouser
XMB Contributor
      
Posts: 202
Registered: 4-14-2008
Member Is Offline
Mood: Christmasy. Yes, in September.
|
|
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
|
|
mjavado
Member
 
Posts: 19
Registered: 7-1-2012
Member Is Offline
|
|
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 473 timesAttachment: viewthread_bestanden.rar (120kB) This file has been downloaded 43 times
|
|
Mouser
XMB Contributor
      
Posts: 202
Registered: 4-14-2008
Member Is Offline
Mood: Christmasy. Yes, in September.
|
|
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 
|
|
mjavado
Member
 
Posts: 19
Registered: 7-1-2012
Member Is Offline
|
|
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 602 times
|
|
Mouser
XMB Contributor
      
Posts: 202
Registered: 4-14-2008
Member Is Offline
Mood: Christmasy. Yes, in September.
|
|
Ik zie al waarom het niet werkt. Je gebruikt niet het bestand dat ik telkens upload
Hernoem je bestand naar "functions.inc.php.bck" bijvoorbeeld.
Upload dan dit hier
[ Attachment removed; old file]
|
|
mjavado
Member
 
Posts: 19
Registered: 7-1-2012
Member Is Offline
|
|
De witregels staan er nog steeds. Ik heb de file die jij hier gepost hebt gebruikt, maar ik zie geen verschil. 
|
|
Mouser
XMB Contributor
      
Posts: 202
Registered: 4-14-2008
Member Is Offline
Mood: Christmasy. Yes, in September.
|
|
Het is weekend geweest, dan ben ik nooit online
Kun je de HTML source eens posten van dat wat ik daar zie ?Thx!
|
|
mjavado
Member
 
Posts: 19
Registered: 7-1-2012
Member Is Offline
|
|
|
|
Pages:
1
2 |