Results 1 to 9 of 9

Thread: I want comments!

  1. #1
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default I want comments!

    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.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  2. #2
    Join Date
    Feb 2010
    Location
    Falkirk, Scotland
    Posts
    142
    Thanks
    21
    Thanked 4 Times in 4 Posts

    Default

    Attachment 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
    Last edited by liamallan; 04-11-2010 at 01:36 AM.

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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/s...?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.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #4
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    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.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  5. #5
    Join Date
    Feb 2010
    Location
    Falkirk, Scotland
    Posts
    142
    Thanks
    21
    Thanked 4 Times in 4 Posts

    Default

    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

  6. #6
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    i downloaded it. Not too crazy about yet another Admin panel. I have 6 already and my damn site only has 5 pages.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  7. #7
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    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.

  8. #8
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    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 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_isFILE_APPEND);
    }
    ?>
    #display comments page code
    PHP Code:
    <?php
        $file 
    'comments.txt';
        
    $count file_get_contents($file);
        echo 
    $count;
    ?>
    Last edited by bluewalrus; 04-11-2010 at 05:58 AM. Reason: change position of addition, add ;
    Corrections to my coding/thoughts welcome.

  9. #9
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    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.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •