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: Email users on new comments  (Read 68500 times)

0 Members and 1 Guest are viewing this topic.

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: Re: Email users on new comments
« Reply #40 on: April 14, 2015, 01:47:38 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:
Code: [Select]
        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.
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: Email users on new comments
« Reply #41 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?
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: Re: Email users on new comments
« Reply #42 on: April 15, 2015, 09:42:05 am »

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.
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: Email users on new comments
« Reply #43 on: April 17, 2015, 02:57:19 am »

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
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: Email users on new comments
« Reply #44 on: April 17, 2015, 07:40:17 am »

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?
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Email users on new comments
« Reply #45 on: April 17, 2015, 09:30:34 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!
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: Re: Email users on new comments
« Reply #46 on: April 17, 2015, 06:45:54 pm »

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.  ;)
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0
Pages: 1 2 [3]   Go Up
 

Page created in 0.023 seconds with 19 queries.