Recently upgraded to 3.2 - custom "table" BB code has stopped working

Get help developing custom BBCodes or request one.
Post Reply
User avatar
Big Mac
Registered User
Posts: 68
Joined: Sun May 27, 2012 11:31 am
Location: London, UK
Name: David Shepheard
Contact:

Recently upgraded to 3.2 - custom "table" BB code has stopped working

Post by Big Mac » Sun Mar 25, 2018 2:13 pm

Support Request Template
What version of phpBB are you using? phpBB 3.2.2
What is your board's URL? http://www.thepiazza.org.uk/bb/index.php
Who do you host your board with? Hostpresto
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Please select your answer
Is registration required to reproduce this issue? No
Do you have any MODs installed? No
Do you have any extensions installed? No
What styles do you currently have installed? prosilver
What language(s) is your board currently using? British English
Which database type/version are you using? MariaDB
What is your level of experience? New to PHP and phpBB
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? Refer to: viewtopic.php?f=556&t=2464576
We recently moved hosts, and then upgraded from 3.0 to 3.2.2
Please describe your problem. One of the three custom BB Codes we have, has stopped working. It is a code that makes tables. (We have two other custom BB codes that work just fine.)
Here is our code:
BB Code usage

Code: Select all

[table]{TEXT}[/table]
HTML repacement

Code: Select all

<script type="text/javascript">
var titletext='{TEXT}'

do {
titletext = titletext.replace('<br />', '</td></tr><tr><td>');
}
while (titletext != titletext.replace('<br />', '</td></tr><tr><td>'));


do {
titletext = titletext.replace('|', '</td><td>');
}
while (titletext != titletext.replace('|', '</td><td>'));
titletext = titletext.replace('|', '</td><td>');
titletext = '<table border="1"><tr><td>' + titletext ;
titletext = titletext + '</tr></td></table>' ;
document.write(titletext);
</script>
Help line

Code: Select all

[table]row 1|2|3|4|5     second line|2|3|4     third[/table]
The data now put into tables, no longer appears.

Here is an example of a page on our forum where the table is not showing up: Monsters of Ghostwalk (on 3.2 forum)
Here is the same topic on the Wayback Machine, where you can see how the table used to display data: Monsters of Ghostwalk (3.0 version at the Wayback Machie)
Generated by SRT Generator

I looked around for other people having similar problems, and found a few people with broken table codes, but their code works differently to ours. I've also tried looking for how Javascript can be use in Custom BB tags, but couldn't get the right page to show up. (I'm guessing I'm using the wrong search terms, but the word "table" also throws up a lot of false positives.)

I've asked for help with the Javascript elsewhere and had people tell me that the Javascript in this tag needs to go on one line. I've tried changing that, but could not get it to work.

I've also been told that Javascript can be turned off by client machines, but the same script worked before and works on the Wayback Machine. So I don't exactly understand why that would make it work on 3.0, but not work on 3.2.

I've asked our hosting company if there is any sort of setting on our server that might disable Javascript. They asked me to come and ask you if there is something within phpBB that might be stopping this.

I am hoping that you can help me get this BB Code working with the syntax we are using, as we have dozens of posts that use tables now. If I have to switch to another type of tables, I might need to go hunting down a ton of posts to fix them. :o

Thanks in advance for any help you can give me.
David "Big Mac" Shepheard

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 49731
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Recently upgraded to 3.2 - custom "table" BB code has stopped working

Post by stevemaury » Sun Mar 25, 2018 2:53 pm

The BBCode parser was changed.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. PM or email me.

All unsolicited PMs will be ignored.

User avatar
Big Mac
Registered User
Posts: 68
Joined: Sun May 27, 2012 11:31 am
Location: London, UK
Name: David Shepheard
Contact:

Re: Recently upgraded to 3.2 - custom "table" BB code has stopped working

Post by Big Mac » Sun Mar 25, 2018 10:26 pm

