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

Rating:

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

Indemnity_83
Registered User
Posts: 152
Joined: Sat Apr 10, 2004 9:40 pm
Location: California, United States
Contact:

Post by Indemnity_83 » Thu Apr 15, 2004 4:07 pm

@tekguru

I'll dive into the query as soon as I can to try to find anything that isn't right. I noticed on another board of mine that when I made a forum MOD [Private] it didn't even show up in my list of forums to get digetsts from.

Not sure if the two items are linked, but it would at least appear that there is something not quite as intended in the query.
INDEMNITY
a legal exemption from liability for damages.
BLOG | DORMLIFE

Indemnity_83
Registered User
Posts: 152
Joined: Sat Apr 10, 2004 9:40 pm
Location: California, United States
Contact:

Post by Indemnity_83 » Thu Apr 15, 2004 4:14 pm

@masterdavid

What is the problem you observed with the links in the disclaimer? Granted your method is a little more in step with the way phpBB normaly works but logical difference stands out to me between the two.
INDEMNITY
a legal exemption from liability for damages.
BLOG | DORMLIFE

User avatar
tekguru
Registered User
Posts: 139
Joined: Thu Jul 03, 2003 1:33 pm

Post by tekguru » Thu Apr 15, 2004 4:26 pm

@Indemnity_83: My thanks for that as oviously I can't have the ordinary users accessign that forum. Glad to know that (in a way) that you have had similar problems, so resolution should not be that far off hopefully?

masterdavid
Registered User
Posts: 222
Joined: Tue Jul 08, 2003 1:26 pm

Post by masterdavid » Thu Apr 15, 2004 4:26 pm

it might be on how the variables are being parsed... and might affect not everyone. I actually separated the $lang variables and made a lang_digests.php file and include it in the language directory. Anyway, the $lang variables are being called first before the initialization of the other variables included in the original declaration. therefore, at the time the value is passed to the $lang variable, the other variables are still empty.

i think this is how phpbb normaly works. do check how the language variables are being assigned it the private message linked at the header.

Indemnity_83
Registered User
Posts: 152
Joined: Sat Apr 10, 2004 9:40 pm
Location: California, United States
Contact:

Post by Indemnity_83 » Thu Apr 15, 2004 4:30 pm

tekguru wrote: @Indemnity_83: My thanks for that as oviously I can't have the ordinary users accessign that forum. Glad to know that (in a way) that you have had similar problems, so resolution should not be that far off hopefully?


Can't give you a timeframe, but it'll be towards the top of my list.
INDEMNITY
a legal exemption from liability for damages.
BLOG | DORMLIFE

Indemnity_83
Registered User
Posts: 152
Joined: Sat Apr 10, 2004 9:40 pm
Location: California, United States
Contact:

Post by Indemnity_83 » Thu Apr 15, 2004 4:39 pm

masterdavid wrote: it might be on how the variables are being parsed... and might affect not everyone. I actually separated the $lang variables and made a lang_digests.php file and include it in the language directory. Anyway, the $lang variables are being called first before the initialization of the other variables included in the original declaration. therefore, at the time the value is passed to the $lang variable, the other variables are still empty.

i think this is how phpbb normaly works. do check how the language variables are being assigned it the private message linked at the header.


I see now, if you moved all the language items into a diffrent file, and included it before the constants, you wouldn't have some of the variables being initialized (like you said). I can't give you a reason why the language files are in with digests constants, better question for Mark. I assume it was to keep the number of files in the MOD down.

All of the items in digests_constants.php (except most of the language variables) will eventually be migrated to a table, and modified via an ACP panel so likely when I do that I'll make a lang_digests.php file to make translation into other languages easier. Because the ACP is not to far on my roadmap, I'm going to leave it as-is, I understand that sometimes it doesn't work propertly, but the solution has always been to hard-code the $siteURL. For now, that will stand as the solution.
INDEMNITY
a legal exemption from liability for damages.
BLOG | DORMLIFE

User avatar
tekguru
Registered User
Posts: 139
Joined: Thu Jul 03, 2003 1:33 pm

Post by tekguru » Thu Apr 15, 2004 4:46 pm

masterdavid wrote: I have observed that there is a problem with the links in the disclaimer portion of the mail. I changed it to something like this:

Code: Select all

$lang['digest_disclaimer_html'] = '\r\nThis digest is being sent to registered members of <a href="%s">%s</a> forums and only because you explicitly requested it. %s is completely commercial free. Your email address is never disclosed to outside parties. See our <a href="%sfaq.%s">FAQ</a> for more information on our privacy policies. You can change or delete your subscription by logging into %s from the <a href="%sdigests.%s">Digest Page</a>. (You must be logged in to change your digest settings.) If you have questions or feedback on the format of this digest please send it to the <a href="mailto:%s">%s Webmaster</a>.';

Code: Select all

'DISCLAIMER' => ($html) ? sprintf($lang['digest_disclaimer_html'], $siteURL, $board_config['sitename'], $board_config['sitename'], $siteURL, $phpEx, $board_config['sitename'], $siteURL, $phpEx, $board_config['board_email'], $board_config['sitename'])  : sprintf($lang['digest_disclaimer_text'], $board_config['sitename'], $board_config['sitename'], $board_config['sitename'], $board_config['board_email'])
Please take a look at this part.


David which part did you actually change to which here? Could you post the exact code which is to be replaced in which file and what it should be replaced with?

User avatar
tekguru
Registered User
Posts: 139
Joined: Thu Jul 03, 2003 1:33 pm

Post by tekguru » Thu Apr 15, 2004 4:48 pm

Indemnity_83 wrote: Can't give you a timeframe, but it'll be towards the top of my list.


Thanks, as I'll have to turn the digest off until this is resolved or the readership will be accessing data they should not be ;-)

masterdavid
Registered User
Posts: 222
Joined: Tue Jul 08, 2003 1:26 pm

Post by masterdavid » Thu Apr 15, 2004 5:25 pm

Tekguru

Sorry if I wasn't able to answer this in your e-mail :P

Anyway, it would be useless if I post the whole file here since, I have totally changed it to fit Integra nd Pseudocron as you might have known.

I think what you should only do is look for the 2 declarations of those variables and just change it to what i did use. Better search for

Code: Select all

$lang['digest_disclaimer_html'] = 
and

Code: Select all

'DISCLAIMER' => ($html)
and also, I forgot to add this change

Code: Select all

$lang['digest_disclaimer_text'] = '\r\nThis digest is being sent to registered members of %s forums and only because you explicitly requested it. %s is completely commercial free. Your email address is never disclosed to outside parties. See our FAQ for more information on our privacy policies. You can change or delete your subscription by logging into %s from the Digest Page. (You must be logged in to change your digest settings.) If you have questions or feedback on the format of this digest please send it to %s.';
Note: the posted codes are the changed lines.



Indemnity

If you will be moving the languages in a separate language file and going to make a page in the ACP for this, i think the way to go will be to use the sprintf function which is usually done with phpBB if part of the language variable is dynamic.

I just hope I can help in the development since I am thinking of features to make it more flexible. But I just have some other priority projects as of now.
Last edited by masterdavid on Thu Apr 15, 2004 5:30 pm, edited 1 time in total.

User avatar
tekguru
Registered User
Posts: 139
Joined: Thu Jul 03, 2003 1:33 pm

Post by tekguru » Thu Apr 15, 2004 5:28 pm

David so the parts you posted above are replacements for those already in there? Ah light dawns ;-[)

masterdavid
Registered User
Posts: 222
Joined: Tue Jul 08, 2003 1:26 pm

Post by masterdavid » Thu Apr 15, 2004 5:37 pm

tekguru wrote: David so the parts you posted above are replacements for those already in there? Ah light dawns ;-[)


Yes.. sorry for the confusion caused :P

Indemnity_83
Registered User
Posts: 152
Joined: Sat Apr 10, 2004 9:40 pm
Location: California, United States
Contact:

Post by Indemnity_83 » Thu Apr 15, 2004 5:50 pm

@masterdavid
I appreaciate any help I can get. I will use the sprintf when I get to that point. However one idea floating around in my head would be to have that disclaimer and the opening message be items in the ACP also, so the admin can add/expand his own comments. This would end up working somewhat diffrent than the standard lang file, but I'll cross that bridge when I get there


@tekguru
I may have a solution for the permissions sooner than I thought, I took a very quick look though Mark's code and nothing stood out to me. But after comparing it to the rest of phpBB I decided I wanted to re-write the auth code using phpBB's built in is_auth() funciton. So I've done that much to the digests.php file, now I just need to re-work the mail_digests.php to match and do some testing. It so far has solved my problem of MOD [Private] forums being hidden from those who should be able to see it, as well as kept it out of sight for those who aren't supposed to see it.
INDEMNITY
a legal exemption from liability for damages.
BLOG | DORMLIFE

masterdavid
Registered User
Posts: 222
Joined: Tue Jul 08, 2003 1:26 pm

Post by masterdavid » Thu Apr 15, 2004 6:01 pm

Ok.. that would be better... but the edit box must have something like posting a message to aid the admin so that he would no longer have to use those HTML tags (not all knows how to).

I have many features in mind... I'll be posting it here when I consolidated everything :)

User avatar
tekguru
Registered User
Posts: 139
Joined: Thu Jul 03, 2003 1:33 pm

Post by tekguru » Thu Apr 15, 2004 6:17 pm

David in which file does the

Code: Select all

'DISCLAIMER' => ($html) ? sprintf($lang['digest_disclaimer_html'], $siteURL, $board_config['sitename'], $board_config['sitename'], $siteURL, $phpEx, $board_config['sitename'], $siteURL, $phpEx, $board_config['board_email'], $board_config['sitename'])  : sprintf($lang['digest_disclaimer_text'], $board_config['sitename'], $board_config['sitename'], $board_config['sitename'], $board_config['board_email'])
go I can't find the data I need to replace!

Indemnity_83: Good news on the fix, please post ASAP ;-)

User avatar
tekguru
Registered User
Posts: 139
Joined: Thu Jul 03, 2003 1:33 pm

Post by tekguru » Thu Apr 15, 2004 6:24 pm

Forget it ;-) Found it: mail_digests.php ;-)

Post Reply

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