Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Enable user notification on comments in Public albums  (Read 7924 times)

0 Members and 1 Guest are viewing this topic.

bulli

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Enable user notification on comments in Public albums
« on: July 07, 2009, 08:38:55 am »

Hello,

i get a small problem, i activated the button "Enable user notification on comments" and in the userprofile the point "Automatically subscribe to pictures you posted " is also marked but i get no mail, when klick "Get notified about new comments" this works.

Any idea.

www.naturfoto-forum.de

kind regards volker
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Enable user notification on comments in Public albums
« Reply #1 on: July 07, 2009, 01:54:44 pm »

If you enable this, then that's only for new pics (you posted after enabling the option). Check in the subscription manager if the picture is there.

bulli

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Enable user notification on comments in Public albums
« Reply #2 on: July 07, 2009, 03:45:26 pm »

HI Stramm,

the points in the profil menu are all checked, a new pic upload was done, but it do not work.

but i see when i try to change e.g. the theme in the configuration that this was saved but don´t work.

it looks like that there was the problem.
Logged

bulli

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Enable user notification on comments in Public albums
« Reply #3 on: July 07, 2009, 04:49:37 pm »

HI Stramm,

the points in the profil menu are all checked, a new pic upload was done, but it do not work.

but i see when i try to change e.g. the theme in the configuration that this was saved but don´t work.

it looks like that there was the problem.

when i manually activate the button after my upload i get the mail.

Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Enable user notification on comments in Public albums
« Reply #4 on: July 07, 2009, 06:06:41 pm »

with a prior fix I've introduced a new bug
in picmgmnt.inc.php
Code: [Select]
$time = time();
if ($CONFIG['enable_user_notification']){
$auto_subscribe_post = $cpg_udb->get_auto_subscribe_post($user_id);
if ($auto_subscribe_post['auto_subscribe_post']) {
$result3 = cpg_db_query("SELECT pid FROM {$CONFIG['TABLE_PICTURES']} WHERE ctime='".$time."' AND filename='".addslashes($filename)."'");
   if(list($pid) = mysql_fetch_row($result3)){
cpg_db_query("INSERT INTO {$CONFIG['TABLE_NOTIFY']} (user_id, picture_id) VALUES('".$user_id."' ,'".$pid."')");
}
}
}

    $query = "INSERT INTO {$CONFIG['TABLE_PICTURES']} (aid, filepath, filename, filesize, total_filesize, pwidth, pheight, ctime, owner_id, owner_name, title, caption, keywords, approved, user1, user2, user3, user4, pic_raw_ip, pic_hdr_ip, position) VALUES ('{$CURRENT_PIC_DATA['aid']}', '" . addslashes($CURRENT_PIC_DATA['filepath']) . "', '" . addslashes($CURRENT_PIC_DATA['filename']) . "', '{$CURRENT_PIC_DATA['filesize']}', '{$CURRENT_PIC_DATA['total_filesize']}', '{$CURRENT_PIC_DATA['pwidth']}', '{$CURRENT_PIC_DATA['pheight']}', '" . time() . "', '{$CURRENT_PIC_DATA['owner_id']}', '{$CURRENT_PIC_DATA['owner_name']}','{$CURRENT_PIC_DATA['title']}', '{$CURRENT_PIC_DATA['caption']}', '{$CURRENT_PIC_DATA['keywords']}', '{$CURRENT_PIC_DATA['approved']}', '{$CURRENT_PIC_DATA['user1']}', '{$CURRENT_PIC_DATA['user2']}', '{$CURRENT_PIC_DATA['user3']}', '{$CURRENT_PIC_DATA['user4']}', '{$CURRENT_PIC_DATA['pic_raw_ip']}', '{$CURRENT_PIC_DATA['pic_hdr_ip']}', '{$CURRENT_PIC_DATA['position']}')";
    $result = cpg_db_query($query);

    return $result;
