Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2008-12-11 00:10:53

Walker
Plugin Author
From: Boston, MA
Registered: 2004-02-24
Posts: 592
Website

Re: Plugin developers' wish list

I created something on the github fork I pulled from the unofficial mirror of the textpattern dev4.0 repo.

Read about it here: http://signalfade.com/487/new-textpattern-callback-event

Last edited by Walker (2008-12-11 00:11:15)

Offline

#14 2008-12-11 05:41:59

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Plugin developers' wish list

Walker,

Tag-level events are an interesting area which we’ve been scratching on the surface lately.

Like Manfre’s comment on your site implies, I’d also like to have a more orthogonal general-purpose method of conveying the “payload” from the individual core tag handler to the chain of plugins. Not all plugin results are created as strings, for instance. Some tags might require the concatenation of the plugin chain’s results, while others need some boolean yes/no decision collected from the associated plugins.

Image a not-yet-existing tag <txp:if_frontpage />. The core cannot determine exactly if the current presentation state is the “real” frontpage at all, despite an absence of $s, $q, $c, ($pg or $pg==1) etc pp because of plugins which might also modify the frontpage presentation depending on whatever. This boils down to the need for a communication channel between the core and plugins on a tag level, most desirably by using events and callbacks. But in this case, any plugin in the chain should have the opportunity to cast an instant veto and short-circuit the whole action.

A spec for this is what I’d love to see.

Offline

#15 2008-12-11 14:05:53

Walker
Plugin Author
From: Boston, MA
Registered: 2004-02-24
Posts: 592
Website

Re: Plugin developers' wish list

Wet,

If you’d be willing to give me some process examples (or any other starting points) I would take it from there and bring some kind of fleshed out spec back for review before trying an implementation.

Offline

#16 2008-12-11 14:16:21

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Plugin developers' wish list

I’ve split this into a thread of its own.

Last edited by wet (2008-12-12 03:20:45)

Offline

#17 2009-02-12 15:07:28

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Plugin developers' wish list

Log callbacks, so you can prevent hits from being logged under certain conditions, such as site author visits, web crawler visits, run spam checks (referer spam), etc. Lots of pluggable things you could do if we had this.

Offline

#18 2009-02-13 22:13:48

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Plugin developers' wish list

Mary wrote:

Log callbacks…

I’ve put a simple callback into log_hit(), assuming that all other necessities are in globals anyhow.

Offline

#19 2009-02-14 07:15:03

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Plugin developers' wish list

Danke. :)

Offline

#20 2009-02-14 07:40:04

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Plugin developers' wish list

Offline

#21 2009-02-14 11:23:32

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Plugin developers' wish list

Mary wrote:

Danke. :)

%[de-at-vienna]Es war mir ein Vergnügen, gnä' Frau!%

Offline

Board footer

Powered by FluxBB