• [MOD] Show Received Comments V.2 (by rproctor) 5 0 5 1
Currently:  

Author Topic: [MOD] Show Received Comments V.2 (by rproctor)  (Read 66589 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Show Received Comments V.2 (by rproctor)
« Reply #15 on: August 19, 2006, 06:20:35 AM »
use phpmyadmin and execute this query:[qcode]ALTER TABLE 4images_comments ADD is_read TINYINT( 1 ) DEFAULT '0' NOT NULL
[/qcode]
Prefix 4images_ is default, so leave it like that UNLESS you use different prefix for the tables.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline lemccoy

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • DrunkIsland
Re: [MOD] Show Received Comments V.2 (by rproctor)
« Reply #16 on: September 08, 2006, 03:35:16 PM »
I have created an autoinstall file which works...any comments feel free...

rename .txt to .php

Offline lemccoy

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • DrunkIsland
Re: [MOD] Show Received Comments V.2 (by rproctor)
« Reply #17 on: September 08, 2006, 04:12:38 PM »
did anyone figure out how to show thumbnails below the image name by any chance?

Offline troopers

  • Newbie
  • *
  • Posts: 32
    • View Profile
    • weltimperator.de
Re: [MOD] Show Received Comments V.2 (by rproctor)
« Reply #18 on: September 13, 2006, 10:36:49 AM »
Hi,

if you want to display the commented image in the comment_template, do the following steps.

open member.php:

find:
Code: [Select]
$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date, i.image_name".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq")."
        FROM ".COMMENTS_TABLE." c
        LEFT JOIN ".IMAGES_TABLE." i ON i.image_id = c.image_id
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
        WHERE i.user_id = ".$user_info['user_id']." AND c.is_read = 0
        ORDER BY c.comment_date ASC
          LIMIT $offset, $commentperpage";

edit to:
Code: [Select]
$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date, i.image_name,i.image_thumb_file,i.cat_id".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq")."
        FROM ".COMMENTS_TABLE." c
        LEFT JOIN ".IMAGES_TABLE." i ON i.image_id = c.image_id
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
        WHERE i.user_id = ".$user_info['user_id']." AND c.is_read = 0
        ORDER BY c.comment_date ASC
          LIMIT $offset, $commentperpage";


find:     
Code: [Select]
$image_link = "<b><a href=\"".$image_url."\">".$comment_row[$i]['image_name']."</a></b>";
below add:
Code: [Select]
$comment_image = "<a href=\"".$image_url."\"><img src=\"".THUMB_PATH."/".$comment_image_id."/".$comment_image."\" border=\"0\"/></a>"; 

