forum subscriptions module on GMC

goosey

Joined: 2006-11-23
Posts: 4
Posted: Fri, 2006-11-24 07:18

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.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2006-11-26 06:25

Most of the code related to this is available at http://drupal.org/node/32590

 
goosey

Joined: 2006-11-23
Posts: 4
Posted: Sun, 2006-11-26 10:04

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

 
ckdake
ckdake's picture

Joined: 2004-02-18
Posts: 2258
Posted: Sun, 2006-11-26 16:06

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.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2006-11-26 22:32

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.

 
goosey

Joined: 2006-11-23
Posts: 4
Posted: Sun, 2006-11-26 23:18

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?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2006-11-27 18:18

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...

 
goosey

Joined: 2006-11-23
Posts: 4
Posted: Mon, 2006-11-27 23:23

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

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2007-03-08 21:16

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.