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 [2] 3   Go Down

Author Topic: MOD: Email Notification to members on Comment (UPDATED 12-29-05)  (Read 56494 times)

0 Members and 1 Guest are viewing this topic.

AWJunkies

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 130
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #20 on: March 29, 2006, 11:16:38 pm »

HERE are the edits to make the editpics.php work and function correctly. Now you can edit all files at once and not one by one.


Open lang/english.php

FIND THIS
Code: [Select]
  'del_all_comm' => 'Delete ALL comments', //cpg1.4

AFTER ADD THIS
Code: [Select]
  'notify_all_comm' => 'Notify me on ALL comments',


Open editPics.php

FIND THIS
Code: [Select]
$del_comments = isset($_POST['del_comments'.$pid]) || $delete;
AFTER IT ADD THIS
Code: [Select]
$notify = isset($_POST['notify'.$pid]);
NEXT FIND THIS
Code: [Select]
if ($reset_votes) $update .= ", pic_rating = '0', votes = '0'";
AFTER IT ADD THIS
Code: [Select]
if($notify) {
$update .= ", notify = 'Yes'";
}else{
$update .= ", notify = 'No'";
}

NEXT FIND THIS
Code: [Select]
// If this is the users gallery icon then check it
$isgalleryicon_selected = ($CURRENT_PIC['galleryicon']) ? 'checked="checked" ': '';
$isgalleryicon_disabled = ($CURRENT_PIC['category'] < FIRST_USER_CAT)? 'disabled="disabled" ':'';

AFTER IT ADD THIS
Code: [Select]
// If the user is being notfied already then check it.
$isnotified = ($CURRENT_PIC['notify']) == "Yes" ? 'checked="checked" ': '';

NEXT FIND THIS
Code: [Select]
<tr>
           <td width="20%" align="center"><input type="checkbox" name="galleryicon" {$isgalleryicon_selected}{$isgalleryicon_disabled}value="{$CURRENT_PIC['pid']}" class="checkbox" />{$lang_editpics_php['gallery_icon']}</td>
          <td width="20%" align="center"><input type="checkbox" name="read_exif" value="1" class="checkbox" />{$lang_editpics_php['read_exif']}</td>
          <td width="20%" align="center"><input type="checkbox" name="reset_vcount" value="1" class="checkbox" />{$lang_editpics_php['reset_view_count']}</td>
          <td width="20%" align="center"><input type="checkbox" name="reset_votes" value="1" class="checkbox" />{$lang_editpics_php['reset_votes']}</td>
          <td width="20%" align="center"><input type="checkbox" name="del_comments" value="1" class="checkbox" />{$lang_editpics_php['del_comm']}</td>
</tr>

AFTER IT ADD THIS
Code: [Select]
                        <tr>
    <td width="100%" align="center" colspan="5"><input type="checkbox" name="notify{$CURRENT_PIC['pid']}" id="notify{$CURRENT_PIC['pid']}" value="1" {$isnotified} class="checkbox" /><label for="notify{$CURRENT_PIC['pid']}" class="clickable_option">{$lang_editpics_php['notify_comm']}</label></td>
</tr>

NEXT FIND THIS
Code: [Select]
                        <td width="20%" align="right">
                            <b>{$lang_editpics_php['select_unselect']}:</b>
                        </td>
                        <td width="20%" align="center">
                            <span class="admin_menu">
                                <input type="checkbox" name="deleteAll" onclick="selectAll(this,'delete');" class="checkbox" id="deleteAll" />
                                <label for="deleteAll" class="clickable_option">{$lang_editpics_php['del_all']}</label>
                            </span>
                        </td>
                        <td width="20%" align="center">
                            <span class="admin_menu">
                                <input type="checkbox" name="reset_vcountAll" onclick="selectAll(this,'reset_vcount');" class="checkbox" id="reset_vcountAll" />
                                <label for="reset_vcountAll" class="clickable_option">{$lang_editpics_php['reset_all_view_count']}</label>
                            </span>
                        </td>
                        <td width="20%" align="center">
                            <span class="admin_menu">
                                <input type="checkbox" name="reset_votesAll" onclick="selectAll(this,'reset_votes');" class="checkbox" id="reset_votesAll" />
                                <label for="reset_votesAll" class="clickable_option">{$lang_editpics_php['reset_all_votes']}</label>
                            </span>
                        </td>
                        <td width="20%" align="center">
                            <span class="admin_menu">
                                <input type="checkbox" name="del_commentsAll" onclick="selectAll(this,'del_comments');" class="checkbox"reset_votesAll" id="del_commentsAll" />
                                <label for="del_commentsAll" class="clickable_option">{$lang_editpics_php['del_all_comm']}</label>
                            </span>
                        </td>

