Thursday, May 30, 2013

Setting up a comments section on your web site

Make your web site interactive.

It's way for you and your clients to interact, with questions about your products, getting testimonials about your products, or just plain solving a problem or questions your clients may have.

If comments are open to the public, it's a good idea for you to be able to moderate the comments. 

I found 2 solutions that work well…

One is from Hub Pagesand it uses PHP and SQL

The other is from JSWidget.com. it uses Jquery and an xml file to store the comments.

Here's How to setup up Easy Comment 

Download the following file, easy-comment.rar (25 KB) (the files are already in the week7 folder on your flash drive!)

and un-archive it (double click the file)

In your Local website Master folder, copy the folder easy-comment and it's content

Layout002

 

 

 

 

 

 

 

 

 

 

 

 

 

In your comments  page you need to do the following.

Between <head and </head>

place the following:

<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>

<!-- Below the red URL is the full path to the location of the file jquery.easy-comment.min.js in the easy-comment folder on your remote server -->

<script type="text/javascript" 

src="http://www.uofgts.com/BasicWD/easy-comment/jquery.easy-comment.min.js"></script>
<script type="text/javascript" src="easy-comment1/jquery.easy-comment.js"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
// Your other javascript code if any  <!-- #my-comment is the name of the id of the box where you want your comments to appear, see below between <body> and </body> -->

$("#my-comment").EasyComment({
path:"easy-comment/", // is the path to the folder where you put the easy comment files relative to the file that contains the comments
moderate:true,  // If you don't want moderation change to false
hasSubject:true, // If you want a Subject line on the form
maxReply:10 
});
// Your other javascript code if any
});
</script>

<body>

<section id = "content">
<h2>Adding Interactive Comments to your web pages</h2>
<p>Go a head! Leave a comment! In the Jquery setup below!</p>
<!-- This where your comments will appear -->
<div  id="my-comment" style="width:540px;height:800px; "></div>

</section>

If you need to moderate the comments change email address in the file "ec-comment.php

(it's just a text file) on line 38

$moderator_email = "your@address.com";

Pretty easy!

Enjoy!!!  Got a question leave a comment!

 

No comments:

Post a Comment