Email Comments for CPG 1.6 Email Comments for CPG 1.6
 

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]

Main Menu

Email Comments for CPG 1.6

Started by gmc, November 17, 2018, 03:09:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gmc

This is a port of my cpg1.5.x plugin email_comments

Updates:

  • Eliminate direct calls to MySQL functions and convert to CPG wrapper functions that use the CPG database abstraction layer.
    MySQL functions are removed in PHP 7.
  • German language file contributed by cmfa.
  • Errant ) removed from display reported by cmfa
  • 'show/hide plugin options' added to language file reported by cmfa (already in german language file as well)
See thread http://forum.coppermine-gallery.net/index.php/topic,78163.0.html for the history under 1.5.

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

lurkalot

Had reports of errors when my members posted comments.  Turned this plugin off and the comments post fine,  but turn it on and make a comment it gives me this error on page,

Critical Error
There was an error while processing a database query.
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

gmc

Quote from: lurkalot on November 19, 2018, 08:39:55 PM
Had reports of errors when my members posted comments.  Turned this plugin off and the comments post fine,  but turn it on and make a comment it gives me this error on page,

Critical Error
There was an error while processing a database query.
Can you turn on debug (for admin at least) and see what the real error message is??
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

lurkalot

Thanks.  Just turned it on and enabled the plugin. Then made comment to generate the error.  This is a bridged setup with SMF 2.0.15 if that's any help.

Version Information:
Forum version: SMF 2.0.15 (more detailed)
Current SMF version: SMF 2.0.15
GD version: bundled (2.1.0 compatible)
Database Server: MySQL
MySQL version: 5.6.41
PHP: 5.6.38
Server version: Apache


Critical error

There was an error while processing a database query.

While executing query 'SELECT email_address AS user_email, id_member AS user_id, real_name AS username  FROM `caxxxx_sxxd`.smf_members WHERE id_member IN (, )' in plugins/email_comments/codebase.php on line 182

database error: 1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' )' at line 1

File: /hxxx/xxxxxx/public_html/gallery/include/functions.inc.php - Line: 250 
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

MG

Quote from: MG on February 01, 2019, 09:28:05 PM
Thanks for reply gmc,

So it's better for me if I update to the latest version of CPG and then start modifications? I do not know much about it, I give a few details below about my forum and server.
I can provide a test account if required.

Some Info:
Forum version: Forum Vbulletin 4.1.11  / Portal vBadvanced CMPS v4.2.0, bridged with CPG 1.5.46, cpmfetch 2.0.0
GD 2.X
Database Server: MySQL
MySQL 5.5.31
Php 5.3.24
Server: Apache


Quote from: gmc on February 02, 2019, 01:08:52 AM
While you certainly can upgrade to CPG 1.6 - my comment meant to use the CPG 1.6 compatible version of the plugin (which will run on CPG1.5.42 or higher.)  The changes made allow it to continue to work with CPG 1.6 and PHP7.

I don't have any experience with VBulletin other than as a user... would have to determine what code to invoke to send a PM - and add that code to the plugin.  Since you are bridged - we already have the forum user information to send to - the forum user table is what CPG is using.
I'd suggest an option of email or PM - so a single plugin can do both - and of course the PM code would be different for each bulletin system supported - start with yours of course - maybe others can contribute for other forums.

Thank you so much for help and infos.

It would be very good to have both versions in one plugin. Both email and PM with the option to choose (whether only an email or just a PM, or email and PM will be sent at the same time). A very good idea is.

I have another gallery (Ultimate Media Gallery) on my site and there is function PM to user of new comments. I can get you code what I find and maybe this would help something. I am not a coder so I don't know where to start even.

So, I have updated to the latest version of the plugin "Email Comments v1.2". Everything works fine with sending to email.
In the attachment I added a Polish translation for your plugin.
Forum Vbulletin 4.1.11  / Portal vBadvanced CMPS v4.2.0, bridged with CPG 1.5.46, cpmfetch 2.0.0

heavensportal

I am also having this error too, could it be due to the forum/gallery being bridge but on separate DB's?

mitko

Hi Greg, seems plugin doesn't work for bridging coppermine, same problems here
While executing query 'SELECT email_address AS user_email, id_member AS user_id, real_name AS username  FROM `mitko_photos`.smf_members WHERE id_member IN (, )' in plugins/email_comments/codebase.php on line 182
database error: 1064 : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' )' at line 1

/plugins/email_comments/codebase.php
Notice line 142: Undefined index: owner_id
Notice line 143: Undefined index: owner_id
Notice line 150: Undefined index: author_id
Notice line 152: Undefined index: author_id
Notice line 161: Undefined index: title
Notice line 161: Undefined index: filename
Notice line 221: Undefined variable: LINEBREAK
Notice line 222: Undefined variable: LINEBREAK
Notice line 223: Undefined variable: LINEBREAK

mitko

Resolved by replacing cpg_db_fetch_row to cpg_db_fetch_assoc in codebase.php

rsgj0098

Just installed this plugin on 1.6.26 (bridged with SMF 2.0.14) and it seems to work, but I'm getting complaints from users that they get emails every time someone posts a comment on a picture they're subscribed to. On another site I use (with older versions of Coppermine and SMF) it's configured that emails are only sent for the first comment made since the user last visited that picture, they get no more until they visit again (hope that makes sense..!)

Is it possible to do that with this plugin..? I really want to have the email notification feature, but not for every single comment, as if a thread gets busy, it clogs up peoples' email inboxes.

Thanks,

Ria  :-*