GSoC2008: “Plugin Installation via Web interface” Proposal

Following on from the Plugin upgrader, I feel it would be beneficial to also allow plugins to be installed from the wordpress web interface directly from WordPress.org

I propose to extend the API on wordpress.org to allow for plugin querying(select a list of plugins based upon tags, plugin name, and/or search term, as well as select featured, popular, or recently updated which are currently availale via a RSS feed)

As well as adding a “Plugin Install” tab on the Plugins page of WordPress.

Part of the work has been quickly scratched together on the Trac ticket by myself: http://trac.wordpress.org/ticket/6015 however was only Proof of concept, and only works with plugins which are currently delivered by a RSS Feed.

I intend on working on the ticket and submitting patches to the WordPress core code for 2.6.

I invision the plugin installation page having a set of tabbed headings accross the page(Or as a side menu) to select the area to grab plugins from, Eg:
| Featured | Popular | Recently Updated | Tagged | Search |

And a table similar to the plugins page listing a page of plugins which matches the criteria.
I would expect the page to be Paged to 50 items or so to a page to allow quick skimming of lists, as well as not having too many pages to filter through.

The Tabs would be hookable, So a plugin can add an extra plugin source, or remove a source depending on the blogs intended uses.

See Also:

Wp-hackers: Idea for a GSoC project http://groups.google.com/group/wp-hackers/browse_thread/thread/c759db798b244121/b8451c1d7b670085?lnk=gst

What new functions are in PHP x.x?

A Question was asked on the wp-hackers mailing list:

Does a map of PHP versions to available functions exist? I can look up the
PHP function reference to see which version a function appeared in, but I’m
not aware of a reverse mapping (and I must be Googling very badly today).

Posting by Jeff Waugh

Well.. I couldnt find one either, So i created a hacked-together list very quickly: http://dd32.id.au/php-functions-by-version.htm

It simply allows you to view what functions were added to a specific PHP version, This was prompted by WordPress moving to PHP 4.3+ for version 2.5 which is due out later this year.

Hopefully its of use to someone.

PHP: SimpleXML + SOAP

Recently after getting into XML parsing with PHP and realising how hard most of the functions were to use, I decided to put it down and that i was going to require PHP5 for all my projects. Great i thought, SOAP, PHP’s got a SOAPClient class!

Personally i didnt like the Soap class, I’m happy to hardcode the values i send to the server,  But i want to read the returned XML easily.

I looked around, and found SimpleXML, And i like it!, It  worked well with all the sniplets of XML i gave it.. Well, Until i actually used it on some live data!

Suddenly SimpleXML refuses to parse the SOAP reply…

Heres a example of XML SimpleXML didnt like:

[sourcecode language=”xml”]<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetProviders xmlns="http://hostname/" />
</soap:Body>
</soap:Envelope>[/sourcecode]

See any problem? Looks valid to me!

The cause of it not parsing though? SimpleXML doesnt like any colons(:) in tagnames or attribute names! If its contained within the value of the tag or attribute its ok though.

So, What can i do? A Mass-replace of all colons? That’d potentially destroy my source data..

I came up with this short snipplet of PHP regular expressions to strip out any colons in the tags/attributes:

[sourcecode language=”php”]$out = preg_replace(‘|<([/\w]+)(:)|m’,’<$1′,$in);
$out = preg_replace(‘|(\w+)(:)(\w+=\")|m’,’$1$3′,$out);[/sourcecode]

The result after this has been done:

[sourcecode language=”xml”]<?xml version="1.0" encoding="utf-8"?>
<soapEnvelope xmlnsxsi="http://www.w3.org/2001/XMLSchema-instance" xmlnsxsd="http://www.w3.org/2001/XMLSchema" xmlnssoap="http://schemas.xmlsoap.org/soap/envelope/">
<soapBody>
<GetProviders xmlns="http://hostname/" />
</soapBody>
</soapEnvelope>
[/sourcecode]

As you can see, the general gyst of the document is there, and its parsable,  just without the colons where simpleXML cant handle them.