Old posts with latex not converted - MathJax
Old posts with latex not converted
Hello,
i switched over from phpbb2 to phpbb3. In phpbb3 I can create new posts with latex and they are convertered / shown as graphics. The problem is, that the old posts made during phpbb2 show only the bbcode in the posts if you open them. But if you open them i edit mode and safe them again, it's working. It seems to be a general bbcode problem. My impression is, that in phpbb3 the bbcodes are processed / converted when the post is saved and in phpbb2 the latex graphics were produced when shown in the browser.
Is there a possibility to safe all posts of the bulletin board again to process the bbcode?
I am using this bbcode replacement
[tex]{TEXT}[/tex] => <img src="/cgi-bin/mimetex.cgi?{TEXT}">
Your extension seems to do something similar but also does not automatically convert old posts.
i switched over from phpbb2 to phpbb3. In phpbb3 I can create new posts with latex and they are convertered / shown as graphics. The problem is, that the old posts made during phpbb2 show only the bbcode in the posts if you open them. But if you open them i edit mode and safe them again, it's working. It seems to be a general bbcode problem. My impression is, that in phpbb3 the bbcodes are processed / converted when the post is saved and in phpbb2 the latex graphics were produced when shown in the browser.
Is there a possibility to safe all posts of the bulletin board again to process the bbcode?
I am using this bbcode replacement
[tex]{TEXT}[/tex] => <img src="/cgi-bin/mimetex.cgi?{TEXT}">
Your extension seems to do something similar but also does not automatically convert old posts.
-
- Registered User
- Posts: 24
- Joined: Sun Jun 10, 2018 8:54 am
Re: Old posts with latex not converted
I could see about writing some sort of converter, but I'm currently on vacation. Also, just for completeness, you upgraded to phpBB 3.2?
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules
If you have any questions about the rules/customs of this website, feel free to send me a PM.
My little corner of the world | Administrator @ phpBB Modders
Knowledge Base | Documentation | Community rules
If you have any questions about the rules/customs of this website, feel free to send me a PM.
My little corner of the world | Administrator @ phpBB Modders
-
- Community Team Leader
- Posts: 4000
- Joined: Mon Sep 01, 2014 1:00 am
- Location: sudo rm -rf /
- Name: Kailey Snay
Re: Old posts with latex not converted
I am using 3.2, yes. A converter would be great. An alternative would be to adapt the procedure from phpbb 2:
There in /includes/bbcode.php i had added such a string:
The question is if it is possible to adapt this approach to phpBB 3.2 and the new structure of bbcode.php
There in /includes/bbcode.php i had added such a string:
Code: Select all
$text = preg_replace($patterns, $replacements, $text);
$text = preg_replace('/\[tex\](.*?)\[\/tex\]/ie', "'<img src=\"/cgi-bin/mimetex.cgi?'.rawurlencode('$1').'\" />'", $text); // mimetex
-
- Registered User
- Posts: 24
- Joined: Sun Jun 10, 2018 8:54 am
Re: Old posts with latex not converted
You probably need to wait the core code to automatically reparse all of your posts, or even better use the CLI to reparse them at once.beta5 wrote: The problem is, that the old posts made during phpbb2 show only the bbcode in the posts if you open them. But if you open them i edit mode and safe them again, it's working.
Free support for our extensions also provided here: phpBB Studio
Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee ->
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee ->
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
-
- I've Been Banned!
- Posts: 17538
- Joined: Mon Apr 04, 2005 11:09 pm
- Location: I'm with Ukraine 🇺🇦
- Name: Marco
Re: Old posts with latex not converted
I made some research on CLI. As I don't have shell access, I learned that cronjobs are executed on pageviews. But obviously not every cron job on each pageview. I would like to use the cronjobservice cronjob.de to accelerate the reparsing. What is the corresponding call?
Is that correct? I cannot see if this call does anything. The extension "Cron Status" cannot recognize the last execution date ("Auto").
https://domain.com/cron.php?cron_type=c ... er.pm_text
Is that correct? I cannot see if this call does anything. The extension "Cron Status" cannot recognize the last execution date ("Auto").
https://domain.com/cron.php?cron_type=c ... er.pm_text
-
- Registered User
- Posts: 24
- Joined: Sun Jun 10, 2018 8:54 am
Re: Old posts with latex not converted
I tried using cli with the command3Di wrote:You probably need to wait the core code to automatically reparse all of your posts, or even better use the CLI to reparse them at once.beta5 wrote: The problem is, that the old posts made during phpbb2 show only the bbcode in the posts if you open them. But if you open them i edit mode and safe them again, it's working.
Code: Select all
php bin/phpbbcli.php --safe-mode reparser:reparse --ansi
It seems not to be a problem of the command, as also standard commands likeParse eror: syntax error, unexpected '[' in /home/www/...forum/bin/phpbbcli.php on line 76
from the tutorial https://area51.phpbb.com/docs/dev/3.1.x ... arted.html do produce the same error.php bin/phpbbcli.php list
I am using phpBB 3.2.2, PHP Version 5.5.30 and Putty to access the command line.
-
- Registered User
- Posts: 24
- Joined: Sun Jun 10, 2018 8:54 am
Re: Old posts with latex not converted
This is for 3.2 https://area51.phpbb.com/docs/dev/3.2.x ... arted.html
Tested with PHP 5.5.38 and other versions too, and it works.
https://prntscr.com/jyfgsw
You should be able to raise your PHP in cPanel, else ask your host.
That happened with PHP 5.3.28 here, not supported by phpBb 3.2.xx.
If you comment that line 76 this way
you will see if it starts or indicates you something about your PHP version currently running, like:
Tested with PHP 5.5.38 and other versions too, and it works.
https://prntscr.com/jyfgsw
You should be able to raise your PHP in cPanel, else ask your host.
Parse eror: syntax error, unexpected '[' in /home/www/...forum/bin/phpbbcli.php on line 76
That happened with PHP 5.3.28 here, not supported by phpBb 3.2.xx.
If you comment that line 76 this way
//$language->set_default_language($phpbb_container->get('config')['default_lang']);
you will see if it starts or indicates you something about your PHP version currently running, like:
Filed a bug report https://tracker.phpbb.com/browse/PHPBB3-15705acer@acer-PC MINGW64 /c/wamp64/www/QI/boards/322_test
$ /c/wamp64/bin/php/php5.3.28/php bin/phpbbcli.php reparser:reparse --ansi
You are running an unsupported PHP version. Please upgrade to PHP 5.4.0 or higher before trying to install or update to phpBB 3.2
Free support for our extensions also provided here: phpBB Studio
Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee ->
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee ->
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
-
- I've Been Banned!
- Posts: 17538
- Joined: Mon Apr 04, 2005 11:09 pm
- Location: I'm with Ukraine 🇺🇦
- Name: Marco
Re: Old posts with latex not converted
Hm, the PHP version is not the problem I think. I switched between version and got:
- 5.3.29: "not supported, please update > 5.4" => expected
- 5.5.30: Error on line 76 as reported above
- 5.6.16: Same as for 5.5.30
- 7.x.: Some kind of sql error
When I comment line 76 as suggested, I also get the message "not supported, please update > 5.4" even if 5.5 or 5.6. is active.
I checked the running php version with the phpinfo in phpbb.
- 5.3.29: "not supported, please update > 5.4" => expected
- 5.5.30: Error on line 76 as reported above
- 5.6.16: Same as for 5.5.30
- 7.x.: Some kind of sql error
When I comment line 76 as suggested, I also get the message "not supported, please update > 5.4" even if 5.5 or 5.6. is active.
I checked the running php version with the phpinfo in phpbb.
-
- Registered User
- Posts: 24
- Joined: Sun Jun 10, 2018 8:54 am
Re: Old posts with latex not converted
That's not helping, you are seeking help and therefore you should provide detailed error reports.beta5 wrote:- 7.x.: Some kind of sql error
Try and apply this code changes.beta5 wrote: - 5.5.30: Error on line 76 as reported above
- 5.6.16: Same as for 5.5.30
https://github.com/phpbb/phpbb/pull/526 ... da079644b4
Free support for our extensions also provided here: phpBB Studio
Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee ->
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee ->
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
-
- I've Been Banned!
- Posts: 17538
- Joined: Mon Apr 04, 2005 11:09 pm
- Location: I'm with Ukraine 🇺🇦
- Name: Marco
Re: Old posts with latex not converted
Thanks for your intensive support.
Both 5.5 and 5.6 say the same with the recommended changes in phpbbcli.php:
Both 5.5 and 5.6 say the same with the recommended changes in phpbbcli.php:
Might it be worth checking if special php settings you have are mandatory and maybe deactive on my webserver?You are running and unsupported PHP version. Please upgrade to 5.4.0 or higher before trying to install or update to phpBB 3.2
-
- Registered User
- Posts: 24
- Joined: Sun Jun 10, 2018 8:54 am
Re: Old posts with latex not converted
I strongly believe your board is NOT running on the same PHP you are switching to, somewhere.
Last call:
go to ACP and in the landing page, at the top, there are the statistics (total posts, total topics, db version, nr. of attachments etc..)...
... there you will find the PHP and phpBB version which effectively your board is running on.
Last call:
go to ACP and in the landing page, at the top, there are the statistics (total posts, total topics, db version, nr. of attachments etc..)...
... there you will find the PHP and phpBB version which effectively your board is running on.
Free support for our extensions also provided here: phpBB Studio
Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee ->
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee ->
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
-
- I've Been Banned!
- Posts: 17538
- Joined: Mon Apr 04, 2005 11:09 pm
- Location: I'm with Ukraine 🇺🇦
- Name: Marco
Re: Old posts with latex not converted
For proof see screenshots below:
-
- Registered User
- Posts: 24
- Joined: Sun Jun 10, 2018 8:54 am
Re: Old posts with latex not converted
This is not anymore an extension's support issue, nor a phpBB support issue as well.
This is now a problem you should solve with your host. IMHO.
All what I can say is, it should run without issues looking at your screenshot.
Ask you host if there is some .htaccess rule which is overriding your PHP with another which is less than 5.4. (Already seen)
Good luck.
This is now a problem you should solve with your host. IMHO.
All what I can say is, it should run without issues looking at your screenshot.
Ask you host if there is some .htaccess rule which is overriding your PHP with another which is less than 5.4. (Already seen)
Good luck.
Free support for our extensions also provided here: phpBB Studio
Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee ->
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee ->
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
-
- I've Been Banned!
- Posts: 17538
- Joined: Mon Apr 04, 2005 11:09 pm
- Location: I'm with Ukraine 🇺🇦
- Name: Marco