[3.1][3.2][BETA] LMDI Multilinks in navbar

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
pierredu
Registered User
Posts: 925
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

Re: [3.1][3.2][BETA] LMDI Multilinks in navbar

Post by pierredu » Sat Feb 18, 2017 6:55 am

The latest version is buggy.
I'll cure that this morning and update the depository.

Thanks for the remarks on the wording. You're right.

The data is stored in two entries of the table config_text (whose length is not limited).

PS.
I uploaded a corrected (and hopefully correct) version on github.

PPS
A new version was uploaded, with a link to FA site and some rewording in the explanation. The image reduction now works.

Lady_G
Registered User
Posts: 227
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: [3.1][3.2][BETA] LMDI Multilinks in navbar

Post by Lady_G » Sat Feb 18, 2017 8:09 pm

I have installed version 1.1.6 and reinstalled my links. Everything is working, but the selection of "Use a graphic file:" is hidden until you select "Use a Font Awesome:". Both entries should be visible so you can see the remaining choice (Use a graphic file).

When I select both choices to "No", the default "fa-external-link" is selected. I understand you will force this icon, but perhaps the intention is not clearly documented. In English, the phrase "By default" implies that no selection will result in the fa-external-link and the choice can be changed.

Perhaps the description can be more clear? In the language files as before, 'ACP_ML_FA_EXPLAIN'

Code: Select all

'Enter here the name of the Font Awesome icon to be used. By default, the extension uses fa-external-link (&#xF08e;). See the <a href="http://fontawesome.io/icons/">Font Awesome site </a> to know all possibilities offered by the font. You just have to add the prefix &#8216;fa-’ in front of the name. To see some icons used in the phpBB software, see the file assets/css/font-awesome.min.css.',
To:

Code: Select all

'Enter here the name of the Font Awesome icon to be used. See the <a href="http://fontawesome.io/icons/">Font Awesome site </a> to know all possibilities offered by the font. You just have to add the prefix &#8216;fa-’ in front of the name. To see some icons used in the phpBB software, see the file assets/css/font-awesome.min.css. Selecting "No" (and no graphic file is used) will use fa-external-link (&#xF08e;).',
Aussi (essai mon francais):

Code: Select all

'Indiquez ici l’icône Font Awesome à utiliser. Par défaut, fa-external-link (&#xF08e;). Voir le <a href="http://fontawesome.io/icons/">site Font Awesome</a> pour les possibilités offertes par cette police. Il suffit d’ajouter le préfixe &#8216;fa-’ devant le nom. Pour rechercher des exemples d’icônes utilisées dans le logiciel phpBB, consultez le fichier assets/css/font-awesome.min.css.',
à:

Code: Select all

'Indiquez ici l’icône Font Awesome à utiliser. Voir le <a href="http://fontawesome.io/icons/">site Font Awesome</a> pour les possibilités offertes par cette police. Il suffit d’ajouter le préfixe &#8216;fa-’ devant le nom. Pour rechercher des exemples d’icônes utilisées dans le logiciel phpBB, consultez le fichier assets/css/font-awesome.min.css. Sans une sélection (et aucun fichier graphique), fa-external-link (& # xF08e;) est utilisé. ',

User avatar
pierredu
Registered User
Posts: 925
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

Re: [3.1][3.2][BETA] LMDI Multilinks in navbar

Post by pierredu » Sun Feb 19, 2017 8:02 am

Indeed, changing the order of the elements in the text to display gives a better understanding.
On the other hand, since the link to FA site is given, the tip about the css file is less important. One of the testers, on the French site, even said that there was a risk that people corrupt this css file.

This would boil down to :

Code: Select all

'Enter here the name of the Font Awesome icon to be used. See the <a href="http://fontawesome.io/icons/">Font Awesome site </a> to know all possibilities offered by the font. You just have to add the prefix &#8216;fa-’ in front of the name. Selecting "No" (and no graphic file is used) will use fa-external-link (&#xF08e;).'
PS:
Added screenshots in the first post.

User avatar
P_I
Registered User
Posts: 924
Joined: Tue Mar 01, 2011 8:35 pm
Location: Calgary
Contact:

Re: [3.1][3.2][BETA] LMDI Multilinks in navbar

Post by P_I » Sun Feb 19, 2017 5:23 pm

I've found a permissions bug, anyone with access to ACP has access to the Extension settings, so could change the links. This ability should only be allowed for someone who has the permissions to administer the board.

I checked a couple of other extensions, they use a check for acl_a_board permission. I think it belongs in acp/multilinks_info.php.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams

User avatar
pierredu
Registered User
Posts: 925
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

Re: [3.1][3.2][BETA] LMDI Multilinks in navbar

Post by pierredu » Sun Feb 19, 2017 5:46 pm

This is the first time that such an argument is raised.
Do you have several kinds of administrators?

User avatar
P_I
Registered User
Posts: 924
Joined: Tue Mar 01, 2011 8:35 pm
Location: Calgary
Contact:

Re: [3.1][3.2][BETA] LMDI Multilinks in navbar

Post by P_I » Sun Feb 19, 2017 6:10 pm

Yes. On one of our forums, Global Moderators get access to some parts of ACP. I don't know if that's standard phpBB permissions or the settings made by my predecessor board admin. For example, I can confirm that the Board Rules and Site Logo extensions do not appear if the user doesn't have the board administration permission.

FWIW, the forum just celebrated it's twelfth year of operation and dates back to phpBB 2.0.x. There are many nooks and crannies of the permissions I've never explored.

I discovered this because of some other work I'm doing fixing an open ticket and I needed to test various user permissions in ACP.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams

Lady_G
Registered User
Posts: 227
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: [3.1][3.2][BETA] LMDI Multilinks in navbar

Post by Lady_G » Mon Feb 20, 2017 3:41 am

Interesting, as I can also see the extension with global moderator permissions. My board has existed since phpBB 2.x and some administrative permissions are present in my global moderator accounts. For example, a moderator can rename a user or change an email address.

Access within the ACP is highly restricted to the few permissions needed as a moderator. I tested one of these global moderator accounts and have access to the "Extensions" tab. The only member is the Multilinks extension.

The extension must not be visible.

User avatar
pierredu
Registered User
Posts: 925
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

Re: [3.1][3.2][BETA] LMDI Multilinks in navbar

Post by pierredu » Mon Feb 20, 2017 11:04 am

I uploaded a new version which should cure this problem.
Caution: you'll need to disable the extension and to delete data, then reinstall the new version. I didn't want to write a second migration file.

User avatar
P_I
Registered User
Posts: 924
Joined: Tue Mar 01, 2011 8:35 pm
Location: Calgary
Contact:

Re: [3.1][3.2][BETA] LMDI Multilinks in navbar

Post by P_I » Mon Feb 20, 2017 1:50 pm

I disabled the extension, deleted data, updated to v1.1.9 and then enabled the extension. I haven't entered any data yet.

Unfortunately I don't think your fix worked.

On my phpBB 3.2 testing board, I'm still able to access the extension with a Global Moderator. This user was able to add a link to the navigation bar.

I've double checked the global moderator's group Administrative permissions. The only administrative permission set to Yes is Users & Groups, "Can manage users", all other Administrative permissions are set to Never'.

On this testing board I have the Board Rules and Site Logo extensions installed and neither of them are visible in ACP to the global moderator.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams

User avatar
pierredu
Registered User
Posts: 925
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

Re: [3.1][3.2][BETA] LMDI Multilinks in navbar

Post by pierredu » Mon Feb 20, 2017 2:58 pm

Thanks for testing.
I think I'll have to redo my homework.

User avatar
P_I
Registered User
Posts: 924
Joined: Tue Mar 01, 2011 8:35 pm
Location: Calgary
Contact:

Re: [3.1][3.2][BETA] LMDI Multilinks in navbar

Post by P_I » Mon Feb 20, 2017 3:00 pm

pierredu wrote:
Mon Feb 20, 2017 2:58 pm
Thanks for testing.
I think I'll have to redo my homework.
You might want to crib notes from the Board Rules extension, it's one of the official extensions so probably a good example to use.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams

User avatar
pierredu
Registered User
Posts: 925
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

Re: [3.1][3.2][BETA] LMDI Multilinks in navbar

Post by pierredu » Mon Feb 20, 2017 3:45 pm

I was about to ask you to name me one or two of those extensions which behave correctly.
You're right, this one should be a good example.

User avatar
P_I
Registered User
Posts: 924
Joined: Tue Mar 01, 2011 8:35 pm
Location: Calgary
Contact:

Re: [3.1][3.2][BETA] LMDI Multilinks in navbar

Post by P_I » Mon Feb 20, 2017 3:49 pm

Let me know when you have something you want tested. My boards will benefit from this extension so I'm ready, willing and able to help out any way I can.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams

User avatar
pierredu
Registered User
Posts: 925
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

Re: [3.1][3.2][BETA] LMDI Multilinks in navbar

Post by pierredu » Mon Feb 20, 2017 4:10 pm

There are 4 admin roles:

Code: Select all

ROLE_ADMIN_STANDARD 
ROLE_ADMIN_FORUM
ROLE_ADMIN_USERGROUP
ROLE_ADMIN_FULL
If I understand correctly, the extension usage should be reserved to the ADMIN_FULL ?

User avatar
P_I
Registered User
Posts: 924
Joined: Tue Mar 01, 2011 8:35 pm
Location: Calgary
Contact:

Re: [3.1][3.2][BETA] LMDI Multilinks in navbar

Post by P_I » Mon Feb 20, 2017 4:33 pm

Maybe not. According to https://www.phpbb.com/support/docs/en/3 ... uickstart/
phpBB documentation - Permissions Quick Start wrote:By default the Administrators user group has the Standard Admin role.
Which I guessing would imply the extension should allow anyone with ROLE_ADMIN_STANDARD or ROLE_ADMIN_FULL.

I found Tutorial: Permissions — phpBB 3.1.x documentation but it doesn't offer any further insight that I can see.

The Board Rules extension, in the file migrations/v10x/m5_initial_permission.php has

Code: Select all

            // Set permissions
            array('permission.permission_set', array('ROLE_ADMIN_FULL', 'a_boardrules')),
            array('permission.permission_set', array('ROLE_ADMIN_STANDARD', 'a_boardrules')),
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams

Locked

Return to “Extensions in Development”