find:   
Code: [Select]
$site_template->register_vars(array(
       "count" => $i,
      "image_name" => $image_link,
        "comment_id" => $comment_row[$i]['comment_id'],

add below:
Code: [Select]
  "comment_image" => $comment_image,       
find:

Code: [Select]
else {
    $comments = "";
    $bgcounter = 0;
    for ($i = 0; $i < $num_comments; $i++) {
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;

      $comment_user_email = "";
      $comment_user_email_save = "";
      $comment_user_mailform_link = "";
      $comment_user_email_button = "";
      $comment_user_homepage_button = "";
      $comment_user_icq_button = "";
      $comment_user_profile_button = "";
      $comment_user_status_img = REPLACE_EMPTY;
      $comment_user_name = htmlspecialchars($comment_row[$i]['comment_user_name']);
      $comment_user_info = $lang['userlevel_guest'];


add below:       
Code: [Select]
$comment_image = $comment_row[$i]['image_thumb_file'];
      $comment_image_id = $comment_row[$i]['cat_id'];     


open your comment_template & use
Code: [Select]
{comment_image} for the image. dont forget, the comment_image is the thumbnail which was generated. if you want a smaller version of the thumb, try phpthumb :) (pls don't resize with html tags)


i hope i don't forget now something (i edited this reply 6 times -g-) :D
« Last Edit: September 13, 2006, 12:35:49 PM by troopers »
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
weltimperator.de

Offline stomka.net

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [MOD] Show Received Comments V.2 (by rproctor)
« Reply #19 on: September 13, 2006, 06:06:53 PM »
Thx troopers

thumb display correct. :lol: :lol: :lol:

Offline nfprehn

  • Newbie
  • *
  • Posts: 41
    • View Profile
    • How to become a model
Re: [MOD] Show Received Comments V.2 (by rproctor)
« Reply #20 on: September 14, 2006, 07:50:08 PM »
Thanks V@no that is a neater solution than ccsakuweb's.

Now the real challenge is to include the personal image of the person who left the comment!  :lol:

Offline hyde101

  • Sr. Member
  • ****
  • Posts: 410
  • 34TR.COM (Running 4images)
    • View Profile
    • Nostalgia Istanbul
Re: [MOD] Show Received Comments V.2 (by rproctor)
« Reply #21 on: September 24, 2006, 09:55:57 PM »
Hi everyone, is there anyway to add another button below Comments (x) so that guests can also see the "latest comments" using this mod? I just want guests to be able to see last 10 comments or something like that.

Thank You.

Please Vote for my site: Here

Offline AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: finally !! when login "u have xx comments"
« Reply #22 on: December 26, 2006, 12:37:25 PM »
One problem:
The comments for pics in a hidden category are viewable too.



Has anyone figured out how to solve this problem? I use this mod and love it, but I need to controll what they are allowed to see .

Thanks-
Robert
As long as I can finish my site before I die.

Offline ccsakuweb

  • Sr. Member
  • ****
  • Posts: 498
  • Patri
    • View Profile
    • My Art
Re: [MOD] Show Received Comments V.2 (by rproctor)
« Reply #23 on: December 28, 2006, 12:03:10 PM »
 I have a problem.. when i delete a comment the next time that i login the comment deleted is there shown... who have the same problem??
I think that I know how to add the userpic but I need to know how to solve my problem please
:arrow: 4images Paid Mods: Links, Blog, Albums, Subdomains for users, Diferent templates for user profile, Related picture in details, Last pictures in details.
And the mod that you request me.   Demo: http://www.myart.es

A website dedicated to artist people who loves drawing, design, writing and more

Offline tansamalaja

  • Full Member
  • ***
  • Posts: 185
    • View Profile
Re: [MOD] Show Received Comments V.2 (by rproctor)
« Reply #24 on: June 19, 2007, 11:08:36 AM »
Es werden aber alle Kommentare zu den eigenen Bildern angezeigt, auch aus Kategorien, wo die User keinen Einblick haben sollen z.B. Entscheidungsordner über die Zulassung von Bildern, kann man das unterbinden?

Also wenn ich den Ordner mit den Kommentarrechten auf "privat/Administratoren" stehen habe, dass die dort gemachten Kommentare nicht für den User angezeigt werden?

Offline AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: [MOD] Show Received Comments V.2 (by rproctor)
« Reply #25 on: March 12, 2009, 07:20:05 PM »
I am trying to find out how to show recent comments for category only and its subcat to show on the category.html

I have created a new thread here: http://www.4homepages.de/forum/index.php?topic=24380.new#new since it is different than this mod kind of.


Can you put your brainpower to this new idea and awsome complimentary mod V@no? Thanks!
As long as I can finish my site before I die.

Offline fermachado

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Re: [MOD] Show Received Comments V.2 (by rproctor)
« Reply #26 on: March 20, 2009, 10:52:26 AM »
Hi,

I have a little problem.

If delete the comments in my received comments just delete here, don't delete in the standart comments.

I use this [MOD] Last comments v1.1.0 to

I make a example with the image bellow


Thanks
www.globalfoto.net

Sintra - Portugal

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
Re: [MOD] Show Received Comments V.2 (by rproctor)
« Reply #27 on: March 20, 2009, 12:30:15 PM »
Was genau ist denn das?

Offline fermachado

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Re: [MOD] Show Received Comments V.2 (by rproctor)
« Reply #28 on: March 20, 2009, 01:12:31 PM »
Was genau ist denn das?

I don't understand German! 8O but I think you don't understand my question. :lol:

The problem are:

If I delete the photo whit the option remove selected just delete in this page don't delete bellow the photo.

Hope understand my poor english

Greetings from Portugal

Fernando

www.globalfoto.net

Sintra - Portugal

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Show Received Comments V.2 (by rproctor)
« Reply #29 on: March 20, 2009, 02:35:49 PM »
I don't think I completely understand what is the problem you described, but did you apply ALL the bug fixes? particularly [1.7 - 1.7.6] User comments count not updated when image(s) deleted
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)