Archive for the 'GG_Translate' Category

Oct 03 2006

The Future of Uninstalling GG_Translate

Published by under GG_Translate

Having written a couple of plugins for wordpress, most notibly GG_Translate, I’m starting to get annoyed by some of the features WordPress provides for us plugin writers.

Firstly, I want my plugin to register its default options in wordpress when it’s activated and remove the settings when it’s deactivated. For this purpose, I assume, the wordpress devs have provided activate_[plugin name] and deactivate_[plugin name] action hooks, so I can have my functions executed when these actions happen. The downside is that in order to attach to these hooks I need to use the full folder and file name of the plugin, so for using them with the GG_Translate plugin I need to do the following:

add_action('deactivate_GG_Translate/GG_Translate.php', array('GG_Translate_Admin', 'deactivate'));

Now you may think that this really isn’t a major issue, but what happens if the person installing the plugin decides that they don’t want to put my plugin in a folder called GG_Translate, i that case I then need to start figuring out what folder they have put my plugin in… if in fact they have put it in a folder! Come on guy’s you must be able to think of a better solution.

Surely the fact that each plugin must be uniquely named means that they should be able to use the plugin name, e.g.:

add_action('deactivate_GG_Translate', array('GG_Translate_Admin', 'deactivate'));

Next up, wordpress has a really nice interface for viewing and editing all settings saved by wordpress and installed plugins (http://www.myblog.com/wp-admin/options.php). This interface however only allows for the viewing of settings and doesn’t provide for the deletion of settings. If I want to delete a setting that an untidy plugin has created then I have to either write a quick-and-dirty plugin for the purpose of removing the setting, or I need to dive into the database and delete it by hand… not very user-friendly if you ask me.

Another thing, whilst digging around in the core wordpress code I noticed some inconsistencies. It seems entirely random as to whether or not data being sent to the database will be escaped before hitting the database. It seems too easy for a plugin developer to send a string to the database that could wipe the database clean. I think wordpress needs a much more uniform approach to database access.

Finally, its about time that wordpress started taking advantage of the object oriented features provided by PHP. I’ll give them their due, they are working on it but I’d rather they were working quicker. I also can’t wait for PHP6 to come out (although thats still way over the horizon) as hopefully the namespaces will sort out all the plugin function naming headaches. Although, I’m not about to hold my breath for either of these.

No responses yet

Oct 02 2006

GG_Translate Now With Auto-Update

Published by under GG_Translate

I’ve just posted a new version of GG_Translate in my download section (0.2.27). Those of you that have downloaded the latest version of the weekend will already have a preview as to whats new in this version. This update adds auto-updating of the plugin as soon as I put a new version online. This is, however, a very beta if not alpha version of the auto-updater.

Please note that in order to use the auto-updater your web-server must be allowed to use the fopen in php to open files on remote servers. If you’re not sure whether it does or not then either just try the plugin and if it doesn’t work revert back to an older version, or you can give me a shout and I’ll help you out.

As always the latest version is available on my downloads page.

I’m also going to write up the instructions as to how to create an auto-updating plugin. I also want to make it so that it is an intelligent auto-updater that doesn’t need to download all the plugin files for each update but only those that have changed.

4 responses so far

Sep 22 2006

GG_Translate 0.2.19

Published by under GG_Translate

I’ve just uploaded the latest version of my wordpress translation plugin – GG_Translate. As previous stated, this update adds an administration page to the plugin that allows users to select translation engine order of preference, base language for the blog, the url format for the translation links, and the maximum number of translation links to display.

I have also checked to make sure that the available translations are up-to-date.

In the administration page I’ve addeda link for users to check for updates but I shall be replacing that with an automatic check for updates. Another feature that has been requested is flag icons for the languages, I have started working on this now and I should have a trial version on my blog before too long.

THe latest version can now be downloaded from my downloads page.

16 responses so far

Sep 19 2006

GG_Translate Update Imminent

Published by under GG_Translate

I’ve finally got myself organised and started working on an update to my GG_Translate plugin for wordpress.

The main feature to be added is an administration page to allow you to configure the way the plugin works, currently you can set the translation engine order and the base language that the blog is published in. I’m working on defining the link format and I might throw in a check for updates feature.

Hopefully the new version should be hitting the net in the next day or so, depending on my work load.

One response so far

Sep 11 2006

Spelling Correction & Code Cleanup

Published by under GG_Translate

Thanks to and email from Fred I have just posted my first update to GG_Translate in quite some time. He spotted a spelling mistake which, when he corrected it caused an error and so he sent me an email. This has now been fixed and, at the same time, I removed some debugging code that should have been taken out a long time ago.

Now that I know that there are people out there using GG_Translate I will finally get around to adding an admin panel to the plugin. This will allow site administrator to specify the language in which the code is written and also choose the order to preference of translation engine. I guess its also about time that I check which languages that translation engines support in case new ones have been added.

Share and enjoy :)

2 responses so far

Apr 11 2006

GG_Translate 0.1b

Published by under GG_Translate

GG_Translate is a WordPress plugin that provides site users with links to translate the blog into their own language.

The plugin detects which languages the users browser will accept and, if there are any which are different to the blogs published language, it will provide links to translations in those languages. For translations the plugin uses the Google and Altavista Babel translation engines, favouring the Babel engine over the Google engine. If no translations are available for a particular translation a link will not be provided.

Currently there is no administration panels for the plugin so configuration changes must be made in the source code, this will change in future versions.

Continue Reading »

12 responses so far