[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: 852
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

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

Post by pierredu » Wed Jan 25, 2017 8:11 am

Extension Name: LMDI Multilinks
Author: Pierre Duhem

Extension Description: This extension allows the addition of outbound links in the navigation bar (up to 5 at the beginning and at the end).
Extension Version: 2.0.0

Extension Download: https://github.com/pierrdu/lmdi_multilinks

Thanks in advance for your comments.

Screenshots:
Image

Image

Le extension was validated : see https://www.phpbb.com/customise/db/exte ... ultilinks/
Last edited by pierredu on Mon May 15, 2017 12:11 pm, edited 6 times in total.

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

Re: [3.1][3.2][ALPHA] LMDI Multilinks

Post by pierredu » Thu Jan 26, 2017 8:08 pm

After some comments on another board, I uploaded an updated version on github.

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

Re: [3.1][3.2][ALPHA] LMDI Multilinks

Post by P_I » Mon Feb 13, 2017 2:22 am

Great start. Thanks. A few suggestions/changes.

I initially skipped over this because I didn't associate the extension name with the navigation bar. You might consider changing the extension name to include "navigation bar".

It would be useful to allow an image or font awesome icon (phpBB 3.2) to be specified for the each link.

The Infotip on hovering: area probably should be larger. Maybe the size of ACP->FORUMS Description: as a starting point?

Borrowing from from phpbb's adm/style/acp_forums.html I did some hacking and I think that in adm/styles/acp_multilinks_body.html line 103, change from:

Code: Select all

<dd><input type="text" name="ml_title" id="ml_title" value="{TITLE}" /></dd>
to

Code: Select all

<dd><textarea name="ml_title" id="ml_title" rows="5" cols="45" data-bbcode="false">{TITLE}</textarea></dd>
Last edited by P_I on Mon Feb 13, 2017 3:05 am, edited 1 time in total.
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: 185
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

Re: [3.1][3.2][ALPHA] LMDI Multilinks

Post by Lady_G » Mon Feb 13, 2017 3:04 am

I am also interested in this extension and would like an image or font awesome icon for each link (phpBB 3.2).

Is there a dependency on language? My board has the American English pack as the default language (language/en_us).

To download from the ext/ directory with git, the directory structure can be created as:

Code: Select all

git clone https://github.com/pierrdu/lmdi_multilinks.git lmdi/multilinks

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

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

Post by pierredu » Mon Feb 13, 2017 7:14 am

Thanks for your comments.

There is already an english package.

I'll see how to integrate the fontawesome selection feature.

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

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

Post by P_I » Tue Feb 14, 2017 1:05 am

I've just tried v1.0.8 with the changes you made today. Thanks.

I should have clarified my earlier comment/request
P_I wrote:
Mon Feb 13, 2017 2:22 am
It would be useful to allow an image or font awesome icon (phpBB 3.2) to be specified for the each link.
I've got a use case in phpBB 3.2 where I'm adding two links, one where I want to use an image (the favicon of the site I'm linking) and the other where I can use a font awesome icon. Would it be possible to support the board admin making the choice for each link?

You've also got me curious, what is the expansion of the LMDI acronym?
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: 185
Joined: Fri Jun 08, 2012 12:38 pm
Location: US

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

Post by Lady_G » Tue Feb 14, 2017 3:11 am

I have implemented the Font Awesome selection feature for my navigation menu (version 1.08). Thank you.

One of my links requires a small icon to be the same as my site logo. Is it possible to include a custom image?

There is an error in the ACP language. When creating Links added at the end of the navigation bar:, the descriptive text is displayed as 'ACP_ADD_URL_PP':

Code: Select all

(Prepended at the beginning of the navigation bar)
The descriptive text should be displayed as 'ACP_ADD_URL_AP':

Code: Select all

(Appended at the end of the navigation bar)
There is a small typo in lmdi_multilinks/language/en/acp_multilinks.php:

Code: Select all

'ACP_ML_ICON_EXPLAIN'	=> 'Enter here the name ofthe legacy icon to be used.
should be (insert a space between "ofthe"):
'ACP_ML_ICON_EXPLAIN' => 'Enter here the name of the legacy icon to be used.
P_I wrote:
Tue Feb 14, 2017 1:05 am
You've also got me curious, what is the expansion of the LMDI acronym?
Inspect the developer's credits to find: Le Monde des insectes 🐛 Very nice! 🐞

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

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

Post by pierredu » Tue Feb 14, 2017 7:07 am

Thanks to both of you for your remarks. I'll make the changes.

The problem with using a picture is that an extension should not use assets out of its own vendor/ext folder tree. I'll ask the question on the writers discussion forum.

About the acronym, Lady_G has found it. This is my/our board. I began to code extensions because I lacked some special tools (like my glossary).

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

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

Post by pierredu » Wed Feb 15, 2017 9:05 am

Well, here we are.
I uploaded a version 1.0.12 on github.

It is now possible to use graphical files instead of icons (both under 3.1.x and 3.2.x). The icon/file is stored in a line of the config_text table and can be enabled according to the needs (that means that the data is not lost if you choose to enable the other option).

Thanks in advance for your comments.

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

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

Post by P_I » Wed Feb 15, 2017 12:29 pm

Thank you. Tested it on both a desktop and iPhone and I've got two links, one using a font awesome icon and one using an image icon, works as expected. Well done!

v1.0.12 allows me to specify both a font awesome icon and a graphic file and set both to Yes. Clearly only one can be displayed, so maybe use a radio button?

A language file change, "fontawesome" should be "Font Awesome" to match the proper name.

A few more thoughts to improve it.
  • The input box to specify the URL of the link could be a bit larger, again I might suggest looking at ACP->Forums->Manage forums to inspiration on sizing.
  • One the Extension settings page, it might be helpful if the actual navbar representation was displayed, including the icon
  • There doesn't look like there is an easy way to move a link from append to prepend (or vise-versa). The only way I could do it is delete, then re-add. Am I missing something?
I've now got it installed on my phpBB 3.2 test board so my beta testers can test it out.

Promote to at least Beta?
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: 852
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

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

Post by pierredu » Wed Feb 15, 2017 8:24 pm

Good remarks.

Icons have priority. That is, if I find that the icon flag is set, I don't look at the file flag. I'm not sure that a radio button would be the solution. Maybe a little javascript?
A bigger edit zone would indeed be welcome.
OK for Font Awesome.

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

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

Post by Lady_G » Thu Feb 16, 2017 4:07 am

I have installed v1.0.12 with my custom image. My image dimensions are 16x16 pixels, but the extension is forcing the dimensions to 20x20 pixels. My image details are blurred. Visually, the 20x20 pixel (scaled) image appears too large within the context of the menu bar.

For your information: Small icon images which are not intended to scale (.png, .gif, .jpg) will lose detail when the size is changed. One must design a small icon from the start and never change the size.

Please change the style properties of (width and height) to (max-width and max-height). There are 2 occurences in each of styles/all/template/overall_header_navigation_append.html and styles/all/template/overall_header_navigation_prepend.html. I have tested this change, my icon details are clear. From:

Code: Select all

<a href="{mlap.URL}" title="{mlap.TITLE}" {mlap.BLANK}><img class="avatar" src="{mlap.FILE}" width="20" height="20" alt="picture" /><span> {mlap.NAME}</span></a>
To:

Code: Select all

<li class="no-bulletin"><a href="{mlap.URL}" title="{mlap.TITLE}" {mlap.BLANK}><img class="avatar" src="{mlap.FILE}" max-width="20" max-height="20" alt="picture" /><span> {mlap.NAME}</span></a></li>
I also suggest to change the language file variable 'ACP_ML_FILE_EXPLAIN':

Code: Select all

If you want to use a remote image as the logo then enter the full url of the image. Otherwise, enter the location of the image file on the server. Allowed file types: gif, png. The picture will be reduced to 20x20 pixels.
To:

Code: Select all

If you want to use a remote image as the logo then enter the full url of the image. Otherwise, enter the location of the image file on the server. Allowed file types: gif, png. The image must be a maximum of 20x20 pixels.

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

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

Post by pierredu » Thu Feb 16, 2017 8:01 am

Thanks for the corrections inthe language files.
The suggested correction of the style is also a good idea.

I'll correct my code.

However, I suggest to say:
If the width and height of the image are more than 20x20 pixels, the image will be reduced.

User avatar
P_I
Registered User
Posts: 839
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 » Thu Feb 16, 2017 12:35 pm

If you review styles/prosilver/theme/icons.css you'll find phpBB's default icon size. Shouldn't you be using the same dimensions?
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: 852
Joined: Thu Nov 01, 2012 8:04 am
Location: Paris (France)

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

Post by pierredu » Thu Feb 16, 2017 12:59 pm

I used 20x20 because this is the size of the avatar image at the end of the navbar.
If I understand correctly this file, there are several possible sizes.

Locked

Return to “Extensions in Development”

Who is online

Users browsing this forum: jackennils and 27 guests