Email Digests

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
48
59%
Very Good
17
21%
Good
9
11%
Fair
2
2%
Poor
6
7%
 
Total votes: 82

User avatar
MarkDHamill
Registered User
Posts: 4018
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Email Digests

Post by MarkDHamill »

Another bug reported by Sylvain Bourdon. Both this bug and the last have been corrected in the digests 1.0.17 archive.

This is in admin_digests_add.php. Replace line 303 with this:

Code: Select all

					if (htmlspecialchars($HTTP_POST_VARS[$send_hour]) == 'R')
					{
						$send_hour = rand(0,23);
					}
					else
					{
						$send_hour = intval($HTTP_POST_VARS[$send_hour])+$offset;
						$send_hour = ($send_hour < 0) ? $send_hour + 24 : $send_hour;
						$send_hour = ($send_hour >= 24) ? $send_hour - 24 : $send_hour; 	
					}
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

eteeple
Registered User
Posts: 5
Joined: Fri Aug 20, 2004 8:01 pm

cron issue

Post by eteeple »

I'm getting excited because I believe I have digests nearly working. I can send digests by manually invoking mail_digests.php in my browser, but I can't get cron to do it.

I have gone over the batch scheduling many, many times. I finally got digests to work manually by changing the root path for php (the last option in the new admin area) from ./ to the absolute path to my forum.

So, digests are working manually, but I checked the email of the last report (i.e. attempted cron job), and it says this:

Code: Select all

Status: 404
X-Powered-By: PHP/4.4.4
Content-type: text/html

No input file specified.
Any idea what this could be or where I should look?

What I have in the cron job place is this:

Code: Select all

/usr/bin/php /home/username/public_html/website.net/forum/mail_digests.php
I have it set to run every hour.

I tried using curl, but, while it would tell me where curl was (using the handy whereiscron.php), when the cron job was set to curl, in my email I got the following: /bin/sh:

Code: Select all

/usr/bin/curl: Permission denied

User avatar
MarkDHamill
Registered User
Posts: 4018
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Email Digests

Post by MarkDHamill »

I assume you are using the latest version 1.0.17.

You may have to code something like this right after line 30 in mail_digests.php:

Code: Select all

$phpbb_root_path = '/home/username/public_html/website.net/forum/';
This way the include files can be found when run from a batch mode.

If that doesn't work try petitioning your web host to give you access to curl. It tends to be much easier to set up.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
MarkDHamill
Registered User
Posts: 4018
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Email Digests

Post by MarkDHamill »

The Digest Installation page somehow got corrupted. The page has been restored by my web host.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

ogimaa
Registered User
Posts: 16
Joined: Sat Mar 10, 2007 10:30 am

Re: Email Digests

Post by ogimaa »

Updated to newest version.

Several of the forums are now showing as "Usergroup Members Only." I do not have any Usergroups.
Because of this the majority of my users can not receive digests from Forums they otherwise have access to.

Example Forum permissions:
View - Reg; Read - Private; Post - Private;

User permissions are set to allow, but they do not have the option to receive the digest for this forum when they click on Subscriptions.

User avatar
MarkDHamill
Registered User
Posts: 4018
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Email Digests

Post by MarkDHamill »

The way phpBB works, if the read permission for a forum is private, you must belong to a user group to read posts in that forum. The message may be better phrased because you may have explicitly granted access to read a forum in the ACP, as opposed to using user groups. If the message bothers you change this value in /language/lang_english/lang_digests.php on line 191:

Code: Select all

$lang['digest_auth_acl_text']='<i>(Usergroup Members Only)</i>';
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
MarkDHamill
Registered User
Posts: 4018
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Email Digests

Post by MarkDHamill »

I updated 1.0.17 archive to:

- Hide the phpBB root path field in admin_digests_add.php. What I have learned is that it is really not necessary. Those few instances where the phpBB root path must be used, it will have to be hardcoded into mail_digests.php
- Changed the language variable that suggests someone belonged to a user group when their permissions might be set explicitly.

Also updated the installation page to give better guidance on those cases where you have to hardcode the absolute path to phpBB in mail_digests.php.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

ogimaa
Registered User
Posts: 16
Joined: Sat Mar 10, 2007 10:30 am

Re: Email Digests

Post by ogimaa »

