Archive for July, 2008

Dodgy WordPress Plugins and Themes

3Chris28th Jul 2008Wordpress, Plugins, Wordpress, , , , ,

Recently I have been doing a LOT of research into various wordpress themes and plugins and as you may expect the code varies from the excellent to the dire, but in most cases each achieves what it is supposed to.

That said however I have been seeing an increasing number of dodgy/spammy plugins which would probably cause more harm than good to the blogs of people who blindly install them.

These plugins or themes generally suggest they are doing one thing, but are actually doing another, such as building networks of spam links or sending valuable infomration to third parties... not good!

Though I could name and shame these dodgy items here I don't really wish to suffer the wrath of the scum of the internet, so all I'll offer is a plain and simple warning:

BE CAREFUL ABOUT THE PLUGINS YOU INSTALL AND THE THEMES YOU USE

Check them out, make sure they're fit for purpose, if you don't have enough knowledge yourself to understand what the plugin is doing ask someone who does.

Let's face it, at the worst you could expose yourself to having all important server details sent to a third-party and at the least you may end up with a blog covered in spam content getting you blocked by the major search engines.  

A very simple example of a check anyone can perform is to look through the plugin/theme code and look for url's or email addresses that are not anything to do with you or the plugin/theme.

This simple check alone can help protect you against unwanted and potentially harmful disguised code.





Searching for words that "sounds like…"

0Chris8th Jul 2008Cool Articles

This article is interesting:

http://lamp.codeproject.com/KB/recipes/soundslike.aspx

Combining methods to better search for words that sound like other words when searching a MySQL database

This kind of idea can be quite handy when combining feeds of data from different sources.

For example feed x may tell you the specifications of a product, feed y may tell you the the purchase information for a product and each feed may come from a different source e.g. feed y may come from a manufacturer and feed y may come from an affiliate network.

If the manufacture has a slightly different name for the product to the affiliate network (in this example), and the name is the only possible field on which to combine the data sources then it may be difficult to associate the two entries.

Methods such as the one illustrated allow us to make an varying levels of intelligent guess of what matches up with what, and as such can massively assist what could otherwise end up being an entirely manual matching process.





Getting WordPress To Ping Google Blog Search

0Chris5th Jul 2008Wordpress, Plugins, Pot O' Ideas, Web Development, Wordpress, , , , , , , , ,

I noticed today that my blog wasn't included in Google blog search, so I set out to find out why.

The reason was google didn't know about it, so I added it to my list of update notification services as this blogcarta post explains how to do: http://www.blogcarta.com/2006/10/17/how-to-ping-google-blog-search/

Oddly enough, though I know what pinging is, how it works, etc. I'd not really thought about/researched wordpress pinging to any great extent, and found out that I was missing a lot!

Firstly, I have a feed burner account (http://www.feedburner.com) and can automate a massive amount of the pinging from there so I turned all that on (see the PingShot option under the Publicize tab).

Secondly this got me thinking about what may be missed as feedburner wasn't pinging them, so I turned to the codex list of ping service (which oddly enough I had been to a number of times before but never used): http://codex.wordpress.org/Update_Services and I added all of these to my list too.

Next I saw the Smart Update Pinger on the codex and downloaded and installed that - It basically improves the pinging wordpress does by default by only pinging services when a new post is published and logging the responses.

And then I started looking at all the other posts that existed about pinging services and who should be pinged when and how. And as I'm tired my head started swimming.

So ultimately, what's needed here? Yes, you've guessed it, another improved plugin.

I shall be writing my own plugin to improve the pinging functionality in wordpress. It will be based on previous work, namely Smart Update Pinger but improve the existing functionality of that by including the following features:

  1. Central list of sites to ping automatically updated via webservice, so you're always on top of the game (would be so nice if this wasn't necessary, but hey ho!)
  2. Re-ping feature to notify ping services that are temporarily down about your post once they're back up
  3. Centralized logging to determine when a service goes off-line for extended periods of time or for good

All of the options will be turned on/off-able for users concerned about privacy.

If the guys who write Smart Update Pinger want to add this functionality in themselves, then fine, please go ahead but please let me know first. otherwise I'll be coding this up in a few days time.

If you want to be informed when the first release of my pinging plugin is made then either subscribe to my feed or leave me a comment





More Laptop Battery Life Stuff

4Chris5th Jul 2008Misc, ,

