Skip to content

Instantly share code, notes, and snippets.

@dajare
Created January 20, 2011 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dajare/788086 to your computer and use it in GitHub Desktop.
Save dajare/788086 to your computer and use it in GitHub Desktop.
WolfCMS Plugins XML file
<wolf-plugins>
<wolf-plugin>
<id>ckeditor</id>
<version>1.2</version>
<status>stable</status>
</wolf-plugin>
</wolf-plugins>
@mvdkleijn
Copy link

lol....

Maybe we should start auto-generating this from the plugin repo? :)

@dajare
Copy link
Author

dajare commented Jan 20, 2011

Not a bad idea! This is just an experiment: it can be used, but creates a VERY long URL. Could it be rolled into the repo somehow?

@craigrodway
Copy link

dajare: Why don't you just pass it to a URL shortener like bit.ly or goo.gl? Then you can track hits :)

Although, having said that, I don't know how the underlying Wolf code would handle the re-direction headers, if at all?

@dajare
Copy link
Author

dajare commented Jan 20, 2011

Hi Craig - it did cross my mind to try that (j.mp my shortener of choice :) but hesitated over just that issue. (And because I was rushing!) Worth experimenting with, though. I do like the bit.ly/j.mp stats tracking!

@craigrodway
Copy link

I like Martijn's suggestion as well though ;)

@mvdkleijn
Copy link

As for Wolf CMS being able to handle the redirection... don't think it will handle that correctly though I never tried. It also depends on whether it decides to use Curl or not. By default it doesn't use curl because of performance issues but if the default option isn't available and curl is, it falls back on curl.

We could combine the two suggestions? :) We can use the plugin repository as the source for the information and use j.mp at the same time. Though in order to be able to track the hits for a single plugin, we wouldn't be able to merge all plugins into a single XML... which would cost extra hits for the final Wolf CMS installation doing the checking.

Actually generating this information from the repo isn't difficult, assuming people keep the releases in the repo up-to-date.

@craigrodway
Copy link

Could Wolf cache the version information somewhere? Attach a TTL to it (X days?), and update when it's expired. Also update when new plugins are installed.

Instead of using another service and having separate XML files - what about having the repository doing both, dynamically? A) Generate a short-ish URL for each plugin (plugins.wolfcms.org/a12bc3) and B) have some code respond to that which sends the relevant XML header + content.

@mvdkleijn
Copy link

I was already planning to add some sort of cache to Wolf CMS for not only the plugin update information, but also the Wolf CMS version number information. It just been a low priority for now. There are more points (Gravatar results for example) where Wolf could cache information so perhaps the time is right to start thinking about and implementing a central cache directory for Wolf.

As for the XML... my plan was to dynamically generate the XML "file" from repo information. A short url available an accompanying "hits for the update information" is also very possible. We actually already have a short code available (more or less) http://www.wolfcms.org/repository/123 is the view for a plugin's details. Apart from adding a CNAME to DNS to create plugins.wolfcms.org, it shouldn't be much work to add a path to the dynamically generated XML.

By the way... as soon as I've cleaned up the code a bit, I'll make the repository plugin available through GitHub so the community can help add to / fix the repository.

@dajare - Sorry for the run away discussion here David. :P

@mvdkleijn
Copy link

Just another short additional remark concerning the repo... I want to add OAuth support so people can change plugin repository information through an API. This would allow developers to write/use a small command line script to create a release in one go:

  • Tag release in GitHub
  • Package up release in zip file
  • Create new release in plugin repo
  • Upload zip file to plugin repo
  • Update other plugin repo information
  • Done. (all automated)

@craigrodway
Copy link

Great ideas, I think all of those would be very valuable to and welcomed by the community.

@dajare
Copy link
Author

dajare commented Jan 21, 2011

mvdkleijn wrote:

@dajare - Sorry for the run away discussion here David. :P

Not at all! Putting up a gist like this that could spark a conversation like the one you and Craig are having is about right for my level of contribution! :D Great stuff!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment