Script: List-recent-comments (GM, PHP and perl)

At long last (read: I finally asked Gareth how to do this) I've finally managed to sit down and write a greymatter modification that generates an external file with data about recent comments. I've currently got it set up to generate five results, but it can be customized for as many or as few comments as your little journaling heart desires.

As usual, it made perfect sense once I finally gave up and said to Gareth, "How in the world do I do this?" He gave me five lines of explanation, and that turned out to be all I needed.You can pick up a copy of the recent-comments.zip file here. It contains a code snippet to add to gm-comments.cgi, as well as directions on how to modify the final PHP output.

Now that this is done, I can finally do what I've wanted to do for ages—enable comments on all posts over on geek-chick.net. Let the madness begin.

all tags: 

Comments

w00T! Now, the question is, can I take the code snippet that's inserted into gm-comments for the next GM upgrade?

I'm not so certain that it's a good idea to make this a part of the standard package. The path to the data file has to be edited. Oh, I suppose you could just drop it in the cgi-bin directory and be done with it, but here's the key...the second part of the mod requires PHP to decode the data file. Thereby implying that you've gotta have PHP to run GM, which isn't the case. You just have to have PHP to run 99% of the mods that I write.

Well, we could do some code remangling in porting the thing from a PHPish way to a Perlish version.

Awsome .. thx.

Hi there, I am trying to implement this code on my daughter's site at http://brie.divamaggie.com . My question is...where I have to put $comment_logfile="/path/to/your/recent_comments.php"; would it be "/divamaggie/brie/recent_comments.php" ? as http://brie.divamaggie.com is where the main index is located. Is this file recent_comments.php the new file that must be created and CHMOD'ed to 666? I'm just not certain how to enter the path correctly in gm-comments.cgi , recent_comments_display.php and whether or not there is a blank file to be made called recent_comments.php. I would really appreciate your help in this regard.