REPLACE WITH THIS
Code: [Select]
                        <td align="right">
                            <b>{$lang_editpics_php['select_unselect']}:</b>
                        </td>
                        <td align="center">
                            <span class="admin_menu">
                                <input type="checkbox" name="deleteAll" onclick="selectAll(this,'delete');" class="checkbox" id="deleteAll" />
                                <label for="deleteAll" class="clickable_option">{$lang_editpics_php['del_all']}</label>
                            </span>
                        </td>
                        <td align="center">
                            <span class="admin_menu">
                                <input type="checkbox" name="reset_vcountAll" onclick="selectAll(this,'reset_vcount');" class="checkbox" id="reset_vcountAll" />
                                <label for="reset_vcountAll" class="clickable_option">{$lang_editpics_php['reset_all_view_count']}</label>
                            </span>
                        </td>
                        <td align="center">
                            <span class="admin_menu">
                                <input type="checkbox" name="reset_votesAll" onclick="selectAll(this,'reset_votes');" class="checkbox" id="reset_votesAll" />
                                <label for="reset_votesAll" class="clickable_option">{$lang_editpics_php['reset_all_votes']}</label>
                            </span>
                        </td>
                        <td align="center">
                            <span class="admin_menu">
                                <input type="checkbox" name="del_commentsAll" onclick="selectAll(this,'del_comments');" class="checkbox"reset_votesAll" id="del_commentsAll" />
                                <label for="del_commentsAll" class="clickable_option">{$lang_editpics_php['del_all_comm']}</label>
                            </span>
                        </td>
                        <td align="center">
                            <span class="admin_menu">
                                <input type="checkbox" name="notify" {$isnotified} onclick="selectAll(this,'notify');" class="checkbox"reset_votesAll" id="notify" />
                                <label for="notify" class="clickable_option">{$lang_editpics_php['notify_all_comm']}</label>
                            </span>
                        </td>

Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #21 on: March 30, 2006, 07:23:08 pm »

http://forum.coppermine-gallery.net/index.php?topic=20688.0

this was my attempt. Maybe you can use parts of it. Has subscribe/ unsubscribe, global on/ off in config, users can turn it on/ off in their profile, a manager to unsubscribe from multiple images

It's in my 1.4 modpack as well

AWJunkies

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 130
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #22 on: March 31, 2006, 03:35:13 am »

I didn't want to mess with profile because I run a universal profile page and user control panel for 22 domains. They are all linked and adding more to it is huge hassle. I like the idea and will actually port it to this as well. I will look at your link now.
Logged

odie3

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 41
  • Ghost Dogs Admin
    • Ghost Dogs HQ
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #23 on: June 05, 2006, 06:47:47 pm »

i would like to know do I just use the first post MOD Code?  Or do I have to include the other code within this thread?

I am on Bridged phpBB/Coppermine 1.4.6.

Thanks - rather do all this editing once...  ;)
Logged
Odie3

odie3

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 41
  • Ghost Dogs Admin
    • Ghost Dogs HQ
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #24 on: June 10, 2006, 04:04:27 am »

I did the first post edits - seems to work just fine.

Note:  Seem you have to disable send Admin Email of comments to get this MODs emails.  I guess that makes since but had me worried until I figured that out.  ;)
Logged
Odie3

willemt

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #25 on: August 20, 2006, 03:42:05 am »

Tried this mod and it works excellent on 1.4.8 bridged with phpbb2. ;D
One question though: My phpbb2 setup sends out message notifications using html email.... It would be terrific if I could use the same html template for the emails send after commenting on pictures....
Anyone who knows how to send html email instead of plain text?

Thanks!
Willem.
Logged

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #26 on: September 08, 2006, 05:39:05 am »

hi

I want to try this on a punbb integration

I am guessing it will work as people have it runing with phpbb...my question is, as the profile page is not accessable because it is now punbb's profile page, will users till be able to opt out of email notifications?

all the best

Nick
Logged

Mr Tee

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 70
    • The Studio Online
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #27 on: December 23, 2006, 09:06:17 am »

Tried this mod and it works excellent on 1.4.8 bridged with phpbb2. ;D
One question though: My phpbb2 setup sends out message notifications using html email.... It would be terrific if I could use the same html template for the emails send after commenting on pictures....
Anyone who knows how to send html email instead of plain text?

Thanks!
Willem.

If you are refering to the fact that the link is not clickable in the notification email you can chage this in db_input.php

Find this
Code: [Select]
cpg_mail($picture_owner_data['user_email'], $subject, $mail_body);
Replace with
Code: [Select]
cpg_mail($picture_owner_data['user_email'], $subject, make_clickable($mail_body), 'text/plain);
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #28 on: December 23, 2006, 09:27:41 am »

hi

I want to try this on a punbb integration

I am guessing it will work as people have it runing with phpbb...my question is, as the profile page is not accessable because it is now punbb's profile page, will users till be able to opt out of email notifications?

all the best

Nick

I haven't tried that mod here... so I'm not 100% sure. But I don't think a user can opt in/ out in his profile to receive notifications. At least I wasn't able to spot a database addition that stores
You can tag a single picture. And all users who have written a comment will get notified once another user writes a new comment.

Don't you use the modpack anymore? It has a notification system. Users can opt in/ out using their profile (either CPG's or, if you're bridged, the forum's). It uses a new db table to store which user subscribed to a certain pic. So even users who haven't commented can subscribe (and of course opt out). Users can set to auto subscribe to pics they upload and/ or comment.
Little restrictions if you're bridged. Then (depending on the forum) auto subscribe can't be divided up. The user enables the notification with the forums notification checkbox (no seperate setting)

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #29 on: December 23, 2006, 08:23:33 pm »

