Support > cpg1.5 email
Email users on new comments
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:
--- Code: --- 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));
--- End code ---
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
--- End quote ---
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.
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?
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?
--- End quote ---
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.
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
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?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version