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 as My Website, Programming at 05:31 PST

5 Comments »