stevemaury wrote:
Sun Mar 25, 2018 2:53 pm
The BBCode parser was changed.
Thanks Steve. I know that Ascraeus was improving a lot of things, but totally lost track of what was happening and didn't know about this. And I know very little about the improvements of Rhea.

I'll close the ticket with my hosting company then, as it isn't at their end.

I found a Knowledge Base article, by pentapenguin, called Adding Custom BBCodes in phpBB3, but that talks about Olympus and I can't find anything about BBCode improvements in Rhea.

This other support ticket (Broken BBCode parser in 3.2.0) seems to suggest there was a BBCode problem with 3.2.0 that 3.2.1 was going to fix.

Do we have to edit our BBCode, for that tag, to make it 3.2.2 compatible or change a new 3.2 setting to get phpBB to parse the Javascript in our code?

EDIT: Looks like my topic has been moved to another forum. I've looked around here and found a post where Brf says that a user called JoshyPHP who writes really useful posts about getting BBCode to work. I've looked for any topic where JoshyPHP has spoken to someone about Javascript and found a topic called BBCode containing Javascript - not working after updating to 3.2.x. Berthold says that they have a workaround to get Javascript working in their BBCode, so maybe that workaround would work for me. Sadly, I don't quite understand what is going on with Berthold's code (and I don't want to derail someone else's topic by asking newbie questions there). JoshyPHP seemed to be suggesting that Berthold could move Javascript out of a BBCode into the footer of the page. I'm not sure if that would work for me or how it would work.

Does anyone think I have a similar issue to Berthold?

Berthold also says something about getting stuff onto one line. That didn't work for me, but if more people are suggesting it works, perhaps I did something wrong putting it on one line.

Should I be trying to research how to inject Javascript into page footers (and how to get BBCode to talk to footers)?

Is Javascript support in BBCode going to come back in 3.2.3? Can I just be patient and wait a bit and this existing code will work again? :?
David "Big Mac" Shepheard

User avatar
Big Mac
Registered User
Posts: 68
Joined: Sun May 27, 2012 11:31 am
Location: London, UK
Name: David Shepheard
Contact:

Re: Recently upgraded to 3.2 - custom "table" BB code has stopped working

Post by Big Mac » Sun Apr 01, 2018 4:28 pm

Big Mac wrote:
Sun Mar 25, 2018 2:13 pm
Here is an example of a page on our forum where the table is not showing up: Monsters of Ghostwalk (on 3.2 forum)
Here is the same topic on the Wayback Machine, where you can see how the table used to display data: Monsters of Ghostwalk (3.0 version at the Wayback Machie)
A friend has found me another example of the table tag on our forum that has gone wrong in a different way.

Instead of just being invisible (like the above example) the table tag in this post has somehow pulled some of the other posts inside a bunch of boxes.
Screen Shot 2018-04-01 at 17.22.16.jpg
Strange behaviour of table tag
Here is what is in that table:
[table]2000 | Dungeons & Dragons The Movie Fast Play Game: Sewers of Sumdall | Vaguely based in 3E, Pre Gen characters only.[/table]

There is actually a table there (with three columns as intended). The first two cells do contain "2000" and "Dungeons & Dragons The Movie Fast Play Game: Sewers of Sumdall" (as intended). But something has gone wrong after that.

Does anyone have any ideas about adjusting the Javascript to make it work properly with 3.2.2?

Are we using a word that was legal under 3.0, but reserved for something inside phpBB under 3.2?
David "Big Mac" Shepheard

User avatar
Big Mac
Registered User
Posts: 68
Joined: Sun May 27, 2012 11:31 am
Location: London, UK
Name: David Shepheard
Contact:

Re: Recently upgraded to 3.2 - custom "table" BB code has stopped working

Post by Big Mac » Sun Nov 11, 2018 4:41 pm

Bump.

Any chance of getting some help on making the JavaScript work with the 3.2 parser?
David "Big Mac" Shepheard

Post Reply

Return to “Custom BBCode Development and Requests”

Who is online

Users browsing this forum: No registered users and 3 guests