[ABD] Board Notices Manager

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
Locked
User avatar
mrgoldy
Former Team Member
Posts: 1394
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs
Contact:

Re: [3.2][BETA] Board Notices Manager

Post by mrgoldy »

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 / Member of the Studio

Contributing: You can do it too! Including testing Pull Requests (PR).
phpBB Development and Testing made easy.
User avatar
FredQ
Registered User
Posts: 138
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 »

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
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: [3.2][BETA] Board Notices Manager

Post by david63 »

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!

I now no longer support any of my extensions but they will start to become available here
User avatar
mrgoldy
Former Team Member
Posts: 1394
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs
Contact:

Re: [3.2][BETA] Board Notices Manager

Post by mrgoldy »

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 / Member of the Studio

Contributing: You can do it too! Including testing Pull Requests (PR).
phpBB Development and Testing made easy.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: [3.2][BETA] Board Notices Manager

Post by david63 »

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!

I now no longer support any of my extensions but they will start to become available here
User avatar
FredQ
Registered User
Posts: 138
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 »

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)
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28619
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 »

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.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: [3.2][BETA] Board Notices Manager

Post by david63 »

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!

I now no longer support any of my extensions but they will start to become available here
User avatar
FredQ
Registered User
Posts: 138
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 »

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: 138
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 »

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)
User avatar
twm49
Registered User
Posts: 32
Joined: Fri Dec 18, 2015 12:42 am
Location: Milan - Italy
Contact:

Re: [3.2][BETA] Board Notices Manager

Post by twm49 »

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.3.27 - PhpBB 3.3.3 => my forum 3rotaie.it
Link al sito ufficiale italiano per l'assistenza di phpBB
User avatar
FredQ
Registered User
Posts: 138
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 »

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
Former Team Member
Posts: 1394
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs
Contact:

Re: [3.2][BETA] Board Notices Manager

Post by mrgoldy »

phpBB Studio / Member of the Studio

Contributing: You can do it too! Including testing Pull Requests (PR).
phpBB Development and Testing made easy.
User avatar
donsenilo
Registered User
Posts: 359
Joined: Wed Oct 08, 2014 6:23 pm
Name: Markus
Contact:

Re: [3.2][BETA] Board Notices Manager

Post by donsenilo »

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: 138
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 »

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)
Locked

Return to “Abandoned Extensions”