Forum Moderators: mack
I would like to make the website more "interactive" by giving users a chance to comment. Ideally, I would like to add a comment page to every topic. (Instead of having a separate discussion forum section.) For example, the comments might always be page "10", so the comments page for topic "A" would page A10, and the comments for topic "B" would be B10, etc.
Can anyone recommend a script, a php something or other, that would allow me to create many comment pages, one for each topic?
My webhost has numerous content management applications that can be installed easily. (I have aleady installed a blog on another website in this way.) But when I read the description of what these programs do I can't make out whether or not they meet the needs I describe above.
Any ideas?
As an example you may with to use a php/mysql script to enable commenting. What you need to do is trick your server into parsing the existing documents as php.
What you can do is create a file called .htaccess at your websites root level. You may already have one there, you would be best to check before you over write it. Within the .htaccess file add the following...
AddType application/x-httpd-php .php .html
This will allow you to execute php code from within html pages.
The .htaccess file needs the "." dot before htaccess
What I would do now is give every existing page a unique numerical value, you can then specify this value within every page. Use something like the following...
<?php $pagevalue = "x" ;?>
Then within your mysql database you woudl have a column for page value... this will allow you to only show comments that are related to a specific page.
What I woudl do is have a short form on the page that a user can use to add comments. The form woudl point to a simple php script that woudl use mysql insert to add the comment to the database. All you would need to add are title and comment.
Below the form you could then use mysql select to gather, then print the existing comments.
Hope this gives you some ideas.
Mack.