WordPress Guestbook Generator Plugin

I created a couple of posts that demonstrated how to make a WordPress Guestbook. Some of you might have found it a bit daunting, so here’s a plugin that will do everything for you!

Plugin Name: Guestbook Generator
Description: Generates a guestbook for WordPress blogs. Once activated, click on Options > Guestbook Generator.
Version: 0.8
Author: Andrew dela Serna
Notice: Compatible only with WordPress 2.1. Support for older versions will continue but updates/upgrades will be focused on the newest versions of WordPress. Scroll down to download Version 0.7 which is designed for Wordress 2.0.X.

Features:

1. No files to edit. Just upload the plugin, activate it then run the generator.
2. Guestbook template seamlessly integrates with your current theme.
3. When changing themes, simply run the generator to create the necessary files.
4. Like a true-blue guestbook, entries are arranged from newest to oldest.
5. Remember the time when guestbooks were the “in” thing? Hopefully this plugin will bring back the ol’ days. Hehe.

Installation:

1. Download the plugin from http://www.alleba.com/blog/wp-downloads/guestbook-generator.zip. If you don’t want paged comments, download this one instead.
2. Extract and upload the contents of the archive to ‘yourserver.com/wp-content/plugins/guestbook-generator/’
3. Login to your WordPress admin panel and browse to the Plugins section.
4. Activate the Guestbook Generator plugin.
5. Go to Options > Guestbook Generator to create your guestbook.
6. That’s it!

On a side note, if you already followed my instructions from my previous posts, you have to delete your current guestbook page and guestbook template files (guestbook.php, guestcomments.php) for the plugin to work. However, I suggest that you stick to your guestbook if you already have a lot of people who signed it. You may use this plugin if you’re switching themes.

I have tested Guestbook Generator on a lot of themes. Some still required a little tweaking especially on the wording. You might want to check out my reloaded instructions if you decide to edit the files in the Theme Editor.

Lastly, since this is the initial release, I would love to hear your comments, complaints or suggestions. Hope you like it.

Update: There is an issue with the guestbook not being found/viewable right after generating it. I’ll fix this tomorrow. In the meantime, you can edit the guestbook and save it. That should do the trick.

0.2 Update: The above issue has been resolved and so far the plugin works perfectly in all the blogs I tested it on.

0.3 Update: Cleaned up some coding.

0.4 Update: Added better error handling. Reversed the order of comments from newest to oldest (Thanks Ulaan B.)

0.5 Update: Even more error handling. Noted issues with the older Default theme and K2 theme.

0.6 Update: Corrected to avoid errors with K2 theme.

0.7 Update: Fixed some replacement mechanisms that will avoid errors with any theme.

0.8 Update: Solved compatibility issues with WordPress 2.1.

0.9 Update: Added paged comments functionality. Requires the Paged Comments plugin.

Version 0.7 for WordPress 2.0.x
For those experiencing problems with chmoding your theme folder, please download this version (WordPress 2.0.x)