I've done it and got it working fine...you even helped me out with it a month or so ago :)
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #30 on: December 23, 2006, 08:54:57 pm »

ups, yes, I remember  :-X

icnd

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • DigiAlbum.eu
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #31 on: May 22, 2007, 12:03:23 pm »

I Think that it is a mistake but

Code: [Select]
if($notify) {
$update .= ", notify = 'Yes'";
}else{
$update .= ", notify = 'No'";
}


must be added after

Code: [Select]
    if ($reset_votes) {$update .= ", pic_rating = '0', votes = '0'";resetDetailVotes($pid);}

and not

Code: [Select]
    if ($reset_votes) {$update .= ", pic_rating = '0', votes = '0'";resetDetailVotes($pid);

It is missing a
Code: [Select]
}  and without it, it is not working the update.

Thanks
Logged

icnd

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • DigiAlbum.eu
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #32 on: May 23, 2007, 09:35:13 am »

If you are refering to the fact that the link is not clickable in the notification email you can chage this in db_input.php

Find this
Code: [Select]
cpg_mail($picture_owner_data['user_email'], $subject, $mail_body);
Replace with
Code: [Select]
cpg_mail($picture_owner_data['user_email'], $subject, make_clickable($mail_body), 'text/plain);

It is missing a
Code: [Select]
'Replace with
Code: [Select]
cpg_mail($picture_owner_data['user_email'], $subject, make_clickable($mail_body), 'text/plain');
 ;) Bye
Logged

Bazzah

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #33 on: May 27, 2007, 02:09:19 pm »

I decided to try this using the invision board bridge (www.hirescovers.net) Should this work OK, or have I done something drastically wrong?? When I go into edit file information, and select 'Notify me of comments' I get 'Critical error - There was an error while processing a database query'
Logged

Bazzah

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #34 on: May 27, 2007, 10:30:42 pm »

p.s I have just gone to approve some images, and I am receiving the same error! HELP!!!
Logged

Mr Tee

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 70
    • The Studio Online
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #35 on: September 20, 2007, 08:53:43 pm »

I have been using this mod for some time and it works very well. One of my members has asked if there was any way of being informed when a new comment is added to any image and not just their own. Obviously, like this one, there would have to be a way of opting out because not everyone would want to be flooded with emails.

The more I think about it I can see it getting very involved because perhaps members would then like to be able to subscribe only to certain authors. Anyway I thought I would mention it. Great mod though thanks.
Logged

vonmax

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #36 on: January 16, 2008, 01:11:47 am »

One of my members has asked if there was any way of being informed when a new comment is added to any image and not just their own.

hello
I had the same question
Logged

Halfhidden

  • Guest
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #37 on: February 10, 2008, 11:08:36 pm »

I would like to use this mod. But on the original mod the first instructions were to run a query for the following:

ALTER TABLE `gal_pictures` ADD `notify` ENUM( 'Yes', 'No' ) DEFAULT 'Yes' NOT NULL ;
ALTER TABLE `gal_pictures` ADD `sent` INT( 11 ) NOT NULL ;

I am running Coppermine 1.4.14 bridged to phpbb3. when I run the query I get errors from Sql because the tables don't exist.  I know I've missed the point here somewhere.
One again I'm cap in hand!
Sorry,
Steff

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #38 on: April 19, 2008, 02:33:53 pm »

I am running Coppermine 1.4.14 bridged to phpbb3.
That setup goes unsupported (as in "no support at all"). You're not allowed to ask questions on a mods thread if you run this setup. You know our thoughts on this: upgrade to the most recent stable release, and figure out stuff that may be related to the unsupported phpbb3 bridge on your own.
Logged

Halfhidden

  • Guest
Re: MOD: Email Notification to members on Comment (UPDATED 12-29-05)
« Reply #39 on: April 19, 2008, 04:05:36 pm »

That post is very old... You'll know that I am running the latest version 1.4.18 as you posted to me only a day or so ago. The question wasn't about support for the bridge.... as you can see rather establishing if my problem was created by the fact that I ran the bridge... in which case Obviously I would seek help about the bridge from the appropriate forum.... Is there a point to your attitude towards me of late? Have I upset you?
Logged
Pages: 1 [2] 3   Go Up
 

Page created in 0.043 seconds with 20 queries.