Plugin Download Enhancements
I’ve received numerous emails and comments lately saying one of the following things:
- Your plugin downloads are broken, I just see a blank page
- Your plugin downloads are broken, I just get a jumbled mess of characters
- I’d like to use one of your plugins but how do I install it?
I’ve always been less than thrilled with the way Firefox treats long lines of text. If you haven’t see it, you won’t. Basically, the entire line is hidden from the browser. If you use your cursor to highlight the browser window, you’ll see that one long line is selected. This has led to a lot of confusion and I’ve been looking for a way to fix this.
Enter Mary
I noticed a great little addition to Mary’s plugin downloads over at utterplush and wanted to do something similar. So now you’ll notice all plugins have a nice standard header. The plugin details and short install instructions will appear before the encoded plugin. The plugin is now chunked into 80 character pieces so that the entire plugin will display in your browser window.
How’d I do it?
If you’re a plugin author and would like to do the same, here’s what I did. Grab the latest version of Zem’s Textpattern plugin template. Replace the 2 lines at the bottom of the plugin with this:
header('Content-type: text/plain');
$pluginfo = "# ".$plugin['name']." v".$plugin['version']."r";
$pluginfo.= "# ".$plugin['description']."rr";
$pluginfo.= "# ".$plugin['author']."r";
$pluginfo.= "# ".$plugin['author_uri']."rr";
$pluginfo.= "# This is a base64 encoded plugin.r# Simply paste this entire page into the textarea on the Textpattern plugin tab to install.rr";
echo $pluginfo.chunk_split(base64_encode(serialize($plugin)) . "n", 80, "rn");
The Results
To see the results, click the download link on any of my Textpattern plugins. And if you notice any problems installing plugins, please let me know.
Comments
Add a comment
You may use textile in your comment. Gravatars are enabled. Your email will not be displayed and will remain private. I reserve the right to edit or delete comments.