MarkDHamill wrote: The way phpBB works, if the read permission for a forum is private, you must belong to a user group to read posts in that forum. The message may be better phrased because you may have explicitly granted access to read a forum in the ACP, as opposed to using user groups. If the message bothers you change this value in /language/lang_english/lang_digests.php on line 191:

Code: Select all

$lang['digest_auth_acl_text']='<i>(Usergroup Members Only)</i>';


Do you mean that Email Digests works that way? - phpBB dboesn't. None of my users belong to a group and CAN read posts in forums that are set to private; I just have their user permissions set to ALLOW for the specific forums that I want them to have access to.

It's not the message that bothers me. I am just curious if I am going to have to go through and set up User Groups in order to use the new Email Digests.

Thanks for the quick responses!

User avatar
MarkDHamill
Registered User
Posts: 4018
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Email Digests

Post by MarkDHamill »

No, that is not necessary. You can customize the message and in fact in the corrected archive I created today I did just that.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

floppyarms
Registered User
Posts: 13
Joined: Tue Mar 20, 2007 11:13 am

Re: Email Digests

Post by floppyarms »

Not an urgent request, but the script works beautifully, however when the digest is received the links are formatted wrong. There is no trailing '/' after the domain...

IE the email links to: http://bre-midlands.netnetworking/viewforum.php?f=21
instead of to: http://bre-midlands.net/networking/viewforum.php?f=21

How to i make this simple change? is it a language file?

Tom

sbourdon
Registered User
Posts: 174
Joined: Sat Nov 13, 2004 6:29 pm

Re: Email Digests

Post by sbourdon »

Nope! That's in the ACP, under Digests Configuration; the first line (Forum URL) clearly states not to forget to leave the trailing slash at the end... ;)

User avatar
MarkDHamill
Registered User
Posts: 4018
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Email Digests

Post by MarkDHamill »

As of yesterday, I removed that logic from mail_digests.php. Now there is no field in Digests Configuration to enter a phpBB root path. Instead, now there is a $phpbb_root_path variable again in mail_digests.php which defaults to ./. If necessary, line 36 can be changed to use the absolute path on the server, as seems to be required for a significant minority of users.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

ogimaa
Registered User
Posts: 16
Joined: Sat Mar 10, 2007 10:30 am

Re: Email Digests

Post by ogimaa »

I will try to be more clear. The change in the lang_digests.php to $lang['digest_auth_acl_text']='<i>(Special Access Only)</i>'; does not fix the problem that I am having.

The problem is not the language. Users are not seeing all of the Forums they have access to when they attempt to subscribe to digests! The Forums in question are set as described above - reg, private, private.

Each user has been granted specific access to the appropriate forums, and are able to read and post to them! However, it appears as though Email Digests requires them to belong to a Usergroup in order for them to subscribe to the digests for their forums.

To test this, I created one usergroup and granted that group access to a Forum, and all users that I assigned to the group were then able to subscribe to the digest. All the users already had access to the Forum through permissions, but they could not see the Forum listed to receive digests for it until they were added to the Usergroup.

User avatar
MarkDHamill
Registered User
Posts: 4018
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Email Digests

Post by MarkDHamill »

ogimma,

You are right. I need to change the logic. Believe it or not this mod has been out 4 years and you are the first to notice! I never noticed it before.

Give me a day or so to figure out how to incorporate the logic. And thanks for drawing it to my attention.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
MarkDHamill
Registered User
Posts: 4018
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Email Digests

Post by MarkDHamill »

ogimma,

It looks like the change is pretty simple.

Line 318 in digests.php is:

Code: Select all

			a.forum_id = f.forum_id AND f.cat_id = c.cat_id AND ug.group_id = g.group_id AND g.group_single_user <> 1';
and should be

Code: Select all

			a.forum_id = f.forum_id AND f.cat_id = c.cat_id AND ug.group_id = g.group_id';
Line 210 in mail_digests.php is:

Code: Select all

		WHERE ug.group_id = g.group_id AND g.group_single_user <> 1 AND ug.user_id = ' . $row['user_id']
and should be

Code: Select all

		WHERE ug.group_id = g.group_id AND ug.user_id = ' . $row['user_id']
I got a few other changes to make to the archive. I'll run them by my favorite tester first and if they look stable I will include these changes in the archive.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

Post Reply

Return to “[2.0.x] MOD Database Releases”