Thank you LFrank and thank you mindless!! It works!!!! I'll tell you what I did so others may learn from my stupidity.
First mistake: Once I found the right file, I was copying ALL the code from the grey box above into the AddComments.inc file. I am so unfamiliar with php that I couldn't bring myself to look at the code to see what I was doing. This was giving me duplicates of some code and an error message.
Second mistake: Even though I was running an older version of Gallery, I inserted code that was made for the newer version. I thought it was close enough so what the hell.
Third mistake: I upgraded my version of Gallery but since I had made modifications to the old AddComment.inc file (and they looked close enough to me) I just copied over my old AddComment.inc. mindless pointed out that $red->isError() is 2.0.x code. But I had already overwritten my new AddComment.inc file thinking it was the same as the old.
Fourth mistake: Making changes to an original of a file, not the copy.
I was afraid if I uninstalled the module and then reinstalled it, all my old comments would be lost. So I went to the DL page, downloaded the entire module, found the AddComment.inc file and uploaded only that. And it works like a charm.
Thank you to mindless and especially LFrank for your incredible patience with my mind blowing ignorance. I couldn't have done it without you.
LFrank
Joined: 2005-02-19
Posts: 1023
Posted: Fri, 2006-09-15 04:15
You're welcome - I started the same way
Gallery version = 2.2-svn core 1.1.16
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8c
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de
markspiller
Joined: 2006-09-20
Posts: 22
Posted: Sun, 2006-09-24 18:05
Great thread, thanks! I just added in and tested the code, and it seems to work fine.
One question, though - it only detects new comments, not new images, right? I'm more concerned about what people post to the site (e.g. inappropriate images), not so much the comments (I actually had comments disabled, and only enabled them to test this out).
Is there any way to tweak this to easily catch the "new image added" events instead? (Sorry, I'm not versed in php, so the answer doesn't really jump out at me from looking at the code).
Thanks!
Mark
LFrank
Joined: 2005-02-19
Posts: 1023
Posted: Sun, 2006-09-24 18:40
markspiller,
for the new image, you might try the new notification module - the watch for new images is already running perfectly.
It's in the SVN-trunk gallery-contrib.
Gallery version = 2.2-svn core 1.1.16
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8c
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de
LFrank
Joined: 2005-02-19
Posts: 1023
Posted: Tue, 2006-09-26 17:32
Captenaj, the "ret" was changed to the new format (without the wrap...) - did you miss to attach your file, just wanted to look into it ...
Gallery version = 2.2-svn core 1.1.16
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8c
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de
Would you suggest trying to grab just that module (I'm not sure how to do that, or if it will work alone?). Or would it make more sense to simply update to a build that includes that? (I've always used the packaged builds, so I'm not sure if it is wise to grab individual pieces like that?)
Gallery version = 2.2-svn core 1.1.16
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8c
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de
markspiller
Joined: 2006-09-20
Posts: 22
Posted: Tue, 2006-09-26 18:51
Thanks - my version is 2.1.2
I'd consider moving up to the development version, though, for this feature, if it's relatively stable. (Do you know how far along 2.2 is?)
Thanks!
Mark
Gallery version = 2.1.2 core 1.1.0.2
PHP version = 4.4.4 cgi
Webserver = Apache/1.3.37 (Unix)
Database = mysql 4.0.27-standard-log, lock.system=flock
Toolkits = Exif, ImageMagick, SquareThumb, Thumbnail, NetPBM
Acceleration = none, none
Operating system = Linux infong 2.4 #1 SMP Thu Jan 13 08:59:31 CET 2005 i686 unknown
LFrank
Joined: 2005-02-19
Posts: 1023
Posted: Wed, 2006-09-27 04:21
Mark, feature freeze is at the doorsteps, I'm expecting a first release candidate very soon ... I had no issues with 2.2 from the very early start.
Gallery version = 2.2-svn core 1.1.16
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8c
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de
sebmex
Joined: 2006-03-21
Posts: 79
Posted: Wed, 2006-09-27 14:16
Hi everyone
is this new module going to work with gallery 2.1 (1.1.0) ?
Should I take the code posted on this post, or some file from here :
My goal is to send a new mail to all users each time a commentary is posted (or at very leat to admin that will make a newsletter but I would like to have it fully automated).
Thank you very much
Sebmex
LFrank
Joined: 2005-02-19
Posts: 1023
Posted: Wed, 2006-10-04 08:44
sebmex,
with the latest SVN (or Nightly) of Gallery2.2, the notifiaction module works for comments, too (tested Oct. 04).
I would assume 2.2 as pre-requisite due to the core version needed.
Gallery version = 2.2-svn core 1.1.17
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8c
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de
oprativ
Joined: 2006-10-15
Posts: 14
Posted: Sun, 2006-10-22 20:11
Just a note to say "THANKS" to you guys for this useful snippet of code.
Jim
hey guys,
I got lost between all the codes here...
I want to receive an email notification when a new comment is submitted. is it possible? if it is, what is the code and where do I put it?
thanks
nishantrajvanshi
Joined: 2006-11-07
Posts: 22
Posted: Sun, 2006-11-26 08:24
Is there a downloadable/installable archive for this module. I'm running gallery 2.1.2. Thanks.
- Nishant
nishantrajvanshi
Joined: 2006-11-07
Posts: 22
Posted: Mon, 2006-11-27 06:29
Ok I downloaded individual files into a directory on my machine.
Then i copied the directory into the gallery/modules directory.
Now when i try to install the module from SiteAdmin, i see the following message
Status: Incompatible Module (Inactive)
Notification 0.9.0
Allow users to be notified of events by subscription.
Incompatible module!
Core API Required: 7.10 (available: 7.3)
Module API Required: 3.1 (available: 3.0)
I guess there's something to do with the version of gallery. I'm using:
Gallery version: 2.1.2
PHP version: 5.1.4 apache2handler
Webserver: Apache/2.0.52 (Win32) PHP/5.1.4
Database: mysql 5.0.22-community-nt
Toolkits: ImageMagick, Gd
Operating system: Windows NT AMITSW 5.0 build 2195
Browser: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7
- Nishant
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2006-11-27 18:52
that module only works with current svn / nightly snapshot
nishantrajvanshi
Joined: 2006-11-07
Posts: 22
Posted: Wed, 2006-11-29 11:09
Thanks mindless. Is there a way i can modify it partially to get it working with my system.
If yes, what needs to be modified?
- Nishant
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2006-11-29 18:25
yes, you can upgrade to current svn or nightly snapshot
nishantrajvanshi
Joined: 2006-11-07
Posts: 22
Posted: Sat, 2006-12-09 17:19
I downloaded the SVN version and installed the notification module. I selected "watch" for one of the albums.
But now when i add any photo or post comment to the watched album, the process does not complete and i get a blank page after submit. However, i do get an email saying that the photo was uploaded or a comment was posted. But no photo/comment is added to the album. How do i get rid of this.
Second Question: If i want to modify this module to work with Gallery 2.1.2, what changes should i consider in the code?
- Nishant
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2006-12-09 23:30
the module isn't really complete, not sure what might be wrong.
it also isn't worth trying to make it work with 2.1.x, just use 2.2.
nishantrajvanshi
Joined: 2006-11-07
Posts: 22
Posted: Wed, 2006-12-27 11:59
I'm trying to work with the notification module on G2.2 SVN version. But there's a small problem that i'd like to fix. When I try to "Watch" an album, i get a available notification methods list (which is email only as of now) along with the option to subscribe to the email method on New Item . i.e
"Get notified any time a new item (album, photo, etc) is added" with a checkbox to subscribe.
However, when i try the same thing for a Photo Item, I get only the method list
I don't get the option to subscribe to the email method on "New Item"
What my be wrong and what do i need to fix in the code?
Also, when can we see a final release of the module?
Thanks.
- Nishant
undoIT
Joined: 2006-10-30
Posts: 23
Posted: Sat, 2007-02-03 01:28
This is an excellent hack. Thanks so much. Exactly what I was looking for!
Does anyone have a working version with gallery 2.2 or later ?
djpumpkin
Joined: 2006-12-06
Posts: 135
Posted: Sun, 2007-11-04 00:37
I'm getting the same problem as nishantrajvanshi
Quote:
When I try to "Watch" an album, i get a available notification methods list (which is email only as of now) along with the option to subscribe to the email method on New Item . i.e
"Get notified any time a new item (album, photo, etc) is added" with a checkbox to subscribe.
However, when i try the same thing for a Photo Item, I get only the method list
I don't get the option to subscribe to the email method on "New Item"
Would be great if this module worked with gallery 2.2.3
talmdal
Joined: 2006-12-06
Posts: 358
Posted: Sun, 2007-11-04 01:19
If you upgrade to the current svn (R2.3) or nightly snapshot, the new improved version of notifications is available.
djbis
Joined: 2004-02-25
Posts: 64
Posted: Wed, 2007-12-05 09:13
Its more than two years later and I am looking for a way to be updated via email on Gallery 2 when new comments are added. I seem to get a good amount of spam on them and would like to monitor the comments so I can weed stuff out as it comes in.
If the code edit listed above is the only way out, which file do I have to edit? AddComment.inc?
And finally, what does Lfrank mean by: "don't forget to protect the "AddComment.inc" against CVS updates"
Akismet spam filter is enabled and the notification module has been rewritten and integrated into the Gallery2 base
arirea
Joined: 2008-03-09
Posts: 20
Posted: Sun, 2008-03-09 19:24
I'm a new Gallery2 user. I was about to ask for the email notification feature. Great to see that it is coming... I hope we will have a new release including this soon then
Akismet spam filter is enabled and the notification module has been rewritten and integrated into the Gallery2 base
I am not sure what this means. How can I get this to work? Is it an update? A patch?
talmdal
Joined: 2006-12-06
Posts: 358
Posted: Mon, 2008-03-10 01:46
Its part of Gallery R2.3 which is under development. The current generally available version is R2.2.4. If you want to use is version you have to get from SVN (instructions at the link in your post) or get a nightly version at one of the links mentioned on the http://codex.gallery2.org/Downloads page
berkshirefringe
Joined: 2008-06-29
Posts: 1
Posted: Sun, 2008-06-29 05:04
I'm actually trying to use Gallery as a "online silent auction" tool for a nonprofit. http://berkshirefringegala.peterwise.net
Any way to notify either all of the users who have commented on an individual item, or just the most recent commenter (not the current user). I'm using the comments module as a rudimentary "bidding" system, and I want people to be automatically notified when they have been "outbid" (i.e. another comment added) on a particular item.
Seems like this would be possible with some of the code on this thread. Is there a variation on this
Quote:
list ($ret, $user) = GalleryCoreApi::loadEntitiesById($gallery->getActiveUserId());
that would do the trick?
Again, it's not the active user or the item owner i'm interested in pulling up, but either the most recent item commenter or all item commenters.
Any help would be much appreciated.
Thanks!
talmdal
Joined: 2006-12-06
Posts: 358
Posted: Sun, 2008-06-29 07:23
If you are using the R2.3 version (i.e from subversion) you can look at the notification module and when someone adds a comment, they could be subscribed to new comment notification module.
If you are not, there might be the original notifications module that you could download from the community repository. http://www.timalmdal.com
mrmatt68
Joined: 2008-01-24
Posts: 10
Posted: Fri, 2008-08-01 19:14
Hi,
I have added the following code to addcomment.inc and it works Great!! Thank you for posting the code.
* added eMail Notification based on MRiedl's modification */
list ($ret, $item) = GalleryCoreApi::loadEntitiesById($itemId);
if ($ret) {
return array($ret->wrap(__FILE__, __LINE__), null);
}
list ($ret, $owner) = GalleryCoreApi::loadEntitiesById($item->getOwnerId());
if ($ret) {
return array($ret->wrap(__FILE__, __LINE__), null);
}
$ownerName = $owner->getFullName();
$ownerEMail = $owner->getEmail();
list ($ret, $user) = GalleryCoreApi::loadEntitiesById($gallery->getActiveUserId());
if ($ret) {
return array($ret->wrap(__FILE__, __LINE__), null);
}
$userName = $user->getFullName();
I am curiuos now if a button could be added in the comment form check here if you wish to receive email when a new comment is added and then everyone that is subscribed can then get an email too instead of just me and the owner?
Thanks,
Matt
hobbystern
Joined: 2008-03-15
Posts: 38
Posted: Thu, 2008-10-09 07:34
Hi Everyone,
is there a way to add the existing feature of notification module (greatly working - but the user must manually subscribe) and let it work with a modified jenspermissions?
Jens Permissions can take the action and do something with the rights of the uploader.
As many posts above i need a automatically notification which can be turned off - manually - if not it writes an email anytime a new comment added - and again : Only for the uploader and anyone which writes a comment on this item.
Its seems to be a little tricky...even while the uploader cant turn off the notification without a clean implementation in the notification module.
Thanks much for the Gallery2 Project - my donation is happily done.
Regards,
Stefan
singel
Joined: 2008-06-10
Posts: 9
Posted: Wed, 2009-04-22 17:38
Hi there
I also try to run a non-profit private auction tool. But I can't get the notification to all the users working. Did you ever get a solution for your 'problem' If so, can you explain to me (I'm a complete newbe in programming)
i have done the job with Jens Permissions, but its not the "whole solution". Do you checked if the feature is now not build in ? I have mentioned this would be one of the goals for g3...
Regards! Stefan
Working in my spare time for the FA-Digital-Project.
Using Gallery2-SVN Version on a Dedicated Server
Using PphpBB3 and MediaWiki with Memcache and customized features for a happy user.
angellove
Joined: 2010-06-04
Posts: 1
Posted: Fri, 2010-06-04 14:50
hello. can anyone help me on this??
The system should notify the customer of new vehicles in the showroom regularly via his email. The customer should also be able to make car loan application and duty free application more easily via this online system.
Posts: 43
Thank you LFrank and thank you mindless!! It works!!!! I'll tell you what I did so others may learn from my stupidity.
First mistake: Once I found the right file, I was copying ALL the code from the grey box above into the AddComments.inc file. I am so unfamiliar with php that I couldn't bring myself to look at the code to see what I was doing. This was giving me duplicates of some code and an error message.
Second mistake: Even though I was running an older version of Gallery, I inserted code that was made for the newer version. I thought it was close enough so what the hell.
Third mistake: I upgraded my version of Gallery but since I had made modifications to the old AddComment.inc file (and they looked close enough to me) I just copied over my old AddComment.inc. mindless pointed out that $red->isError() is 2.0.x code. But I had already overwritten my new AddComment.inc file thinking it was the same as the old.
Fourth mistake: Making changes to an original of a file, not the copy.
I was afraid if I uninstalled the module and then reinstalled it, all my old comments would be lost. So I went to the DL page, downloaded the entire module, found the AddComment.inc file and uploaded only that. And it works like a charm.
Thank you to mindless and especially LFrank for your incredible patience with my mind blowing ignorance. I couldn't have done it without you.
Posts: 1023
You're welcome - I started the same way
Gallery version = 2.2-svn core 1.1.16
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8c
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de
Posts: 22
Great thread, thanks! I just added in and tested the code, and it seems to work fine.
One question, though - it only detects new comments, not new images, right? I'm more concerned about what people post to the site (e.g. inappropriate images), not so much the comments (I actually had comments disabled, and only enabled them to test this out).
Is there any way to tweak this to easily catch the "new image added" events instead? (Sorry, I'm not versed in php, so the answer doesn't really jump out at me from looking at the code).
Thanks!
Mark
Posts: 1023
markspiller,
for the new image, you might try the new notification module - the watch for new images is already running perfectly.
It's in the SVN-trunk gallery-contrib.
Gallery version = 2.2-svn core 1.1.16
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8c
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de
Posts: 1023
Captenaj, the "ret" was changed to the new format (without the wrap...) - did you miss to attach your file, just wanted to look into it ...
Gallery version = 2.2-svn core 1.1.16
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8c
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de
Posts: 22
LFrank,
Thanks for the tip - is this the module that you mean?
http://svn.sourceforge.net/viewvc/gallery/trunk/gallery2/modules/newitems/
Would you suggest trying to grab just that module (I'm not sure how to do that, or if it will work alone?). Or would it make more sense to simply update to a build that includes that? (I've always used the packaged builds, so I'm not sure if it is wise to grab individual pieces like that?)
Thanks!
Mark
Posts: 1023
Mark, the module I think is http://svn.sourceforge.net/viewvc/gallery-contrib/trunk/gallery2/modules/notification/
What version of G2 you're running - I don't know if it runs < 2.2
Gallery version = 2.2-svn core 1.1.16
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8c
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de
Posts: 22
Thanks - my version is 2.1.2
I'd consider moving up to the development version, though, for this feature, if it's relatively stable. (Do you know how far along 2.2 is?)
Thanks!
Mark
Gallery version = 2.1.2 core 1.1.0.2
PHP version = 4.4.4 cgi
Webserver = Apache/1.3.37 (Unix)
Database = mysql 4.0.27-standard-log, lock.system=flock
Toolkits = Exif, ImageMagick, SquareThumb, Thumbnail, NetPBM
Acceleration = none, none
Operating system = Linux infong 2.4 #1 SMP Thu Jan 13 08:59:31 CET 2005 i686 unknown
Posts: 1023
Mark, feature freeze is at the doorsteps, I'm expecting a first release candidate very soon ... I had no issues with 2.2 from the very early start.
Gallery version = 2.2-svn core 1.1.16
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8c
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de
Posts: 79
Hi everyone
is this new module going to work with gallery 2.1 (1.1.0) ?
Should I take the code posted on this post, or some file from here :
http://svn.sourceforge.net/viewvc/gallery-contrib/trunk/gallery2/modules/notification/
Thank you for the explanation.
My goal is to send a new mail to all users each time a commentary is posted (or at very leat to admin that will make a newsletter but I would like to have it fully automated).
Thank you very much
Sebmex
Posts: 1023
sebmex,
with the latest SVN (or Nightly) of Gallery2.2, the notifiaction module works for comments, too (tested Oct. 04).
I would assume 2.2 as pre-requisite due to the core version needed.
Gallery version = 2.2-svn core 1.1.17
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Win32) DAV/2 PHP/5.1.6 mod_ssl/2.2.3 OpenSSL/0.9.8c
Database = mysql 5.1.11 beta-log,
Theme=PGlightbox,
Gallery-URL=http://lf-photodesign.de
Posts: 14
Just a note to say "THANKS" to you guys for this useful snippet of code.
Jim
-----------------------------------------
Gallery version = 2.1.2 core 1.1.0.2
PHP version = 5.1.6 apache
Webserver = Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/5.1.6 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7f
Database = mysql 4.1.21-standard, lock.system=flock
Toolkits = ArchiveUpload, Exif, Getid3, NetPBM, Thumbnail, Gd, ImageMagick
Acceleration = none, none
Operating system = Linux h45280.safesecureweb.com 2.6.9-022stab078.21-enterprise #1 SMP Fri Sep 8 22:46:58 MSD 2006 i686
Default theme = carbon
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7
Posts: 15
hey guys,
I got lost between all the codes here...
I want to receive an email notification when a new comment is submitted. is it possible? if it is, what is the code and where do I put it?
thanks
Posts: 22
Is there a downloadable/installable archive for this module. I'm running gallery 2.1.2. Thanks.
- Nishant
Posts: 22
Ok I downloaded individual files into a directory on my machine.
Then i copied the directory into the gallery/modules directory.
Now when i try to install the module from SiteAdmin, i see the following message
Status: Incompatible Module (Inactive)
Notification 0.9.0
Allow users to be notified of events by subscription.
Incompatible module!
Core API Required: 7.10 (available: 7.3)
Module API Required: 3.1 (available: 3.0)
I guess there's something to do with the version of gallery. I'm using:
Gallery version: 2.1.2
PHP version: 5.1.4 apache2handler
Webserver: Apache/2.0.52 (Win32) PHP/5.1.4
Database: mysql 5.0.22-community-nt
Toolkits: ImageMagick, Gd
Operating system: Windows NT AMITSW 5.0 build 2195
Browser: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7
- Nishant
Posts: 8601
that module only works with current svn / nightly snapshot
Posts: 22
Thanks mindless. Is there a way i can modify it partially to get it working with my system.
If yes, what needs to be modified?
- Nishant
Posts: 8601
yes, you can upgrade to current svn or nightly snapshot
Posts: 22
I downloaded the SVN version and installed the notification module. I selected "watch" for one of the albums.
But now when i add any photo or post comment to the watched album, the process does not complete and i get a blank page after submit. However, i do get an email saying that the photo was uploaded or a comment was posted. But no photo/comment is added to the album. How do i get rid of this.
Second Question: If i want to modify this module to work with Gallery 2.1.2, what changes should i consider in the code?
- Nishant
Posts: 8601
the module isn't really complete, not sure what might be wrong.
it also isn't worth trying to make it work with 2.1.x, just use 2.2.
Posts: 22
I'm trying to work with the notification module on G2.2 SVN version. But there's a small problem that i'd like to fix. When I try to "Watch" an album, i get a available notification methods list (which is email only as of now) along with the option to subscribe to the email method on New Item . i.e
"Get notified any time a new item (album, photo, etc) is added" with a checkbox to subscribe.
However, when i try the same thing for a Photo Item, I get only the method list
I don't get the option to subscribe to the email method on "New Item"
What my be wrong and what do i need to fix in the code?
Also, when can we see a final release of the module?
Thanks.
- Nishant
Posts: 23
This is an excellent hack. Thanks so much. Exactly what I was looking for!
-----------------------------------
http://themebot.com
Posts: 128
Does anyone have a working version with gallery 2.2 or later ?
Posts: 135
I'm getting the same problem as nishantrajvanshi
Would be great if this module worked with gallery 2.2.3
Posts: 358
If you upgrade to the current svn (R2.3) or nightly snapshot, the new improved version of notifications is available.
Posts: 64
Its more than two years later and I am looking for a way to be updated via email on Gallery 2 when new comments are added. I seem to get a good amount of spam on them and would like to monitor the comments so I can weed stuff out as it comes in.
If the code edit listed above is the only way out, which file do I have to edit? AddComment.inc?
And finally, what does Lfrank mean by: "don't forget to protect the "AddComment.inc" against CVS updates"
Thank you!
Posts: 358
There are a couple of features that are available in the latest version of Gallery2 available from svn. http://codex.gallery2.org/Gallery:Using_Subversion
Akismet spam filter is enabled and the notification module has been rewritten and integrated into the Gallery2 base
Posts: 20
I'm a new Gallery2 user. I was about to ask for the email notification feature. Great to see that it is coming... I hope we will have a new release including this soon then
cheers
Posts: 64
I am not sure what this means. How can I get this to work? Is it an update? A patch?
Posts: 358
Its part of Gallery R2.3 which is under development. The current generally available version is R2.2.4. If you want to use is version you have to get from SVN (instructions at the link in your post) or get a nightly version at one of the links mentioned on the http://codex.gallery2.org/Downloads page
Posts: 1
I'm actually trying to use Gallery as a "online silent auction" tool for a nonprofit.
http://berkshirefringegala.peterwise.net
Any way to notify either all of the users who have commented on an individual item, or just the most recent commenter (not the current user). I'm using the comments module as a rudimentary "bidding" system, and I want people to be automatically notified when they have been "outbid" (i.e. another comment added) on a particular item.
Seems like this would be possible with some of the code on this thread. Is there a variation on this
that would do the trick?
Again, it's not the active user or the item owner i'm interested in pulling up, but either the most recent item commenter or all item commenters.
Any help would be much appreciated.
Thanks!
Posts: 358
If you are using the R2.3 version (i.e from subversion) you can look at the notification module and when someone adds a comment, they could be subscribed to new comment notification module.
If you are not, there might be the original notifications module that you could download from the community repository.
http://www.timalmdal.com
Posts: 10
Hi,
I have added the following code to addcomment.inc and it works Great!! Thank you for posting the code.
* added eMail Notification based on MRiedl's modification */
list ($ret, $item) = GalleryCoreApi::loadEntitiesById($itemId);
if ($ret) {
return array($ret->wrap(__FILE__, __LINE__), null);
}
list ($ret, $owner) = GalleryCoreApi::loadEntitiesById($item->getOwnerId());
if ($ret) {
return array($ret->wrap(__FILE__, __LINE__), null);
}
$ownerName = $owner->getFullName();
$ownerEMail = $owner->getEmail();
list ($ret, $user) = GalleryCoreApi::loadEntitiesById($gallery->getActiveUserId());
if ($ret) {
return array($ret->wrap(__FILE__, __LINE__), null);
}
$userName = $user->getFullName();
$emailSubj = 'GALLERY2 - New picture comment added';
$emailContent = 'Greetings '.$ownerName.'!'."\n\n".
'New comment from user: '.$userName." (".GalleryUtilities::getRemoteHostAddress().") \n".
'Subject: '.$form['subject']."\n".
'Comment: '.$form['comment']."\n".
'URL: http://www.gallery2.clearvuecyclones.com/main.php?g2_view=core.ShowItem&g2_itemId='.$itemId."\n\n".
'[this is an automatic mail, generated by Gallery !]';
$from = 'admin@clearvuecyclones.com';
mail("admin@clearvuecyclones.com",$emailSubj,$emailContent, "From: $from\nX-Mailer: PHP/ . $phpversion()", "-f $from");
mail("$ownerEMail",$emailSubj,$emailContent, "From: $from\nX-Mailer: PHP/ . $phpversion()", "-f $from");
I am curiuos now if a button could be added in the comment form check here if you wish to receive email when a new comment is added and then everyone that is subscribed can then get an email too instead of just me and the owner?
Thanks,
Matt
Posts: 38
Hi Everyone,
is there a way to add the existing feature of notification module (greatly working - but the user must manually subscribe) and let it work with a modified jenspermissions?
Jens Permissions can take the action and do something with the rights of the uploader.
As many posts above i need a automatically notification which can be turned off - manually - if not it writes an email anytime a new comment added - and again : Only for the uploader and anyone which writes a comment on this item.
Its seems to be a little tricky...even while the uploader cant turn off the notification without a clean implementation in the notification module.
Thanks much for the Gallery2 Project - my donation is happily done.
Regards,
Stefan
Posts: 9
Hi there
I also try to run a non-profit private auction tool. But I can't get the notification to all the users working. Did you ever get a solution for your 'problem' If so, can you explain to me (I'm a complete newbe in programming)
Thx
Herman
Gallery versie = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Thema 2.6, Embed 1.5
PHP versie = 5.2.3-1ubuntu6.3 cgi-fcgi
Web server = Apache/2.2.4 (Ubuntu) mod_fastcgi/2.4.2 mod_ssl/2.2.4 OpenSSL/0.9.8e
Database = mysqli 5.0.38-Ubuntu_0ubuntu1.4-log, lock.system=flock
Toolkits = Ffmpeg, LinkItemToolkit, Gd
Posts: 38
Hi Herman,
i have done the job with Jens Permissions, but its not the "whole solution". Do you checked if the feature is now not build in ? I have mentioned this would be one of the goals for g3...
Regards! Stefan
Working in my spare time for the FA-Digital-Project.
Using Gallery2-SVN Version on a Dedicated Server
Using PphpBB3 and MediaWiki with Memcache and customized features for a happy user.
Posts: 1
hello. can anyone help me on this??
The system should notify the customer of new vehicles in the showroom regularly via his email. The customer should also be able to make car loan application and duty free application more easily via this online system.
thank you