Universal comment system for Your site.
Version # 1.0
www: newsroot.net
e-mail: ivi.viktor@gmail.com
icq# 4405730
Instalation:
For testing:
#1 Copy files to your site in your folder like “comment”.
#2 Create database and execute sql code in db.sql
#3 Change configuration in conf.php
For integration:
#1 Copy files to your site in your folder like “comment”.
#2 Create database and execute sql code in db.sql
#3 Change configuration in conf.php
#4 Replace function in API.class.php
Functions:
Database functions:
db_getAll($sql) – extracts all records from database.
db_getOne($sql) – extracts one record from database.
db_query($sql) – execute database query
getLastId() -- return last insert id
User functions
getUserId() – get user id for logged user.
getUserName($id) – get Username for user with userid == $id
Insert code into your template or php file
$id = "456RDFTHJBF";
$comment1 = new Comment($id);
echo $comment1->getComments();
Where: $id – unique id number or string for Your content (“Image”,”Message”,”Article”)
For sample:
$id = “article_63675683”;
$id = “image_6735”;
|