Post Reply 
included comments list
11-Aug-2011, 08:19 PM
Post: #1
included comments list
Hi all Wink

First of all - sorry about my english, i'm from europe and i haven't spoke/wrote english since a long time^^

i'm actually integrating commentics in my website and what could i say... your script is amazing! thanks a lot!
since now, i could solve every problem using your forum - and i noticed your giving a great support to your users - wow!
---------------------

my problem:

i found the following code in your forum and edited+included it in my index.php to show the latest comments at my main page in a box.


Code:
PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
title></title>

<
style type="text/css">
.
comment {
padding10px;
background-color#ffffff;
overflowhidden;
-
moz-border-radius10px;
-
webkit-border-radius10px;
-
webkit-box-shadow#000000 2px 2px 2px;
-moz-box-shadow#000000 2px 2px 2px;
box-shadow#000000 2px 2px 2px;
border-radius10px;
behaviorurl(/PIE.htc);
margin-bottom20px;
}
</
style>
</
head>

<
body>
<?
php
define 
('IN_COMMENTICS','true');
$path_to_comments_folder "comments/"//Don't forget to change this!
//require $path_to_comments_folder."includes/language/english/database_errors.php"; //load language file for database errors
require $path_to_comments_folder."includes/db/connect.php"//connect to database
$query mysql_query("SELECT comment FROM comments WHERE is_approved='1' ORDER BY dated ASC LIMIT 0, 20");
while(
$comments mysql_fetch_assoc($query)) {
    echo 
"<div class='comment'>";
    echo 
$comments['comment'];
    echo 
"</div>";
        echo 
"<div class='name'>";
        echo 
$name['name'];
    echo 
"</div>";
}
mysql_close($connection); //close connection to database
?>
</body>
</html> 
(Source: Click here)


It works very good and my box looks like this now:
[Image: unbenannt1se.jpg]

What i want to change is
- to show the name and the country
- to show the thumbs-up-icon and the number of "likes" (no dislikes, like facebook)
- to sort them by likes, the most liked comment should be at the top!

Finally it should look like this: (sortet by likes)
[Image: unbenannt1je.jpg]

I've just grafical skills and no great skills in coding, but i'm able to read and change most of the codes... Wink this is my way to create homepages^^

Would anyone be so nice to show me, how the code have to look like to get what i want? Smile

thanks a lot to you all

hope to hear from you soon

Jayson
Big Grin
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
included comments list - Jayson - 11-Aug-2011 08:19 PM
RE: included comments list - Jayson - 11-Aug-2011, 08:40 PM
RE: included comments list - Steven - 12-Aug-2011, 06:55 PM
RE: included comments list - Jayson - 12-Aug-2011, 11:21 PM
RE: included comments list - Steven - 13-Aug-2011, 03:56 PM

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  No comments form appears despite many avenues explored... sherry 14 162 26-Apr-2013 03:05 AM
Last Post: sherry
  Comments number on another page. Edgey 4 446 17-Apr-2013 10:31 PM
Last Post: aww
  How to insert comments into other place? igor74 4 138 08-Apr-2013 01:48 PM
Last Post: igor74
  SSO, dynamically loading comments and customising dcode 4 192 09-Mar-2013 03:22 AM
Last Post: dcode
  Comments Appear on All Pages?! JMG 1 178 26-Feb-2013 06:24 AM
Last Post: JMG
  One url for comments sabrina 1 180 23-Feb-2013 01:25 PM
Last Post: Steven
  Sorting comments in SEF url system otuzel 0 205 26-Dec-2012 03:32 PM
Last Post: otuzel
  The 10 last comments ? besric 4 428 12-Oct-2012 07:58 PM
Last Post: besric
  Pathname to the File that inserts the Comments Box Bill 10 1,093 23-Jun-2012 11:46 PM
Last Post: Bill
  Comments on separate page from form mdrake 1 532 15-Jun-2012 11:19 AM
Last Post: Steven

Forum Jump:


User(s) browsing this thread: 1 Guest(s)