Generally, any musician’s web site or blog worth it’s salt, sooner or later will have to add some form or means for the public to communicate it’s views and opinions to the web site’s owner or creators. This is a great way for band members, fans, musical students, other blog owners and whoever else to view their opinions and add useful and hopefully constructive comments to the site. A comment script is a great way of doing this.
PLEASE NOTE : THIS TUTORIAL RELATES TO INSTALLING COMMENT SCRIPTS ON NORMAL WEBSITES MANUALLY CREATED USING DREAMWEAVER AND OTHER CODING PROGRAMS. THIS SITE WAS PREVIOUSLY CREATED USING DREAMWEAVER WHEN THIS ARTICLE WAS WRITTEN AND HAS NOW BEEN MOVED TO WORDPRESS. THE ARTICLE NO LONGER RELATES TO THIS PARTICULAR SITE BUT STILL STANDS TRUE FOR OTHER SITES AS IT WAS ORIGINALLY INTENDED.
There are loads of different comment scripts out there available for installation ( free or otherwise ) to add to your site. You may have noticed, I have just enabled one on mine, and in doing so have encountered and overcome a few problems that many other users seem to have been having problems with. These include
- Deciding which comment script to go for.
- Working your way through totally useless instructions by the scripts owners.
- Using FTP clients (File Transfer Protocol).
- Changing file permissions .
- Setting up databases.
- Installing the script and adding it to your site.
- Styling the script to suit your web site
- Moving your site to its new language pages.
- Using .htaccess files to manipulate the control of your site.
All of the above can be involved in installing your comments script. So let’s see if we can get through it with the minimum of hassle.
Which Comment Script ?
After much searching, reading reviews, and checking out the respective web sites and demo’s, I decided that the comment script that seemed to have the most features, flexibility and styling ability would be the Gentlesource comment script.
The script is free, can be downloaded, used and styled to it’s full capability and has smiley’s, captcha, comments moderation and loads of other features built in. The only problem with the free version is that it has a square advert at the bottom of the form advertising Gentlesource, which is perfectly understandable considering you are using the free version.
To get rid of the advert, you need to pay around 20 euro’s or £16 for the full version.
There are loads of other free ones out there to choose from but none of them seemed to look quite as good or have the other handy features such as spam protection built in etc. etc. It also works in Vista.
If you know of any better free (or paid) ones out there, then give us a shout and I’ll list them. I do not get paid for recommending them.
For new comers to the web, a couple of things you definitely need in any comment script you install on your site are Captcha and Akismet options.
A Captcha is an automated anti spam feature that generates words, distorted by graphics and images that are easily readable by humans but impossible for the millions of automated comment posting programs (bots) that crawl the web to decipher.
The idea is that they are supposed to prevent spam bots from entering and posting crappy comments on your site 24 hrs a day..
Unfortunately, spamming technology and the methods spammers use are becoming more and more sophisticated as the web develops and they are often able to surpass even the most complex Captcha scripts as the programs become more advanced. This is where Akismet comes in.
Akismet is a plugin feature from Akismet.com which analyses incoming comments and checks if that particular comment has been listed as spam. If it has, the comment does not get through.
The use of both of these features does provide reasonable protection from the unlimited amounts of spam your web site will receive if it becomes even remotely successful. This site even in it’s infancy receives over 40 odd spam comments a day, and I’ve only been going a few months. Some sites receive literally thousands every day.
Although the Gentlesource comment script’s Captcha form is not that complex, the Akismet does it’s job and so far the problem is being kept under control.
This comment script has an option to email you every time someone posts a comment to your script, (this can be turned on or off) so you can go to your admin area and edit, approve or delete comments. When it is turned on, it was initially very useful as the comments I first started receiving were genuine. Nowadays I may get 40 e mails a day informing me of spammy comments being posted, but a quick check of the latest comments in the script admin area, shows that none get through the Akismet, which is pretty handy.
! Death to the Spammers !
Installing the GentleSource Comment Script
This guide will be using a Go daddy shared hosting account on a Linux server, using Filezilla to install the software, on an html web site
These first few steps aren’t essential but it may help to find out whether your web hosting server has Freetype and GD2 installed before you start the process as if you find later you are having problems with the script, it could be because the script requires these two features for a correct installation.
If you know this already, then go to step 5.
1. Open a notepad file and copy this line onto the page.
<? phpinfo(); ?>
2. Save the file as ‘info.php’
3. Upload this info.php file to your root folder of your web site i.e. The same folder that all your visible web pages reside in.
4. In your web browser, type in
where ‘yourwebsite.com or .co.uk’ etc.. is obviously the address of your own web site
You should then be presented with loads of information on your web server and a quick look will tell whether you have the correct applications installed and running.
5. Download the comment script from GentleSource.com and unzip the script using the latest free version of Winace to avoid any unzipping errors.
6. Once the folder is unzipped, open the folder comment_script_1.1.0. Inside, there should be a few other files and folders, along with a folder named named ‘cache’.
If there is not, then try and unzip the original file again using a different zipper. I originally used an earlier version of Winace and was left without a ‘cache’ folder. Many other’s seem to have had the same problem.
Or you can just create a new folder named ‘cache’.
7. Upload comment_script_1.1.0 to the root folder of your host account. If you are hosting many web sites on one host account, then upload the file into the root folder of the web site you want the comment script to function on.
IMPORTANT : Although the web site’s instructions say upload most of the files in ASCII and one or two in binary… If you follow these instructions, your comment script will work but you may find your captcha, social bookmarking and smiley graphics do not work. To prevent this happening, simply set Filezilla to upload all files in AUTO mode. This solves the problem.
8. Rename the uploaded folder to ‘comments’. Using Filezilla, simply right click the folder and select rename.
9. Now change the file permissions for the newly named ‘comments’ folder to ‘777’. In Filezilla, right click the file and select ‘file attributes’ from the menu.
Click the permission boxes so ALL the boxes are ticked….
and the xxx’s will change to 777.
Click to ‘recourse into subdirectories’ and ok, then watch Filezilla change the permissions.
10. When finished, refresh the directory list in Fillezilla as it won’t show that your permissions have changed until refreshed. People often think file permissions have not been changed at this point, when actually they have. Filezilla just needs to update it’s browser.
Check file permissions again and they should now show 777.
11. In your internet browser, type in www.yourwebsite.com/comments/admin
You should now be seeing the comments script set up screen.
12. At this point you will need to add all your various hosting database information etc. etc. If you have not set up a database on your hosting account, then go and do so now.
In Go Daddy, go to Manage account, databases, and set up a database. You will be given the information you need once the db is set up.
Now choose your own preferred log in name, email address to confirm your account, and make up your passwords to access your comment scripts admin. Proceed with the set up.
13. Log in to the admin area and check out the features.
If you find a few graphics are missing then consider step 7 again as this is where many installs go wrong. If all is well – continue.
14. Go back to Filezilla and refresh your file browser again. You should now see in the comments file, a new file called include.php. Note… If you do not refresh your browser, you will not see this. If you have this file then go to step 20.
15. If you do not have the ‘include.php’ file in your comments folder after refreshing your Filezilla browser, then to ensure the browser is refreshed properly, disconnect from the server and reconnect to your host and look in the comments folder again. You should now see the’include.php’ file. Go to step 20.
If you still do not see the file, look in – /comments/include… and find the file – include.php.tpl
Copy this to your sites root folder where all your web page files are situated that you want the comment script to work in.
You may have to copy the file back to your own desktop and then back to where you want it as Filezilla can move but not copy files and folders on the server side.
16. Right click on the new ‘include.php.tpl’ in your web pages directory and rename the file to ‘include.php’.
17. Right click this file and open it to view the contents.
To view your file, you may need to set to set Filezilla to open a web editing program.
In Filezilla, select – edit/settings/file editing, and set your default web editor by browsing to your ‘web editor’.exe file your own system.
e.g. your Dreamweaver.exe file may be in
“C:\Program Files\Adobe\Adobe Dreamweaver CS3\Dreamweaver.exe”
or notepad in
or what ever your favourite web editor happens to be.
In note pad the file will look different but still have the same contents.
‘always use default editor’.
18. Ensure that your new include.php has the correct file path.
i.e. The section
include C5T_ROOT . ‘comment.php’;
should be replaced with the full root path of the script in your host account.
If you log in to your comment script admin account that you previously set up, and go to – Configuration – General settings, and scroll down to the bottom of the page, you will see your full file path name that you should use to replace the section above.
Note: If you are hosting many web sites in different folders of one host account, then you need to change the root path to represent this.
You should also be aware that if this is the case, then you need to go to the file – include.php.tpl in the comments/include folder and also ensure the path name there represents this as well. As you can imagine, it is originally designed to be set up in a normal hosting account ie. one host, one web site, so if your hosting account has other levels for other web sites, this should be represented in your site root file path as shown above.
19. Now go back to Filezilla and change the ‘comment’ folder file permissions back to 755 by un checking the boxes. Also click ‘recourse into subdirectories’ as well.
20. Now you are ready to add the script to your web site pages.
If your site is a purely html site then open a web page that you want the comment script to work on.
Go right to the top of the page, before any other writing, or code or images or anything else.
Add this code
<?php include ‘./include.php’; ?>
Note if your site is already a php site, you do not need the php tags, just use
21. Now, go down to the place on your web page that you would like the comment forms to be placed and add the code
<?php echo $c5t_output; ?>
Note, if your site is already php, then avoid the php tags.
22. Now save your web page, not as an .html page, but as a .php page.
Simply change the pages extension from .html to .php and click save.
23. Now go back to the include.php file and open it up to view the file.
It looks like this
* GentleSource Comment Script
* (C) Ralf Stadtaus http://www.gentlesource.com/
include C5T_ROOT . ‘comment.php’;
Remove the line
from the file and save it.
Make sure all these files have been updated to your server and now when you visit the web page you included the two lines of code on, you should have your comment forms enabled.
Repeat steps 20 onwards to add the code to other web pages on your site.
Remember, all the html pages you have added this script to, are now saved php pages and now you must change the links to your site to reflect this. Don’t worry, this can be done in seconds.
Now you need to use an .htaccess file in your server account to redirect all the old links to your .html pages across the internet to your new php pages.
At this point, I decided to change the whole site over to php whether I had the comment script installed on a page or not. Php is a much more powerful and useful language to use when building a website than building one purely from html. The benefits gained from changing the site from html to php will become much more apparent as you implement more dynamic features on your sites such as forums and other popular scripts in the future. It also saves the hassle of redirecting my old web links to new ones as I just use an htaccess file to redirect the whole site to from html to php instead of individual pages.
Changing Your Site from Html to Php and Keeping Your Page Rank and Links
The method below uses an .htaccess file to direct your old web links to your new pages, by applying a mod rewrite to your apache server. It also tells the search engines that the rewrite is a permanent one.
This will redirect ALL requests for ANY page for your www.mywebsite.com/anypage.html to www.mywebsite.com/anypage.php
Open up a blank web page in your web editor, or notepad if you have no other.
Add these 2 lines to the page.
RewriteRule (.*)\.html$ http://www.streetmusician.co.uk/$1.php [R=301,NC,L]
Save this file as .htaccess
If your editor does not allow this, then save it as .htaccess.txt
Upload this file to your server and place it in the root directory of the web site you are trying to rewrite.
Change the name of the file back to .htaccess
Once this page has been saved and updated to your server, you should now find that when you type in any page from your old .html web site in your browser, your server automatically directs you to your new .php pages.
You should find that when you call for the admin pages to your comment script, they are still accessible and work faultlessly.
If you have any problems with this part of the process, Google the rewrite rule and rewrite conditions for your .htaccess file. There are numerous ways to do this and often a similar approach with a slight change in code will work for your particular server.
This method however, works perfectly for me and I really hope it works as well for you. All your previously hard earned site links across the web will stay intact and hopefully so will your pagerank.
COMMENTS FROM PREVIOUS SITE PAGE
I just don’t get it. I followed your instructions precisely. Took me weeks and I still don’t get it.
‘ nothing shows up where i have ‘
Where does nothing show up ?
Are you on a linux server with GD2 and freetype ? Were your permissions changed properly, and back again ? Have you got your root path file name correct in the include.php and include.php.tpl files ? Is your include.php file in the correct folder on your server ? Have you changed your html page to php if necessary ? Have you added the php tags to the codes correctly, they may or may not have to be altered steps 20-22 ? This is often a fail point. Do you have the correct codes at the top of your page and also the place where you want the comment script to appear ?
There are these and many things to do, so you need to check every step exactly.
A really good method is to create a totally blank page on your website and get the script working on that. This ensures you have no other script conflicts.
Maybe you could add a link back to your original page under the comment script boxes instead of returning to the #c5t_form.
As for the page jump…have you removed the line echo $c5t_output; from the include.php file ?. It’s been quite a while since I installed the script now, so I can’t remember all the ins and outs of it. The Gentlesource site and forum should be able to help you out.. It takes a while for them to respond, but they do respond in the end.
By the time they replied to my questions, I’d solved the problems on my own. That’s why I wrote this guide to save other people the hassle. I hope it’s helped a bit anyway.
So as is, the script will not work for me.
Nonetheless, your tutorial included MANY insights not included in the original script. Thanks for that!