[pmwiki-users] Keeping recipes up to date

marc gmane at auxbuss.com
Thu Feb 15 05:11:26 CST 2007


Patrick R. Michaud said...
> Over time many people have asked for a way to keep track of
> when new versions of recipes become available on pmwiki.org .
> 
> I'm pleased to announce that I've put together a prototype
> of this capability -- now available from
> 
>     http://www.pmwiki.org/wiki/PmWiki/SiteAnalyzer
>     http://www.pmwiki.org/wiki/Cookbook/RecipeUpdates
> 
> Both of these pages do the same thing (identify new versions
> of available recipes), but differ slightly in the approach used.
> 
> The Cookbook.RecipeUpdates is a traditional cookbook recipe 
> approach; the admin installs a recipeupdates.php script that 
> provides a custom ?action=recipeupdates.  This action
> fetches the latest recipe list from pmwiki.org and displays
> a table comparing installed recipe versions against the
> pmwiki.org ones.
> 
> However, the recipeupdates.php script requires that PHP be configured
> to allow url fopens, and many web hosting providers have this
> capability turned off as a security precaution.
> 
> So, another method is to use the PmWiki.SiteAnalyzer page.
> The PmWiki site analyzer will fetch information from a PmWiki
> site (including any installed recipes) and then report on
> any newer versions of recipes that may be available.
> 
> This is a new and somewhat experimental feature, so there
> may be a few quirks that need to be worked out yet.  Also,
> some recipes (especially older ones) haven't provided
> the information needed to report version differences.
> But hopefully this will be a start in the right direction.
> 
> Comments, questions, and suggestions welcomed as always.
> Thanks!

There's a lot to be said for introspection.

Also, why not use curl instead of fopen? As you say, it's not at all 
unusual for fopen to be switched off on shared hosts, and 
allow_url_fopen has been unavailable since 4.3.4 (so say the docs). I 
use a WebPage class that scrapes pages using curl and has methods to 
return the page as either a string or an array. This bypasses the fopen 
issue.

-- 
Cheers,
Marc




More information about the pmwiki-users mailing list