Email notification of new comments
Captenaj
Joined: 2006-03-27
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. |
|
LFrank
Joined: 2005-02-19
Posts: 1023 |
![]() |
You're welcome - I started the same way Gallery version = 2.2-svn core 1.1.16 |
|
markspiller
Joined: 2006-09-20
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! |
|
LFrank
Joined: 2005-02-19
Posts: 1023 |
![]() |
markspiller, Gallery version = 2.2-svn core 1.1.16 |
|
LFrank
Joined: 2005-02-19
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 |
|
markspiller
Joined: 2006-09-20
Posts: 22 |
![]() |
LFrank, Thanks for the tip - is this the module that you mean? 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! |
|
LFrank
Joined: 2005-02-19
Posts: 1023 |
![]() |
Mark, the module I think is http://svn.sourceforge.net/viewvc/gallery-contrib/trunk/gallery2/modules/notification/ Gallery version = 2.2-svn core 1.1.16 |
|
markspiller
Joined: 2006-09-20
Posts: 22 |
![]() |
Thanks - my version is 2.1.2 Thanks! Gallery version = 2.1.2 core 1.1.0.2 |
|
LFrank
Joined: 2005-02-19
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 |
|
sebmex
Joined: 2006-03-21
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 |
|
LFrank
Joined: 2005-02-19
Posts: 1023 |
![]() |
sebmex, with the latest SVN (or Nightly) of Gallery2.2, the notifiaction module works for comments, too (tested Oct. 04). Gallery version = 2.2-svn core 1.1.17 |
|
oprativ
![]()
Joined: 2006-10-15
Posts: 14 |
![]() |
Just a note to say "THANKS" to you guys for this useful snippet of code. ----------------------------------------- |
|
yauly
Joined: 2006-10-24
Posts: 15 |
![]() |
hey guys, |
|
nishantrajvanshi
Joined: 2006-11-07
Posts: 22 |
![]() |
Is there a downloadable/installable archive for this module. I'm running gallery 2.1.2. Thanks. |
|
nishantrajvanshi
Joined: 2006-11-07
Posts: 22 |
![]() |
Ok I downloaded individual files into a directory on my machine. Status: Incompatible Module (Inactive) I guess there's something to do with the version of gallery. I'm using: Gallery version: 2.1.2 - Nishant |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
that module only works with current svn / nightly snapshot |
|
nishantrajvanshi
Joined: 2006-11-07
Posts: 22 |
![]() |
Thanks mindless. Is there a way i can modify it partially to get it working with my system. |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
yes, you can upgrade to current svn or nightly snapshot |
|
nishantrajvanshi
Joined: 2006-11-07
Posts: 22 |
![]() |
I downloaded the SVN version and installed the notification module. I selected "watch" for one of the albums. 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 |
![]() |
the module isn't really complete, not sure what might be wrong. |
|
nishantrajvanshi
Joined: 2006-11-07
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 However, when i try the same thing for a Photo Item, I get only the method list 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 |
![]() |
This is an excellent hack. Thanks so much. Exactly what I was looking for! ----------------------------------- |
|
psygarden
Joined: 2003-03-25
Posts: 128 |
![]() |
Does anyone have a working version with gallery 2.2 or later ? |
|
djpumpkin
Joined: 2006-12-06
Posts: 135 |
![]() |
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 Would be great if this module worked with gallery 2.2.3 |
|
talmdal
Joined: 2006-12-06
Posts: 358 |
![]() |
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 |
![]() |
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! |
|
talmdal
Joined: 2006-12-06
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 |
|
arirea
Joined: 2008-03-09
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 |
|
djbis
Joined: 2004-02-25
Posts: 64 |
![]() |
talmdal wrote:
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 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 |
![]() |
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 |
![]() |
I'm actually trying to use Gallery as a "online silent auction" tool for a nonprofit. 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 |
![]() |
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. |
|
mrmatt68
Joined: 2008-01-24
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, $owner) = GalleryCoreApi::loadEntitiesById($item->getOwnerId()); list ($ret, $user) = GalleryCoreApi::loadEntitiesById($gallery->getActiveUserId()); $emailSubj = 'GALLERY2 - New picture comment added'; 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 |
![]() |
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 |
![]() |
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 |
|
hobbystern
Joined: 2008-03-15
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 |
|
angellove
Joined: 2010-06-04
Posts: 1 |
![]() |
hello. can anyone help me on this?? thank you |
|