Hi,
Congrats on a great product and website (I use Gallery on my site and it is fantastic!).
I'd really like to have the same sort of functionality that the gallery website has for forum subscriptions though. At the moment I'm using the most recent version of the subscriptions.module on drupal.org but it doesn't really do what I want.
Is there anywhere I can download the Gallery version of subscriptions.module? Or can someone attach it here, or email it to me? It's pretty small (about 20k?) but would make my life so much easier.
Thanks!!
G.
Posts: 8601
Most of the code related to this is available at http://drupal.org/node/32590
Posts: 4
Yes, I've found that node before and installed the subscriptions_47.module file from that page.
But although it gives me email notifications, the *content* of the forum topic doesn't get sent like it does on the GMC version.
So I guess I just need a pointer for how to extract the content of the posted forum topic so I can include it in the email.
Cheers, G
Posts: 2258
FYI I updated http://codex.gallery2.org/index.php/GMC:Website to mention this. I'll continue to do so with anything else that comes up on the topic.
--
http://ckdake.com/
If you found my help useful, please consider donating to Gallery.
Posts: 8601
I posted more recent code in the drupal.org node.. this is up to date with DRUPAL-4-7 branch of subscriptions CVS.
In your theme you can add {theme}_subscriptions_emaildata and {theme}_subscriptions_email functions to customize the email content any way you like. Look at existing drupal code to see how to load nodes and render the body/content, etc.
Posts: 4
Ok thanks for that. For some reason the current cvs version of subscriptions isn't working for me (ie. notifications of new topics don't arrive) and subscriptions_15.module seems to have the same issue. Your original patch (subscriptions_47) works though (ie. I receive all the notifications, even though they don't contain as much info as I'd like). I guess I will need to become more familiar with Drupal code before I can work out what's going wrong.
It's a pity for newcomers like me that there isn't more documentation of Drupal for developers. There doesn't seem to be much in the handbook other than the bare API plus a couple of short introductions. Anyway, I guess I'll have to learn it from source.
thanks for your help! G
ps. any idea why subscriptions_47 works for me but the other versions don't?
Posts: 8601
newer subscriptions.module versions have a setting to send email on cron runs.. maybe you have that selected, but don't have a cron job? check the module settings...
Posts: 4
Unfortunately that's not it. I don't have the cron subscription selection checked and my cron is activated and working fine. The mail notification isn't making it into the log either, so it appears the system doesn't even get around to trying to send the mail. I guess I'll try inserting some watchdog messages to see what's happening (unless there's an easier way to debug?).
Cheers, G
Posts: 8601
current version of subscriptions.module for drupal 5.x supports themable email content. i think there's also a user selectable option for including the topic teaser in the email.
anyway, the particular content for gmc subscription emails is part of our custom theme which isn't public (http://codex.gallery2.org/GMC:Website). but you should be able to add functions in your own theme to generate the emails any way you like using the given node object.