Skip to main content.
Sunday, August 21st, 2005

Plugin Programming Quest

Is there anything so frustrating as using someone else’s code, finding mistakes, and trying to edit it to your satisfaction?

I spent some time trying to clean up the useronline plugin and managed to modify it so that the modifications to the wp-settings.php file were no longer required and was working on removing the requirement to install other files outside of the file in the plugins folder. I also moved the display from the header to the sidebar, where I think it belongs. I’m still stuck with one file in the root directory of the WordPress installation, and got fed up with tracing the program steps (it would be easier if I had complete familiarity with PHP and the WordPress loop, but that is still developing.) So I checked to see if there was another online users plugin and found wp-infos. I installed this plugin for comparison (and to milk the code for examples,) and was dismayed to see just as many errors. Hell, the damned thing isn’t even XHMTL strict compliant – I got quite a few errors when I did a check using the W3C validator.

What I really want is a sidebar section that displays visitors and a little technical information, such as IP address and useragent. I like the useronline division into members, guests and bots, but find fault with its implementation. The author has stated in his forum that the plugin works off ip addresses, and that would explain why I am recognized as a member when accessing from work but not from home, which is unsatisfactory; and his system of identifying bots is clearly inadequate. Of course, if I want visitors to register as users, I have to offer something worth registering for, and don’t have anything yet. I’d settle for a pattern recognition system that identified repeat visitors, which would hopefully allow me to identify friends and family as they dropped in, but pattern recognition is really cutting-edge programming.

I suppose I could use cookies to identify repeat visitors, but that relies on users that are insensitive to cookie storage issues, and I’d have to learn cookie manipulation. Actually, that’s not a bad way to go, and I think I’ll pursue it. By rights I should also develop and publish a privacy policy, but since I don’t have any commercial interest, that shouldn’t be hard.

I was looking for a replacement project for my Google Fame plugin, but this just doesn’t feel as original and attractive. It does have some core learning skills involved, though, so it may well do.

Posted by Greg in My Website, Programming

5 Comments »

This entry was posted on Sunday, August 21st, 2005 at 05:31 PST and is filed under My Website, Programming. You can follow any responses to this entry through the comments RSS 2.0 feed. You can leave a response, or use this trackback URL:
http://www.gregrperry.com/blog/2005/08/21/plugin-programming-quest/trackback/

5 Responses to “Plugin Programming Quest”

  1. Ramblings » Blog Archive » Web is Online the Same Time as Me says:

    The above link is a more recent post that links back here.

  2. Vincent says:

    Dear Greg, I see that you have User Online on your website. Are you using an old version of WP or found a fixed user online plug or mod. I am searching for such a script for ages. Anyway I haven’t encountered a 1.5+ WP blog which shows a user online box.

    What I am really looking for is just a plug that just shows the number of member and the number of visitors, the rest is unnecessary crab. I would be very grateful if you can help me out.

  3. Vincent says:

    Sorry my website is http://www.barnhard.nl

    I’ve found some clues on http://www.scriptygoddess.com but i’ve never encountert his proposed script on a wordpress blog, or it is only visible for an admin.

  4. Ramblings » Blog Archive » Me and My Big Mouth says:

    [...] Aren’t search engines truly amazing? Somebody noticed my old WordPress User Online plugin gripe, and not only asked me how I got the original plugin working, but how to implement some of the things I was describing I wanted to do. [...]

  5. Joe says:

    Also How did you get Wp-Infos working and what MySQL code did you use? Thanks…

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>