[3.2][BETA] Board Notices Manager

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!
Scam Warning
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
mrgoldy
Jr. Extension Validator
Posts: 946
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: [3.2][BETA] Board Notices Manager

Post by mrgoldy » Wed Jan 23, 2019 11:06 am

About sending it to the CDB.
Here is something you will not like:
Functions (and variables, etc) in php should not be camelCase but snake_case.
phpBB Studio / ''Proud member of the Studio"

User avatar
FredQ
Registered User
Posts: 130
Joined: Sat Nov 01, 2014 10:48 am
Location: Northeast Scotland
Name: Fred Q
Contact:

Re: [3.2][BETA] Board Notices Manager

Post by FredQ » Wed Jan 23, 2019 1:06 pm

Seriously? it's going against the common rules. As a matter of fact, I've spent so much time converting everything to camelCase in a previous project :?

Anyway, thanks for the tip ;)
My board (converted from vBulletin)

User avatar
david63
Jr. Extension Validator
Posts: 15766
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [3.2][BETA] Board Notices Manager

Post by david63 » Wed Jan 23, 2019 2:48 pm

FredQ wrote:
Wed Jan 23, 2019 1:06 pm
Seriously? it's going against the common rules.
Yes, seriously - it may be going against "common" rules but these are phpBB rules.

There are also quite a few other things that will not pass validation:
  • No files should be in the extension's root other that composer.json, ext.php and licence.txt
  • The items in services.yml that start with @ or % should be surrounded by single quotes
  • js code should be in its own file and not in-line
  • Language variables should not be passed to the template by a .php file unless they are using placeholders
  • You should be using the $language object and not $user->lang
  • You should consider using Twig syntax for your templates - there is a conversion tool available
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
mrgoldy
Jr. Extension Validator
Posts: 946
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: [3.2][BETA] Board Notices Manager

Post by mrgoldy » Wed Jan 23, 2019 3:30 pm

Well, files in the root directory are allowed, but generally considered crowding a place and more often than not can have a more fitting place, but it is allowed. And the use of $language instead of $user is not applicable to this extension, as he also supports phpBB 3.1 by the looks of the composer, so that would require the $user class.

And in case you did not know/have the link yet, Fred, have a look here: https://area51.phpbb.com/docs/dev/3.2.x ... lines.html
phpBB Studio / ''Proud member of the Studio"

User avatar
david63
Jr. Extension Validator
Posts: 15766
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [3.2][BETA] Board Notices Manager

Post by david63 » Wed Jan 23, 2019 3:34 pm

mrgoldy wrote:
Wed Jan 23, 2019 3:30 pm
And the use of $language instead of $user is not applicable to this extension, as he also supports phpBB 3.1
Not wishing to start an argument but the tag is for 3.2 and even if it does support 3.1 it will not be validated against 3.1
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
FredQ
Registered User
Posts: 130
Joined: Sat Nov 01, 2014 10:48 am
Location: Northeast Scotland
Name: Fred Q
Contact:

Re: [3.2][BETA] Board Notices Manager

Post by FredQ » Wed Jan 23, 2019 4:48 pm

Thank you for taking the time to look at my extension ;) I've taken note of all these points and already fixed most of them. I'm not sure I understand this one though:
david63 wrote:
Wed Jan 23, 2019 2:48 pm

There are also quite a few other things that will not pass validation:
  • Language variables should not be passed to the template by a .php file unless they are using placeholders
Now I just hope I can find a tool to convert variable/method names and everything else to snake_case...
My board (converted from vBulletin)

User avatar
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 25001
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [3.2][BETA] Board Notices Manager

Post by Paul » Wed Jan 23, 2019 6:25 pm

mrgoldy wrote:
Wed Jan 23, 2019 11:06 am
About sending it to the CDB.
Here is something you will not like:
Functions (and variables, etc) in php should not be camelCase but snake_case.
An extension won't be denied for things like that at all.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

User avatar
david63
Jr. Extension Validator
Posts: 15766
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [3.2][BETA] Board Notices Manager

Post by david63 » Wed Jan 23, 2019 6:48 pm

FredQ wrote:
Wed Jan 23, 2019 4:48 pm
I'm not sure I understand this one though:
Currently you have in your template assignments 'ACP_BOARD_NOTICES_MANAGER' => $this->user->lang('ACP_BOARD_NOTICES_MANAGER'), and then in your template you have {ACP_BOARD_NOTICES_MANAGER}.

Using Twig syntax all you need to do is put {{ lang('ACP_BOARD_NOTICES_MANAGER') }} in the template.

The assigning of language variables in the way that you are doing it went out with phpBB 2
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
FredQ
Registered User
Posts: 130
Joined: Sat Nov 01, 2014 10:48 am
Location: Northeast Scotland
Name: Fred Q
Contact:

Re: [3.2][BETA] Board Notices Manager

Post by FredQ » Wed Jan 23, 2019 6:51 pm

david63 wrote:
Wed Jan 23, 2019 6:48 pm

The assigning of language variables in the way that you are doing it went out with phpBB 2
You can tell I started this extension a long time ago :lol:

Anyway, I see what you mean now, and it is much easier indeed! thanks
My board (converted from vBulletin)

User avatar
FredQ
Registered User
Posts: 130
Joined: Sat Nov 01, 2014 10:48 am
Location: Northeast Scotland
Name: Fred Q
Contact:

Re: [3.2][BETA] Board Notices Manager

Post by FredQ » Wed Jan 23, 2019 6:57 pm

Paul wrote:
Wed Jan 23, 2019 6:25 pm
mrgoldy wrote:
Wed Jan 23, 2019 11:06 am
About sending it to the CDB.
Here is something you will not like:
Functions (and variables, etc) in php should not be camelCase but snake_case.
An extension won't be denied for things like that at all.
Oh that's a relief! :) Thanks for that

Anyway, new version on the way:

version 0.4.3:
  • Added a global default background (instead of the hardcoded light red) and the ability to remove it entirely if you prefer the background colour to inherit the colour of the CSS parent
  • Added Estonian translation from exabot
  • [Internal] A lot of cleanup and bug fixes
My board (converted from vBulletin)

twm49
Registered User
Posts: 23
Joined: Fri Dec 18, 2015 12:42 am
Location: Milan - Italy
Contact:

Re: [3.2][BETA] Board Notices Manager

Post by twm49 » Thu Jan 24, 2019 12:47 pm

Great work, congratulations!
Thanks for this extension, it is really very useful for me. If it were not too difficult it would be important, for me, to have the option " Display on board index only:"

Thanks in advance
Tito sorry my bad English
php 7.1.11 - PhpBB 3.2.5 => 3rotaie.it

User avatar
FredQ
Registered User
Posts: 130
Joined: Sat Nov 01, 2014 10:48 am
Location: Northeast Scotland
Name: Fred Q
Contact:

Re: [3.2][BETA] Board Notices Manager

Post by FredQ » Thu Jan 24, 2019 6:16 pm

twm49 wrote:
Thu Jan 24, 2019 12:47 pm
If it were not too difficult it would be important, for me, to have the option " Display on board index only:"
I guess I just need to find out a reliable way of checking that the current page is the board index. I'm not sure how yet.

BTW the code in master is broken for PHP 5 right now (it works for PHP 7). I'll fix it asap.

I've been using using PHP 7 for too long and I forgot what was not possible back in these days... :roll:
My board (converted from vBulletin)

User avatar
mrgoldy
Jr. Extension Validator
Posts: 946
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: [3.2][BETA] Board Notices Manager

Post by mrgoldy » Thu Jan 24, 2019 6:20 pm

phpBB Studio / ''Proud member of the Studio"

User avatar
donsenilo
Registered User
Posts: 298
Joined: Wed Oct 08, 2014 6:23 pm
Name: Markus
Contact:

Re: [3.2][BETA] Board Notices Manager

Post by donsenilo » Thu Jan 24, 2019 9:43 pm

And copy all the files to the folder [root of your phpBB]/ext/fq/boardnotices/
Done, but doesn't show up to activeting it.
There are some files missing.

User avatar
FredQ
Registered User
Posts: 130
Joined: Sat Nov 01, 2014 10:48 am
Location: Northeast Scotland
Name: Fred Q
Contact:

Re: [3.2][BETA] Board Notices Manager

Post by FredQ » Thu Jan 24, 2019 9:51 pm

mrgoldy wrote:
Thu Jan 24, 2019 6:20 pm
For your index check: https://github.com/phpbb/phpbb/blob/mas ... x.php#L221
Excellent! Exactly what I needed, thank you very much 8-)
My board (converted from vBulletin)

Post Reply

Return to “Extensions in Development”

Who is online

Users browsing this forum: dmzx, ivellios1988, lopoto, nudels64 and 14 guests