Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#76 2019-05-21 12:47:30

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,676
GitHub Twitter

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);

Here is the Regex tests.

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

#77 2019-05-21 16:03:08

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,384
Website GitHub Mastodon Twitter

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

#78 2019-05-21 16:39:38

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,676
GitHub Twitter

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

#79 2019-05-22 05:55:59

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,384
Website GitHub Mastodon Twitter

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

#80 2019-05-22 06:57:46

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,676
GitHub Twitter

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

#81 2019-05-22 07:02:34

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,384
Website GitHub Mastodon Twitter

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

#82 2019-05-22 07:16:14

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,676
GitHub Twitter

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

#83 2024-05-09 04:03:29

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,676
GitHub Twitter

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

#84 2024-05-10 04:07:36

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,384
Website GitHub Mastodon Twitter

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

#85 2024-05-10 05:24:45

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,676
GitHub Twitter

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

#86 2024-05-10 07:47:41

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,384
Website GitHub Mastodon Twitter

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

#87 2024-05-10 08:59:37

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,676
GitHub Twitter

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

#88 2024-05-11 03:12:34

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,676
GitHub Twitter

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

#89 2024-05-11 04:42:23

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,384
Website GitHub Mastodon Twitter

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

#90 2024-05-11 05:49:48

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,676
GitHub Twitter

Re: pat_speeder

All is fine with my 4.9-dev installation…

(Image link: https://ibb.co/qmHK7Wq)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

Board footer

Powered by FluxBB