Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

How deep the changes in the API should be?

14.8% 18
13.9% 17
13.9% 17
57.4% 70

122 Datum 20. April 2009, 03:09

Foren / Cotonti / Core Labs / Archive / Umfrage: Plugin API changes

How far can we go?

Orkan
#11772 24. April 2009, 04:27
8. SQL query hooks.
There are some important queries that a plugin developer would like to modify before they get executed. For example, if you want to affect forum posts order and join it with another table.


Here is my very simple implementation of this idea: http://www.cotonti.com/pastebin/31
I made it for one specific project, where the "query" is passed to several functions modifying it, before it gets executed.
Of course, there is much room for improvement,
Could be done with something more sophisticated, like php class with methods: addWhere(), addJoin(), addOrderBy() etc...
Perl - the only language that looks the same before and after RSA encryption.