should be
Code: [Select]
   $query = "INSERT INTO {$CONFIG['TABLE_PICTURES']} (aid, filepath, filename, filesize, total_filesize, pwidth, pheight, ctime, owner_id, owner_name, title, caption, keywords, approved, user1, user2, user3, user4, pic_raw_ip, pic_hdr_ip, position) VALUES ('{$CURRENT_PIC_DATA['aid']}', '" . addslashes($CURRENT_PIC_DATA['filepath']) . "', '" . addslashes($CURRENT_PIC_DATA['filename']) . "', '{$CURRENT_PIC_DATA['filesize']}', '{$CURRENT_PIC_DATA['total_filesize']}', '{$CURRENT_PIC_DATA['pwidth']}', '{$CURRENT_PIC_DATA['pheight']}', '" . time() . "', '{$CURRENT_PIC_DATA['owner_id']}', '{$CURRENT_PIC_DATA['owner_name']}','{$CURRENT_PIC_DATA['title']}', '{$CURRENT_PIC_DATA['caption']}', '{$CURRENT_PIC_DATA['keywords']}', '{$CURRENT_PIC_DATA['approved']}', '{$CURRENT_PIC_DATA['user1']}', '{$CURRENT_PIC_DATA['user2']}', '{$CURRENT_PIC_DATA['user3']}', '{$CURRENT_PIC_DATA['user4']}', '{$CURRENT_PIC_DATA['pic_raw_ip']}', '{$CURRENT_PIC_DATA['pic_hdr_ip']}', '{$CURRENT_PIC_DATA['position']}')";
    $result = cpg_db_query($query);

$time = time();
if ($CONFIG['enable_user_notification']){
$auto_subscribe_post = $cpg_udb->get_auto_subscribe_post($user_id);
if ($auto_subscribe_post['auto_subscribe_post']) {
$result3 = cpg_db_query("SELECT pid FROM {$CONFIG['TABLE_PICTURES']} WHERE ctime='".$time."' AND filename='".addslashes($filename)."'");
   if(list($pid) = mysql_fetch_row($result3)){
cpg_db_query("INSERT INTO {$CONFIG['TABLE_NOTIFY']} (user_id, picture_id) VALUES('".$user_id."' ,'".$pid."')");
}
}
}

    return $result;

bulli

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Enable user notification on comments in Public albums
« Reply #5 on: July 08, 2009, 10:43:03 am »

Hi Stramm,

thx the subscribe works now, but when i upload a picture i get now "The selected album/file does not exist !", but the upload was done.

Volker
Logged

bulli

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Enable user notification on comments in Public albums
« Reply #6 on: July 08, 2009, 10:53:44 am »

Hi Stramm,

thx the subscribe works now, but when i upload a picture i get now "The selected album/file does not exist !", but the upload was done.

Volker

And one thing more, in german language the subject from the mail is english an the mail are empty.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Enable user notification on comments in Public albums
« Reply #7 on: July 08, 2009, 01:43:54 pm »

We have a strict "one issue per thread" policy that you agreed to respect when signing up! >:(
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Enable user notification on comments in Public albums
« Reply #8 on: July 08, 2009, 02:43:13 pm »

bulli sent me an unrequested, unwanted PM with the following content:
We have a strict "one issue per thread" policy that you agreed to respect when signing up!

Yes, i know that but that point come from stramm´s fix. If i make a new topic i need to explane the first steps.

Volker
We have another policy that disallows you to sent PMs. Maybe you should get familiar with board rules first before doing anything else.
Logged

bulli

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Enable user notification on comments in Public albums
« Reply #9 on: July 08, 2009, 04:57:52 pm »

bulli sent me an unrequested, unwanted PM with the following content:We have another policy that disallows you to sent PMs. Maybe you should get familiar with board rules first before doing anything else.

Now i read them, and need to say sorry for that. But it would be usefull to wrote that point also big and bold.

I hope the tipp is allowed.  :)


Volker

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Enable user notification on comments in Public albums
« Reply #10 on: July 08, 2009, 05:06:59 pm »

The board rules are being displayed when you sign up. They are accessible on each and every forum-driven page using the link that is named accordingly. Whenever a newbie (someone with a low post count) on this board composes a new posting, a board rules summary is being displayed. That should be enough if you ask me.
Logged
Pages: [1]   Go Up
 

Page created in 0.027 seconds with 20 queries.