View Full Version : I want comments!
BLiZZaRD
04-10-2010, 10:17 PM
I know there is a script here for it. Right? My head is frazzled from a very very long week at work. I can't even think of the right search term.
All I want is the ability to have comments on a web page. Not a forum, not a blog, a pain ol plain ol web page.
Preferably NOT in JavaScript, but hey, I will look at anything. :D
liamallan
04-11-2010, 12:05 AM
3233
this is a PHP comments script from 'ScriptsMill', i have been using it on my site for a while, easy to install and has admin panel and anti spam/flooding protection. hope this helps
djr33
04-11-2010, 01:12 AM
The complexity is in how you want to store the data and how much control you want to give your users and admins (for example, can users/admins edit posts, are there logins, etc).
A VERY simple script is easy enough to code, especially just using a flat file to dump everything. But that means you may get spam that can't easily be deleted, etc.
Basically what you need IS a forum, but a very, very simple one. For some keyword suggestions-- a 'guestbook' script is the simplest, and a simple 'blog' script may works.
I wrote a script like this a long time ago (it's VERY basic).
http://www.dynamicdrive.com/forums/showthread.php?t=9940&page=2
That takes you to the second page of a long thread. Look for the post in the middle with several code blocks and page names.
I can't find the original location I posted it.
I *believe* it works, but I haven't tested it for a couple years. It looks like the only problems were with users who had security restrictions on their hosts, NOT with the script, but I can't promise anything.
BLiZZaRD
04-11-2010, 02:05 AM
I just need simple. Basically I am restarting my tutorial section on my website and I want the ability for the visitors to post comments, questions, snide remarks, you know the normal thing. As for how to run it, I just want a name field, and an input box with a submit button. fill in the boxes, click submit comment appears.
I don't even need notification. I would like the ability to remove a comment (spam and what not) but this can be done through editing a file in my FTP client. I am not all that worried about it.
Perhaps adding a third box to apply a rating (1 - 5 or whatever) would be cool as well, but I can do that later, if at all.
liamallan
04-11-2010, 02:13 AM
i think the scriptsmill comments script that i attatched above would be ideal, it consists of a name field, optional email field and message field. also has spam filtering and admin panel
BLiZZaRD
04-11-2010, 02:19 AM
i downloaded it. Not too crazy about yet another Admin panel. I have 6 already and my damn site only has 5 pages.
you probably won't get what you want without an admin panel, unless you develop your own script. Anything that's publicly available (and "good") has to be flexible enough to meet the (unknown) needs of the user, which means it almost certainly has lots of stuff you don't actually need/want.
How comfortable are you with PHP? it might take a while to work out, but conceptually, it's not too complicated. If you already have a login system, you could code the comment box to show the edit options automatically when you're logged in, thereby eliminating the need for a separate admin panel.
bluewalrus
04-11-2010, 05:55 AM
This is only a rough idea (styling your choice, form creation your choice (i assumed post and 2 text fields named comments and name), not tested). You could make the text files XML if you wanted....
#count_comments.txt contains
0
#comments.txt doesn't need content to start
#submit comment page code
<?php
if (isset($_POST['comment']) && $_POST['comment'] != "") {
$commet = $_POST['comment'];
$name = $_POST['name'];
$count = file_get_contents('count_comments.txt');
settype($count, "integer");
$count++;
$comment_is = "\nComment # $count<br /><strong>Name:</strong>$name<br /><strong>Comment:</strong><br />$comment\n";
$file = 'comments.txt';
file_put_contents($file, $comment_is, FILE_APPEND);
}
?>
#display comments page code
<?php
$file = 'comments.txt';
$count = file_get_contents($file);
echo $count;
?>
BLiZZaRD
04-12-2010, 07:39 PM
Thanks guys, I will try it out. See what I can come up with.
Perhaps in a couple weeks I will be ready to implement something.
@BlueWalwrus.. interesting use, I will try it out and see what I can do with it. Thanks for taking that time.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.