Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: pat_speeder
Hi Yiannis.
Here is a rapid solution to your problem (not tested into a in production website but may work).
Change this line into the plugin code:
$buffer = preg_replace('/<!--([^<|\[|>|go{2}gleo]).*?-->/s', '', $buffer);
By this one instead:
$buffer = preg_replace('/<!--([^<|\s|\[|>|go{2}gleo]).*?-->/s', '', $buffer);
Last edited by Pat64 (2019-05-21 12:59:39)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: pat_speeder
Hi Patrick,
I just replaced the code but the resulting breaking page is the same:( I guess that the html tags at play in that page maybe too many.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: pat_speeder
Nope.
I’m trying your code (with an HTML comment with a space in the middle):
p. Social meaning comes not just from the manifest content of communication (i.e., literal information), but also from latent content — how language is structured and used, as well as how communicators address each other, e.g., through non-verbal means — gestures, head nods, body position, and the dynamics in communication patterns.<!-- --><notextile><sup class="tooltip"><a href="#fn11" id="foot11" class="customTarget">11</a><span class="tooltiptext noprint">Nafeez Ahmed, "The Pentagon's secret pre-crime program to know your thoughts, predict your future," <em>Medium</em>. Posted 1 February 2016. <a rel="external" href="https://medium.com/insurge-intelligence/the-pentagon-s-secret-pre-crime-program-c7d281eca440">medium.com/insurge-intelligence/the-pentagon-s-secret-pre-crime-program-c7d281eca440</a> (accessed 10 May 2018).</span></sup></notextile>
And I got this (no space before the footnote):

pat_speeder set to “Compact Mode”.
Last edited by Pat64 (2019-05-21 16:41:05)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: pat_speeder
Hi Patrick,
Here is the parsed page when using <!----> without the space. If you run it through the W3 validator, you will see some of the issues
ps. and here is the page again with the amendment you proposed in the plugin code.
Last edited by colak (2019-05-22 07:01:12)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: pat_speeder
Please Yiannis, could you try by using a space in the middle of the HTML comment, like this:
<!-- -->
That’s how I got the result as shown into the screen capture above.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: pat_speeder
Hi Patrick,
With the space in the middle all works just fine with the vanilla and the amended regex of the plugin.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: pat_speeder
So, all is fine now?
(but this is a kind of hack just for you: I need to review this regex in order to add your problem and keep the removing process for all HTML comments (with or witout a space in the middle)!)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: pat_speeder
Latest version 2.1: https://github.com/cara-tm/pat_speeder
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: pat_speeder
Hi Patrick,
Thanks so much for the update of the plugin. I’m trying to find the _zip.txt file but I cannot. Is there one?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: pat_speeder
Maybe into the /dist folder: https://github.com/cara-tm/pat_speeder/tree/master/dist
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: pat_speeder
So Patrick,
what I meant to ask is if you have the plugin compiled.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: pat_speeder
No. Uncompress the zip file. Put the folder into your /textpattern/plugins directory. From the admin site, select the plugin into the plugins available list.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: pat_speeder
Yannis.
I don’t know why, but into the plugins panel from a website published with TXP 4.8.8, I’have a new field named “Install a plugin from disk”. This field (not present in other 4.8.8 sites) lists all plugins available but not installed. So I can add a new plugin from an uncompressed zip file.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: pat_speeder
Hi Patrick,
I’m running txp v 4.9.0-dev. I have the same a similar issue. I uploaded the plugin in the /textpattern/plugins directory and, although I do see the Import from drive pulldown, I cannot see pad_speeder in the list. Would this be a bug in txp?
Last edited by colak (2024-05-11 04:42:54)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: pat_speeder
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
