post-page

WP Plugin Dependency: CMC 1.5

3
responses
by
 
on
March 30th, 2005
in
Code, WordPress Plugins

WP Plugin Dependency: CMC 1.5: Interesting idea. This developer has built dependancy into their plugin to be forwards compatible with any other “click counter” type plugins that might be developed. I wonder if we could write in some hooks or triggers that would serially list defined functions and classes. Then a plugin developer would just check this list for the function that they want to define, and if not found, redefine/redeclare it. Same could go for variable names, though that could become overwhelming and resource hogging.
[EDIT] On second thought, an easier method would be to check every function/class for pre-definition before declaring/defining it as a rule (which is what I do outside of PHP)

heading
heading
3
Responses

 

Comments

  1. craig says:

    Mark,
    Could you post a translation for this so us simpletons can understand what you are saying? Thanks! :p

  2. Mark says:

    I can be pretty obscure!
    Well, when plugin developers write functions as part of their plugins, or add database tables etc, they need to know whether a previous plugin might have written that table or declared that function in order to prevent serious breakage. This person has started to develop a framework to support future development in the “click” area. 🙂

  3. Andy Skelton says:

    Craig,
    What I’ve tried to do with CMC is unify the whole click-counter genre of plugins. Why? Because there are so many possible ways of displaying the stats but very few ways to generate them. I thought that if I could create the perfect click counter to generate the stats, other plugins could specialize in displaying those stats: in text (a la Ozh’s ClickCounter), as graphical meters (see my sidebar for that one), as varying text sizes (like Flickr’s list of tags), or anything else you can think of.

    If each of these plugins kept its own private stats table, the server would be doing a lot of extra work, as would the developers. CMC does the one thing that all click-statistics plugins have in common and because it focuses on only counting clicks, it does it very well. I hope is explains it.



Obviously Powered by WordPress. © 2003-2013

css.php