Author Topic: [Mod] Displays how many own Comments below the Thumbnails or Detailpage  (Read 6831 times)

0 Members and 1 Guest are viewing this topic.

Rembrandt

  • Guest
Hi!

The desire come from here, http://www.4homepages.de/forum/index.php?topic=30441.0

1.) search in includes/functions.php:

function show_image($image_row$mode ""$show_link 1$detailed_view 0) {

insert above:

function user_comments($image_id 0$user_id 0) {
  global 
$site_db$user_table_fields;
  if (
$user_id != GUEST ) {
    
$sql "SELECT COUNT(comment_id) AS comments
            FROM "
.COMMENTS_TABLE."
            WHERE image_id = 
$image_id AND user_id = $user_id";
    
$countcomments $site_db->query_firstrow($sql);
 }
 return 
$countcomments['comments'];
}

1.2) search:

    $user_name_link 
$user_name;
  }

insert below:

$user_comments 
user_comments($image_row['image_id'],$user_info['user_id']);

1.3) search:

"image_comments" => $num_comments,

insert below:

"user_comments"=> ($user_comments) ? $lang['count_user_comment']."<span class=\"new\">".$user_comments."</span>":"",


2.) search in lang/YourLang/main.php above "?>"
Deutsch

$lang
['count_user_comment'] = "Eigene Kommentare: ";

English

$lang
['count_user_comment'] = "Own Comments: ";


3.) search in templates/YourTemplates/thumbnail_bit.html:

{image_comments}

and replace:

{image_comments}<br>{user_comments}


4.) search in templates/YourTemplates/details.html:

{if allow_comments}

insert below, or where ever you want:

{user_comments}<br>


mfg Andi
« Last Edit: December 31, 2011, 08:31:47 PM by Rembrandt »

Offline Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: [Mod] Displays how many own Comments below the Thumbnails or Detailpage
« Reply #1 on: January 01, 2012, 10:43:14 AM »
Dankeschön! das funktioniert einwandfrei!
saubere Arbeit, so habe ich mir das gewünscht, lieber Andi.

Rembrandt

  • Guest
Re: [Mod] Displays how many own Comments below the Thumbnails or Detailpage
« Reply #2 on: January 01, 2012, 10:54:19 AM »
Danke dir, sowas hört man gerne.  :D

 

Post your comments here