Email users on new comments - Page 3 Email users on new comments - Page 3
 

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

Email users on new comments

Started by lurkalot, March 01, 2011, 07:31:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lurkalot

Quote from: gmc on April 14, 2015, 01:00:37 AM
Nothing jumping out at me either...
On my list to do something in this area - if someone can beat me to it....
I had a plugin call added here in 1.5.28:

        CPGPluginAPI::action('comment_add', array('msg_id' => cpg_db_last_insert_id(), 'pid' => $pid, 'msg_author' => $msg_author, 'author_id' => USER_ID, 'msg_body' => $msg_body, 'approval' => $app));

for just this function.  I used code based on this thread (variation of André and cmfa's input from this thread and from some other comments) in another members gallery - and intended to convert to plugin for future use by others.
Just haven't had the time to work on the plugin yet.... Best laid plans.

Greg

Thanks Greg. A plugin would be fantastic tbh, I wish I could code one myself, but I haven't a clue.  I'm now wondering if the problem is with my site or host settings rather than Coppermine.  I'm still checking that out.
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

gmc

I'll take a look at making a plugin for this...

The one feature - that I agree would be nice - but I need some suggestions on how - is individual users being able to opt in/out...
Pretty simple in a standalone gallery - but an issue in bridged gallery (no control over the user table format... or ability to add columns) - and doesn't work well in a user's cookies - because that isn't the current user when sending the email.
(and lurkalot - I know you use the SMF bridge for at least some of your galleries...)
Anyone know how this has been approached for other features, or have any suggestions?

Otherwise was looking a few config variables:
- send email to picture owner (if comment isn't by owner)
- send email to others that commented on the same picture
- send thumbnail (embedded link) with the email
- custom email text to override default

And two plugin actions called by Plugin API:
in db_input.php - 'comment_add'
in reviewcom.php - 'comment_approve'

So email will be sent when comment is added (if no approval needed) - or when comment is approved.

Any other thoughts/comments?
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

lurkalot

Quote from: gmc on April 14, 2015, 08:12:22 PM
I'll take a look at making a plugin for this...

The one feature - that I agree would be nice - but I need some suggestions on how - is individual users being able to opt in/out...
Pretty simple in a standalone gallery - but an issue in bridged gallery (no control over the user table format... or ability to add columns) - and doesn't work well in a user's cookies - because that isn't the current user when sending the email.
(and lurkalot - I know you use the SMF bridge for at least some of your galleries...)
Anyone know how this has been approached for other features, or have any suggestions?

Otherwise was looking a few config variables:
- send email to picture owner (if comment isn't by owner)
- send email to others that commented on the same picture
- send thumbnail (embedded link) with the email
- custom email text to override default

And two plugin actions called by Plugin API:
in db_input.php - 'comment_add'
in reviewcom.php - 'comment_approve'

So email will be sent when comment is added (if no approval needed) - or when comment is approved.

Any other thoughts/comments?

gmc, I think you've got the feature list about covered.  Yes all my installs are bridged, but I don't personally need any control to turn it on / off if it's built as a plugin, as I could just uninstall it if need to turn the emails off.  Also I'm not too bothered about giving individual members this switch either. Although if it could be done it would be great.

I think if this was built in as core though, it would need a on / off switch, as some might not want to use it.
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

gmc

We have a bouncing baby plugin...  :)
See announcement thread here: http://forum.coppermine-gallery.net/index.php/topic,78163.0.html
and happy commenting!

CPG 1.5.28 or higher required... the plugin points needed were added in that release.  Tested thru 1.5.34 - the now current release.

Greg
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

lurkalot

Greg, thank you.   8) I'll give it a try now.  I'm assuming I'll have to remove the existing edit I made to the db_input.php file?
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Αndré

Quote from: lurkalot on April 17, 2015, 07:40:17 AM
I'm assuming I'll have to remove the existing edit I made to the db_input.php file?

They're not needed anymore. Actually, if the mod would work as expected in your gallery, you should get each email twice with the mod and plugin enabled.

Thanks for creating the plugin, Greg!

lurkalot

Quote from: Αndré on April 17, 2015, 09:30:34 AM
They're not needed anymore. Actually, if the mod would work as expected in your gallery, you should get each email twice with the mod and plugin enabled.

Thanks for creating the plugin, Greg!

Andre, thanks. I actually replaced the file with a fresh one before installing the plugin just in case.  Greg did a good job on this, I'm really happy with it.  ;)
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0