Adding comments to your personal website

You would like to add an in-line comments functionality embeded to a page of your personal web site and you don't want to pay or sign up for that.

You can find here a solution based on a "HTML snippet" that you have to insert into the HTML code of a page of your website and two files that you have to upload to your personal host or webspace. One file contains the main part of JavaScript code while the second in PHP code handles the comments using a simple text file as database (no MySQL is required).

This proposed solution can be also used for a website build using iweb when you use a personal host or a free webspace or when you have no Mobileme account.

If you want to see how it works ... "See an example"

Things you'll need:

  • a personal host or webspace with PHP enabled server (MySQL is not required)
  • a text editor to modify some parameters in the scripts
  • a standard FTP program for uploading the two files

Files you have to download:

( Download this ZIP package containing three files )
  • the HTML snippet that you have to insert into the HTML code of your page
  • the JavaScript module, ".js" file
  • the PHP file

Tutorial:

First you have only two parameters to setup for personalization in the first lines of the HTML snippet:
You have to choose a name for the topic of the comments, the value of the variable "sujet".
If necessary, you could specify with the variable "adressebase" the address offset for the PHP file if it is located in another folder than your page which you add the HTML snippet. ( The value can be a part of an absolute url, "http://..." )

Then, insert the HTML snippet (modified in advance) into the source code of your page, upload the ".js" file in the same folder of you page and upload the ".php" file too in this same folder (then keep the value of the parameter "adressebase" at '' ) or in another location ( update the 'adressebase' accordingly ).
That's' all.

Of course, you can modify the HTML snippet in order to obtain different display style, try and go ...
And also, if you would like to put the ".js" file on a particular folder you have to modify accordingly the value of the "src" attribute of the HTML tag "<script ..." at the HTML snippet last line.

Tutorial (for iweb case):

First prepare the files for personalization as described above.

Follow by these steps:
/open iweb /click "widgets" /click "HTML snippet" icon /drag and drop this icon onto the position you prefer on your page to locate the comments /double-click on the displayed text box to interact with /paste or type the HTML snippet /click the "apply" button to validate/

And finally:
upload to your personal host or webspace via a standard FTP program (like Fetch) the two files that are required.

 
URL: http://www.tedheu.net/rubriques/services/commentaires/serv_com.php?lang=en , page 'Plugin: "comments" ' , updated on 2009-11-06
About this website Contact me Post a comment
TTU © 2009  
Hosted by:

since june 2004