MOD: Email Notification to members on Comment (UPDATED 12-29-05) - Page 2 MOD: Email Notification to members on Comment (UPDATED 12-29-05) - Page 2
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

MOD: Email Notification to members on Comment (UPDATED 12-29-05)

Started by fcarentz, December 29, 2005, 05:41:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AWJunkies

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
  'del_all_comm' => 'Delete ALL comments', //cpg1.4


AFTER ADD THIS
  'notify_all_comm' => 'Notify me on ALL comments',



Open editPics.php

FIND THIS
$del_comments = isset($_POST['del_comments'.$pid]) || $delete;

AFTER IT ADD THIS
$notify = isset($_POST['notify'.$pid]);

NEXT FIND THIS
if ($reset_votes) $update .= ", pic_rating = '0', votes = '0'";

AFTER IT ADD THIS
if($notify) {
$update .= ", notify = 'Yes'";
}else{
$update .= ", notify = 'No'";
}


NEXT FIND THIS
// 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
// If the user is being notfied already then check it.
$isnotified = ($CURRENT_PIC['notify']) == "Yes" ? 'checked="checked" ': '';


NEXT FIND THIS
<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
                        <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
                        <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
                        <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>



Stramm

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

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.

odie3

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...  ;)
Odie3

odie3

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.  ;)
Odie3

willemt

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.

nickfzx

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

Mr Tee

Quote from: willemt 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.

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
cpg_mail($picture_owner_data['user_email'], $subject, $mail_body);

Replace with
cpg_mail($picture_owner_data['user_email'], $subject, make_clickable($mail_body), 'text/plain);

Stramm

Quote from: nickfzx 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

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

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

Stramm


icnd

I Think that it is a mistake but

if($notify) {
$update .= ", notify = 'Yes'";
}else{
$update .= ", notify = 'No'";
}



must be added after


    if ($reset_votes) {$update .= ", pic_rating = '0', votes = '0'";resetDetailVotes($pid);}


and not


    if ($reset_votes) {$update .= ", pic_rating = '0', votes = '0'";resetDetailVotes($pid);


It is missing a }  and without it, it is not working the update.

Thanks

icnd

Quote from: Mr Tee on December 23, 2006, 09:06:17 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
cpg_mail($picture_owner_data['user_email'], $subject, $mail_body);

Replace with
cpg_mail($picture_owner_data['user_email'], $subject, make_clickable($mail_body), 'text/plain);

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

;) Bye

Bazzah

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'

Bazzah

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

Mr Tee

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.

vonmax

Quote from: Mr Tee on September 20, 2007, 08:53:43 PM
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

Halfhidden

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


Joachim Müller

Quote from: Halfhidden on February 10, 2008, 11:08:36 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.

Halfhidden

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?