I think guestbooks are kind of neat. Sometimes you want to leave a general comment on somebodies blog, but you don’t know exactly where. You don’t feel right leaving your comment on any of the posts, because you just want to say “cool blog!” or whatever, and it doesn’t really apply. Here’s a real simple way to set up a “tagboard”, or guestbook, without having to install any additional code. It helps if you have permalinks installed.
Just make an entry named Guestbook, and roll it’s date way back to when you first set up your blog, to shove it out of the way. Now add an entry to your navigation/menu system pointing to this entry. There you go, you now have a guestbook. Even better, it can use all the comment spam protection/moderation methods you already have in place. If you like, use mod_rewrite and make a custom template for this entry. For an example just check out the guestbook on this blog, and be sure to sign it!
yeah, this is solution, that I have been searching for, but is it possible to put the entering form on the top of list?
If you are able to use mod_rewrite rules, just make a rule pointing your guestbook URL to it’s own custom template file. Then you can edit this file to your hearts delight.
My mod_rewrite rule looks like this:
RewriteRule ^/guestbook/?$ /index.php?theme=guestbook&name=guestbook [QSA]
Rewrite rules usually go in a .htaccess file. Or, if you have access to it, the apache config file itself.
If you can’t use mod_rewrite, another way to do this would be to edit your “single.php” template (assuming your on wp 1.5 and using templates). Use an if/then structure to include the comment form at the top if this is the guestbook entry, then use another if/then structure where the comment form is already included, to prevent it from being included again.
Hi,
pretty cool idea to use the comments as a guestbook!!!
How ever – I changed some templates ( http://www.lahr.net/beta/zettelkasten.php?p=32 ), but I have no clue, how I can change the ascending or decending of the messages… You konw the problem: For guestbooks it’s much better, to have the lastest message on the top.. any idea?
Thanks!
Look through your comments.php file and add this in the appropriate place:
if(isset($guestbook))
$comments = $wpdb->get_results(“SELECT * FROM $tablecomments WHERE comment_post_ID = ‘$id’ AND comment_approved = ’1′ ORDER BY comment_date DESC”);
else
$comments = $wpdb->get_results(“SELECT * FROM $tablecomments WHERE comment_post_ID = ‘$id’ AND comment_approved = ’1′ ORDER BY comment_date”);
Then set $guestbook=true on your guestbook template, and add global $guestbook to the top of your comments.php file.
Alternatively, you could just make a new comments.php with the comments order set to DESC, and include this version from your guestbook file instead of the standard one.
After reading Leave a fucking comment, dammit, I had to leave one. I am thinking about having this be the tagboard for now on… just need to program a way of displaying it a little better in the main template so it looks like a tagboard. Thanks
hi
can you please send me this comment module..?? please..i wanted to get rid of spam ..now always i have to approve every comment.so..can you??
proper credit will be given…
i wanted this comment module with the auto generated numbers t o reduce spam…
so plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
waiting..
thanks
shashi
http://www.indianinside.info
[...] , could not figure it out. I know; it’s 2 steps Gill, how dense can you be? However, Liliana had an even simpler version tut, and that’s what I [...]
Thanks – it works! I made a copy of comment.php..
testing
Thank you