I have a Toshiba A200-1V0 Laptop as do a lot of other people in the UK due to it's price vs. features.

It's a great little machine, but the supplied battery life leaves something to be desired.

On the front of the box when I bought it there was an offer to get a second battery sent out if I registered with Toshiba - I did and they sent me the battery.

Turns out that there are 3 different batteries that are available for the Toshiba Equium A200-1V0:

  • The supplied 3 cell one lasting about 45 minutes to 1h 15 minutes depending on usage
  • A 6 cell option, which lasts for around 2-3 hours depending on usage
  • A 9 cell option which I've yet to try.

Toshiba sent me a 6 cell battery for registering with them which helped me out no end on my journey to work (1h 15 mins on the train each way). With the original battery I had to charge the machine each end, at home and at work, meaning that I always had to carry the power supply plug with me.

With the free6 cell batter I just had to charge the machine once a day i.e. at home over night ready for the next morning meaning I could leave the supply plug behind.

BUT I want to go further and actually get the 9 cell option now I've seen how much an improvement the 6 cell is over the 3.

I looked on the Toshiba website (http://uk.computers.toshiba-europe.com) but there was no information there, so I phoned the number shown: 0870 444 8944 to try and order it as a spare part. Still no luck as I phoned on a Saturday and Toshiba use a 3rd party who don't work weekends to deal with repairs and spares: http://www.topazsupport.co.uk - 0844 800 2835

So I visited them and they only show a 6 cell replacement battery: http://www.topazsupport.co.uk/product248.html which seemed a bit odd.

I'll call them on Monday to find out exactly what the situation is but it doesn't seem that promising :(

But on the plus side I now know all the people to call if the thing ever goes wrong! :)

Advanced Syntax-Hilighting Online Code Editors – A WordPress IDE?

1Chris2nd Jul 2008JavaScript, PHP, Wordpress, Plugins, Pot O' Ideas, Web Development, Wordpress, , , , , , , , , , , , , ,

When I write plugins for wordpress I like to do it on a test blog in a live environment.

Maybe not the best idea, but it's how I like to do it, and it also flags up any weird and wonderful restrictions to the development of the plugin as a result of my hosting company's security policy.

For a while now I've worked with just the plain old plugin editor that comes with wordpress, but this is cumbersome to say the least and as such I went looking for a syntax highlighting editor which I could (if necessary) convert into a plugin to (ironically enough) improve the plugin editor.

Turns out that there's quite a few good syntax highlighting online code editors available (list at the end of this post) and at least one neat one (CodePress)  has been converted to a wordpress plugin for theme editing and plugin editing.

This is a really great start, but there's a couple of things I'd really like to see to progress this work - If I have the time I'll do it myself, otherwise someone else reading this post may like to take it up!

Basically the current Codepress for wordpress plugin is missing (in my opinion) a few additional functions to create backups of the plugin or theme files you're working on, to an extent a rudimentary versioning system could and should be implemented within the editor.

There should be an option to package up the plugin you're editing and release it to the community/tie updates into the automatic plugin updater of 2.5

The current CodePress release is great but what would make it even greater would be code hinting when editing.

I don't know enough JavaScript to say whether or not this is possible but it would be cool for the editor to notice that you've just typed or started to type a PHP (or other language) function name, and provide you with a syntax hint for the function.

This would work (in my mind) by noticing the opening of ( and then checking what preceded it back to the last space or operator (*, ., /, etc.), then looking up this string from a function definition array and displaying a tooltip near where you are editing in the text area to remind you of the syntax - possibly with an autocomplete if you press enter.

I think the main problem with this is knowing where you are in the text area to display the div with the tool tip text in it in the right place. I know you can monitor where you are in a text area in terms of columns and rows, so surely if you know the location of the start of the text area and the size of the character in the text area and the co-ordinates of the cursor in the text area via row/column values you should be able to determine the optimal position for the <div>?

I think it would be really great to see that kind of functionality in any of the online code editors listed below on it's own let alone any other stuff such as versioning that I've already mentioned.

So there it is!

I probably will end up doing some work on the codepress plugin myself from a versioning point of view, but if any one else out there can figure out a way of doing the code hinting in JS that'd be fantastic!

Existing On line Code Editors:

Autosuggest example (could be used to provide the tool tip if the positioning is worked out): http://gadgetopia.com/post/3773

WordPress plugins: