david63 wrote: ↑Tue Oct 30, 2018 7:39 am
Not wishing to discourage you but can I make a few suggestions about your code before you get too far down the road - especially if you intend submitting this extension to the CDB.
Thank you! I'm new to phpbb and as a developer, so for me your help was very important. At the moment I do not care to send the ext to the CDB (it's to much soon with so many features to correct and add).
david63 wrote: ↑Tue Oct 30, 2018 7:39 am
Firstly I would suggest that you look at phpBB's
coding guidelines as much of your code does not conform especially your non use of Unix line endings, but there are other coding issues (opening
{
for example must be on a new line)
Ok i correted opening
{
and now i use the Unix line endings. If i' ll see other
bug i' ll fix they.
david63 wrote: ↑Tue Oct 30, 2018 7:39 am
There are many other errors which are highlighted if you run your GitHub repository through the
EPV.
I correted many errors and soon i'll finish to correct other, but i don't understand how to correct
Warning: Can't detect the file type for message.mp3, handling it as a binary file.
. I' m using a file .mp3 for "notification sound on chat".
david63 wrote: ↑Tue Oct 30, 2018 7:39 am
[*]You need to break your language file into several files and only load the ones that are need at that time - you do not want to be loading all your ACP language on every page. Also I would suggest that you look at using
plurals.
[*]Many of your language variables are already in the core and whilst there is nothing wrong with re-defining them in your extension there is a possibility that core functionality could be affected if they are defined differently. It will depend on the order in which the files are loaded - the last will overwrite the first. By all means use your own but ensure that they are unique.
I have divided the language file (main, acp, mcp, ucp, error migration), and set basic plurals, i hope to don't forget nothing.
david63 wrote: ↑Tue Oct 30, 2018 7:39 am
[*]You cannot have an underscore in your namespace.
I have renamed
pg_social
in to
pgsocial
david63 wrote: ↑Tue Oct 30, 2018 7:39 am
[*]You cannot have
globals
in controllers.
Removed.
david63 wrote: ↑Tue Oct 30, 2018 7:39 am
[*]You should consider using Twig syntax in your templates - you can use this
tool to convert them.
Changed.
david63 wrote: ↑Tue Oct 30, 2018 7:39 am
[*]You have some hard coded language in your template files.
Can you take me a example, so i can correct?
david63 wrote: ↑Tue Oct 30, 2018 7:39 am
[*]I am not sure what the phpBB version checks are for in your listener file but as phpBB 3.1 is now unsupported there is no requirement for backward compatibility and version checking should be done via the
ext.php
when installing the extension.[/list]
I hope to have correct this.