Creating and modifying plugins.
3 posts • Page 1 of 1
As this is my first post I have to thank everyone in this community for S9Y! Especially the clean hook principle is brilliant... I don't want to go the route of patching core files just for language changes ever again (Wordpress...).
For my weblog, I have patched the avatar plugin to support so-called Identicons (which is also the basis for MonsterID, but I like the abstract icons better), more specifically a PHP implementation called "Ycon" by Ben Hendel-Doying.
I am not sure about the policy of S9Y regarding patches. I especially don't want to ruin the great centralized update service. There are only a few things I've patched to add Ycon support (locally generated; basically copy/paste of MonsterID calls).
- a new switch case for 'identicon' in two places
- inserted fetchYcon() function right below fetchMonster()
- ycon directory with ycon library
You can download a patched version 1.39 of the plugin here: http://www.wiredwings.com/download/sere ... atched.zip
I did not modify the maximum number of slots and I don't think it is necessary as either MonsterID or Identicon will always work. I wasn't sure how to handle the version number, so I haven't changed anything there either; that way, auto-updates will probably overwrite the customizations. Can anyone tell me how to do it in a clean way? Rename the plugin, change version numbers?
Of course I'd be happy to contribute this to the official plugin.
Re: Avatar Plugin patched for Identicon/Ycon
Many thanks for your praise.
I just committed your patch, this is the best way. If you ever change a plugin locally and want to preserver that, be sure to raise your version number to something really high, then your local changes will not be overwritten. However, this also disables the version check so you'll never get new updates.
Thus, the real best way is to keep the original version intact, and when a new plugin is announced in your plugin configuration, backup your old plugin, load the new plugin and then apply your changes. If you can, use CVS on your local server to track your own changes to the files. Or, like you did, submit your patches so we can make them official.
3 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests