[CDB] Digests 3.2.11

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Get Involved
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: [ALPHA] Digests 3.0.0

Post by 3Di »

leschek wrote:The problem is that we write words in sentences in different order than it is in English. Also, there could be problem with translating extensions if authors of extensions use language strings from core phpBB. It is OK in English, but it doesn't look good in other languages.
Ofcourse.
Understanding phpBB 3.1.x: Plural_Rules
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
MarkDHamill
Registered User
Posts: 4933
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA

Re: [ALPHA] Digests 3.0.0

Post by MarkDHamill »

leschek wrote:in config.php file. I can actually see more messages on live board now, when I try to enable the extension:

Code: Select all

[phpBB Debug] PHP Notice: in file [ROOT]/phpbb/db/migration/tool/module.php on line 198: Undefined index: auth
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_acp.php on line 134: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_acp.php on line 134: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_acp.php on line 134: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
My extension doesn't change the source code for those files.

I hope to have a new release out in a day or so, a Beta. I've already turned on debug in my test environment and are looking for issues like this. I've also upgraded to 3.1.8.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4933
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA

Re: [ALPHA] Digests 3.0.0

Post by MarkDHamill »

leschek wrote:The problem is that we write words in sentences in different order than it is in English. Also, there could be problem with translating extensions if authors of extensions use language strings from core phpBB. It is OK in English, but it doesn't look good in other languages.
This will be fixed in the next release. I only find one case where plural rules apply.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: [ALPHA] Digests 3.0.0

Post by 3Di »

MarkDHamill wrote:
leschek wrote:in config.php file. I can actually see more messages on live board now, when I try to enable the extension:

Code: Select all

[phpBB Debug] PHP Notice: in file [ROOT]/phpbb/db/migration/tool/module.php on line 198: Undefined index: auth
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_acp.php on line 134: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_acp.php on line 134: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_acp.php on line 134: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3903)
My extension doesn't change the source code for those files.

I hope to have a new release out in a day or so, a Beta. I've already turned on debug in my test environment and are looking for issues like this. I've also upgraded to 3.1.8.
Guilty lines could be these, mode and auth are not defined for the module. The error told me where to lurk.
https://github.com/MarkDHamill/digests/ ... #L281-L282

https://github.com/MarkDHamill/digests/ ... #L381-L382
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
MarkDHamill
Registered User
Posts: 4933
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA

Re: [ALPHA] Digests 3.0.0

Post by MarkDHamill »

Nice analysis. That code should only have been executed when upgrading from the Digests mod. Is that what you did?

In any event these lines of code define categories, and none of the other categories built into phpBB have values in these columns.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: [ALPHA] Digests 3.0.0

Post by 3Di »

MarkDHamill wrote:Is that what you did?
Me? You should ask the poster (lescheck). ;)

edit:
Optionally you may not send 'modes' and it will insert all of the
* modules in that info file.
[phpBB Debug] PHP Notice: in file [ROOT]/phpbb/db/migration/tool/module.php on line 198: Undefined index: auth
the code of the line 198 says

Code: Select all

                        'module_auth'        => $module_info['auth'], 
So I guess it should be in any way defined?
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: [ALPHA] Digests 3.0.0

Post by david63 »

Mark

A couple of points about the language issues earlier.

1. You have

Code: Select all

               'TOTAL_USERS'             => sprintf($user->lang['DIGESTS_LIST_USERS'], $total_users),
This is not correct. Firstly lang does not use square brackets [] any more - it uses round brackets () and sprintf is not used. That code should be

Code: Select all

               'TOTAL_USERS'             => sprintf($user->lang('DIGESTS_LIST_USERS', $total_users),
2. The other issue

Code: Select all

<h4>{L_UCP_DIGESTS_BASICS} {L_OPTIONS}:</h4>
<h4>{L_UCP_DIGESTS_FORUMS_SELECTION} {L_OPTIONS}:</h4>
<h4>{L_UCP_DIGESTS_POST_FILTERS} {L_OPTIONS}:</h4>
<h4>{L_UCP_DIGESTS_ADDITIONAL_CRITERIA} {L_OPTIONS}:</h4>
I think that you should consider making it into one language variable otherwise there may be a problem with some rtl language translations.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
leschek
Registered User
Posts: 861
Joined: Tue Jul 18, 2006 12:49 pm

Re: [ALPHA] Digests 3.0.0

Post by leschek »

3Di wrote:
MarkDHamill wrote:Is that what you did?
Me? You should ask the poster (lescheck). ;)
MarkDHamill wrote:That code should only have been executed when upgrading from the Digests mod. Is that what you did?
I didn't use the MOD before. It was new installation.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: [ALPHA] Digests 3.0.0

Post by 3Di »

david63 wrote:1. You have

Code: Select all

               'TOTAL_USERS'             => sprintf($user->lang['DIGESTS_LIST_USERS'], $total_users),
This is not correct. Firstly lang does not use square brackets [] any more - it uses round brackets () and sprintf is not used. That code should be

Code: Select all

               'TOTAL_USERS'             => sprintf($user->lang('DIGESTS_LIST_USERS', $total_users),
^^ Should be ^^

Code: Select all

               'TOTAL_USERS'             => $user->lang('DIGESTS_LIST_USERS', (int) $total_users),
I use (validated)

Code: Select all

$tpotm_post = $this->user->lang('TPOTM_POST', (int) $tpotm_tot_posts);
template assignment

Code: Select all

'L_TPOTM_POST'        => $tpotm_post,
language plural rules

Code: Select all

    'TPOTM_POST'    => array(
        1    => ' with a total of <strong>%d</strong> post',
        2    => ' with a total of <strong>%d</strong> posts',
    ),
template usage

Code: Select all

{L_TPOTM_POST}
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: [ALPHA] Digests 3.0.0

Post by david63 »

3Di wrote:^^ Should be ^^
Correct - bad editing on my part :oops:

The way you have done it is another option, both work. Personally I prefer to use as few steps as possible.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
MarkDHamill
Registered User
Posts: 4933
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA

Re: [ALPHA] Digests 3.0.0

Post by MarkDHamill »

I must have missed the thing with $user->lang. I don't recall it in the coding guidelines or notes when creating mods. This is going to take a lot of search and replace.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: [ALPHA] Digests 3.0.0

Post by 3Di »

MarkDHamill wrote:I must have missed the thing with $user->lang. I don't recall it in the coding guidelines or notes when creating mods. This is going to take a lot of search and replace.
There should be a Search$Replace option into your IDE

search for sprintf($user->lang(' and replace with $user->lang(' (set it to all occurencies)

search for '], and replace with ', (here is better to check one by one all of the occurencies)

That should do it in a couple of minutes.

Image
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
MarkDHamill
Registered User
Posts: 4933
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA

Re: [ALPHA] Digests 3.0.0

Post by MarkDHamill »

Yes, this is what I did. It captured a few lines erroneously that I had to manually fix when PHP errors occurred.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
Praggle
Registered User
Posts: 64
Joined: Thu Feb 26, 2015 6:07 pm

Re: [ALPHA] Digests 3.0.0

Post by Praggle »

Some minor issues:

adm\style\acp_digests.html:
Line 21+22

Code: Select all

		imageId.alt = '{L_DIGEST_COLLAPSE}';
		imageId.title = '{L_DIGEST_COLLAPSE}';
should be

Code: Select all

		imageId.alt = '{L_DIGESTS_COLLAPSE}';
		imageId.title = '{L_DIGESTS_COLLAPSE}';
and Line 28+29

Code: Select all

		imageId.alt = '{L_DIGEST_EXPAND}';
		imageId.title = '{L_DIGEST_EXPAND}';
should be

Code: Select all

		imageId.alt = '{L_DIGESTS_EXPAND}';
		imageId.title = '{L_DIGESTS_EXPAND}';
language\en\info_acp_common.php:
L_DIGESTS_SUBSCRIBERS and L_DIGESTS_WITH_SELECTED should be defined:
So I added in Line 134:

Code: Select all

	'DIGESTS_SUBSCRIBERS'									=> 'Subscribers',
and then in Line 166:

Code: Select all

	'DIGESTS_WITH_SELECTED'									=> 'Change subscription for selected users', 
Also L_OPTIONS in every digest template isn't defined. Maybe you wanted to fetch it from global phpbb language definitions.
User avatar
MarkDHamill
Registered User
Posts: 4933
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA

Re: [ALPHA] Digests 3.0.0

Post by MarkDHamill »

Praggle, thanks so much for catching these. I changed the template variables for EXPAND and COLLAPSE in the template.

L_OPTIONS is going away due to a declension concern.

I found DIGESTS_WITH_SELECTED missing yesterday and added it. It should be on my GitHub. I missed DIGESTS_SUBSCRIBERS and will add it.

I'm still trying to get out the Beta. Feeling close to it but I need to retest a few things. Much of the SQL was rewritten to be compatible with the coding guidelines. In addition the ability to send out digest for more than one hour if a system cron is not used adds complexity and requires further testing.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.

Return to “Extensions in Development”