329 comments

  1. @Chris: Sorry, but you would have to contact your webhost about enabling fopen.

    @Dee Dee: I apologize for the lateness, but yes, you did the right thing by copying the single.php file to your theme folder.

  2. Hi! Guestbook generator works great on k2. Now i just wonder how to get my rumwall guestbook greetings into this guestbook?

  3. regards Comment 49, the webhost said to set the dir permissions to 777. I did but still not work. What directories are the files written to?

  4. @Mikael, I’m not familiar with the way the Rumwall plugin works. 🙁 Sorry.

    @Chris: Yes, you might have to chmod the theme folder to 777. The files are written to the active theme folder. So in your case, /barnes/wp-content/themes/default/. Tell me how it goes.

  5. Hi andrew,
    l have upload only the guestbook_generator.php & guestbook_utility.php file to the plugins folder. But l can’t see the plug-in in the Plugin Management? why?
    thanks

  6. amituo: you have to upload the folder too or you can create a folder named “guestbook-generator” in your plugins directory and then upload the files you extracted to the folder.

    It is a great plugin, KUDOS!

  7. Thanks for reply zahid, anyone can help me out, l have sucessful upload the plug-in. l have activate the plug-in, then when l go to Options ,it apear General, Writing, Reading, Discussion, Permalinks, Miscellaneous , then what? how to run, that’s no guest book appear. (http://www.amtfweb.org/wordpress/)
    thanks

  8. l mean when l go to Go to Options > that’s no such a word call Guestbook Generator to create my guestbook.
    thanks

  9. @amituo: What version of WordPress are you using? The link should appear under Options. Hmmm. This puzzles me.

  10. hi andrew, l am using WordPress (Version 2.0.5), l can see Guestbook Generator plug-in in Plugin Management, but l have activated it , and go to click on Options > no such word Guestbook Generator appear. it only appear the word listed
    General, Writing, Reading, Discussion, Permalinks, Miscellaneous. thanks

  11. Hi Andrew,

    Am getting such error:

    Guestbook Generator

    Warning: chmod(): Operation not permitted in /home/seminary/public_html/hass/wpress/wp-content/plugins/guestbook-generator/guestbook_utility.php on line 26

    Warning: fputs(): supplied argument is not a valid stream resource in /home/seminary/public_html/hass/wpress/wp-content/plugins/guestbook-generator/guestbook_utility.php on line 44

    Warning: fputs(): supplied argument is not a valid stream resource in /home/seminary/public_html/hass/wpress/wp-content/plugins/guestbook-generator/guestbook_utility.php on line 48

    Can you help?

  12. ‘Theme folder was not chmoded to 777!’

    I am able to activate the plugins however this still occurs and i cant get it to run. The problem with the installer guide here is the CHMODing intructions. CHMODing instructions should be provided otherwise, the process can be very annoying.

  13. Ok, the non-chmod version did produce the problems like @ron. It was unable to create the guestbook.php and guestcomments.php. I am using the default theme btw. By default when installing wordpress (2.0.5), folders was 755 and files are 644. In anycase, to solve the problem , i had to manually create by doing as follows (copy and rename, NOT RENAMING ONLY):

    single.php > guestbook.php
    comments.php > guestcomments.php

    Only after that i was able to add a few tips for configuration in your demonstration posts like adding the ‘template’ function, etc… inside the guestbook.php

    This solves the problem 🙂

    You tried your best explaining them. Thank you so much. This guestbook works fine. Thanks also for the super-quick reply.

  14. Hi I tried using your plugin to create a guest book for my wedding site. I’m using the Daisy Rae Gemni theme but when I went to generate the guestbook I got an error of “The required template files were not found in your current theme. Guestbook cannot be generated.” Do you happen to have any what could be causing the confliction? I’m not savy on this kinda stuff. Thank you.

  15. @C: I’m glad that it worked out for you even though the plugin didn’t work on your server. Some servers set restrictions with regards to file access and permissions, which may cause problems for my plugin since it requires both.

    @iaedyene: I checked your theme. It doesn’t have the required single.php file. Try copying index.php and renaming it as single.php then upload it to the theme folder. Run the plugin and see if a guestbook is created.

  16. hello,

    I would like to use this plugin with wpmu instead of wp but here, it does not publish what it creates, leaves like drafts and does not create guestpage but guestpost 🙂

    wpmu is based upon wordpress 2.1

    could you have a look at this?

  17. @Ovizii: Please take a look at the WordPress 2.1 version found above and tell me how it goes. I *hope* that will solve your problem.

  18. Never mind I figured out what it was. Thanks for the plugin but I could have just made a post and named it guestbook to have the same thing. Will keep searching for something different. (Unless it was just the way my theme is set out).

  19. Great instructions, but have you any advice for paging the guestbook / comments / entries ????
    I have in excess of 200 entries, and it makes the page a bit large !!!

  20. I tried installing your plugin and i got a bunch of run errors when i went to generate the guest book. It ended up creating a guest book, but then there was no way to “Sign” it. Could you help?

  21. It also said that I was missing the “single.php” file, but Y’s solution worked just fine (copying the index.php file.). I was just wondering if it’s possible to remove the numbering of the comments/entries. Or to turn them around, so that the latest entry get’s the highest entry-number.

  22. I would like to use this plugin with wpmu instead of wp but here, it does not publish what it creates, leaves like drafts and does not create guestpage but guestpost

  23. @Mikael: I’ll work on the paging feature soon.

    @Michiel: I’ll see what I can do.

    @Mike: Hmm. I thought I solved this already.

    Btw… What’s with your names? They’re all so similar!

  24. Hi Andrew, thanks for this plug-in, I got my Guestbook running now. But I have a question, which file should I edit to get the guestbook looks nicer such like yours? Thanks!

  25. Simply will not work. I’m running WP 2.1 and K2 0.9.5 RC1 no matter what this will not work. I’ve tried all the versions. Regular, 2.1 beta, and non-chmod. Simply fails and I get that error on line 26.

    Any thoughts?

  26. @All: The paging feature is surely on my to-do list. Guestbook Generator is now compatible with WordPress 2.1. Check above for some details. If you plan on totally upgrading to 2.1, PLEASE check all your plugins for compatibility, or else you’ll end up with a lot of frustration.

  27. Well, seems to work now, but I still get the following error when generating the guestbook:
    public_html/wp-content/plugins/guestbook-generator/guestbook_utility.php on line 26
    Theme folder was not chmoded to 777!

  28. Hi Normen, thanks for using my plugin! Anyway, I checked your site and the plugin looks to have done its job. The reason why the sidebar doesn’t appear is because the guestbook template is based on your single.php file. I’m guessing you wanted it to be like your About page, right? Well, here’s the problem. The plugin used to be based on the page.php template, however, many theme creators remove the ability to leave comments on it, so many people complained since it is a guestbook and no one can sign it. So I switched it to the single.php file instead. You may want to edit guestbook.php and insert the sidebar from there. Sorry for the inconvenience.

  29. Andrew,
    Cheers for your fast response. I’ve managed to hack the sidebar into my guestbook.php file. Thanks for helping me out 🙂

  30. I would appreciate if you could help me figure how to stop the spam that i get daily with this guestbook. Is there some kind of a hack?

  31. Hi,

    I have installed your plugin but I can only get it to partially work.

    I had removed the

    from my template as I didn’t want the website to work as a blog but more like a CMS.

    Obviously your plugin is based on the wordpress comments system so I decided to put that code back in. However not to disrupt the rest of the site i have put it directly into “guestbook.php”.

    However the guestbook is only half working because
    1. The comments appear straight away even though an email is sent to the admin to moderate the comment.
    2. Until a comment has been moderated it is not included in the comments count at the top of the page.
    3. When a comment is approved it sends out an email to the admin saying that their is a new comment on the guestbook.
    4. The date for each comment is incomplete

    I am using Guestbook Generator 0.7 and WordPress 2.0.4

    I have been going round in circles for the last couple of days, so I was wondering if you could be so kind as to point me in the right direction. To test my guestbook click on my name above this post.

    Thanks 🙂

  32. the code I added (automatically removed on your blog so i have simply added it below with PHP rather than the php tags) was

    PHP
    comments_template(); // Get wp-comments.php template PHP

  33. I have upgraded to WordPress 2.1 and the guestbook Generator V0.8

    Their have been some improvements i.e. the order of appearance is correct, but the full dates are still not showing and the comments are appearing before being moderated.

  34. Hi Mey, sorry about your troubles. I’ll investigate your problem tomorrow (it’s 230am — zZzZz). And if possible, email me your active theme folder (andrew [@] alleba.com). I’ll get back to you as soon as possible.

  35. This is a great plug in…it was so easy to install. I can’t wait til you get the paging system in place though. Maybe 10 posts per page or something?
    As it is now, if someone wants to sign mine they have to scroll down past over 100 posts to get to the entry box. Maybe even put the entrie box above the posts? I don’t know if that is even possible.
    Thanks for your great work!

Comments are closed.