[CDB] Linked Accounts

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!
Suggested Hosts
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)
Shenzy
Registered User
Posts: 28
Joined: Mon May 28, 2018 10:42 pm

Re: [3.2][RC] Linked Accounts

Post by Shenzy »

I have a small suggestion for the style of this extension:
Instead of using

Code: Select all

class="bg1"
in the navbar_header_profile_list_after.html, why not use

Code: Select all

role="menuitem"
instead?

The "problem" I had was that the style I'm using (Black-Silver) has a light bg1, but the dropdown-menu items have a dark background with white text. This caused names of users without a custom color to practically disappear. I played around with it a little bit and discovered that changing it to the role menuitem would make it overall more cohesive for prosilver-based styles that do the same thing.
User avatar
Flerex
Registered User
Posts: 134
Joined: Sun Oct 14, 2012 8:35 pm
Location: Galicia, Spain
Name: Flerex
Contact:

Re: [3.2][RC] Linked Accounts

Post by Flerex »

While I agree that adding role="menuitem" is a great idea, I have to say that it should only be added to the anchor, not the li element. In the next update it will be available. Although this should be a small change that would only benefit screen reader users.

Regarding your main problem, I cannot asure that the extension would look nice in every single style. I decided to have a decent design for prosilver out of the box for UX's sake. However, adapting the extension to your needs is quite easy. You just have to download the extension and create a directory under the styles/ subdirectory of the extension's root folder with the name of your style, copy the contents of the prosilver/ directory onto this folder you've created and modify the templates as you need.
Shenzy
Registered User
Posts: 28
Joined: Mon May 28, 2018 10:42 pm

Re: [3.2][RC] Linked Accounts

Post by Shenzy »

Yeah, I'm not very experienced with coding, so I was just trying to get it to show the right background color and stumbled upon role="menuitem" while looking at the source code of my forum and it happened to work quite well :mrgreen:

I've already adapted the style of the extension to the styles I'm using to a point I'm quite happy with while leaving the original prosilver-folder alone, in case I mess something up.
User avatar
Sniper_E
Registered User
Posts: 1126
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [3.2][RC] Linked Accounts

Post by Sniper_E »

I know I've changed my codes up a little but Flerex did not have bg1 class anywhere in his event template. Did he?

Code: Select all

{% if switchable_account %}
{% INCLUDECSS '@flerex_linkedaccounts/linkedaccounts.css' %}
<li id="linked_accounts">
	<ul>
		{% for account in switchable_account %}
		<li>
			<a href="{{ account.SWITCH_LINK }}" role="menuitem">
			{% if account.AVATAR %}
				{{ account.AVATAR }}
			{% else %}
				<img src="{T_THEME_PATH}/images/no_avatar.gif" class="avatar" alt="">
			{% endif %}
			{{ account.NAME }}
			</a>
		</li>
		{% endfor %}
	</ul>
</li>
{% endif %}
{% if U_CAN_LINK_ACCOUNT %}
<li>
	<a href="{{ U_PROFILE }}?i=-flerex-linkedaccounts-ucp-main_module&mode=link" role="menuitem">
	<i class="icon fa-user-secret fa-fw" aria-hidden="true"></i><span>{{ lang('LINKING_ACCOUNT') }}</span></a>
</li>
{% endif %}
I did not have role="menuitem" in my template like above codes but I will try it out.

I've tested this ext on a few different style, light and dark and it blends in well with all of them I tried.
I don't see why the Black-Silver style would show the link any different the way Flerex codes are written.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
Flerex
Registered User
Posts: 134
Joined: Sun Oct 14, 2012 8:35 pm
Location: Galicia, Spain
Name: Flerex
Contact:

Re: [3.2][RC] Linked Accounts

Post by Flerex »

I may have changed the template a bit since the last time you downloaded the extension @Sniper_E. Here's how the template is currently structure:

Code: Select all

{% if switchable_account %}
{% INCLUDECSS '@flerex_linkedaccounts/linkedaccounts.css' %}
<li id="linked_accounts" class="bg1">
	<ul>
		{% for account in switchable_account %}
		<li>
			{% if U_CAN_LINK_ACCOUNT %}
				<a href="{{ account.SWITCH_LINK }}" role="menuitem">
					{% if account.AVATAR %}
						{{ account.AVATAR }}
					{% else %}
						<img src="{T_THEME_PATH}/images/no_avatar.gif" class="avatar" alt="">
					{% endif %}
					{{ account.NAME }}
				</a>
			{% else %}
				{% if account.AVATAR %}
					{{ account.AVATAR }}
				{% else %}
					<img src="{T_THEME_PATH}/images/no_avatar.gif" class="avatar" alt="">
				{% endif %}
				{{ account.NAME }}
			{% endif %}
		</li>
		{% endfor %}
	</ul>
</li>
{% endif %}
User avatar
Flerex
Registered User
Posts: 134
Joined: Sun Oct 14, 2012 8:35 pm
Location: Galicia, Spain
Name: Flerex
Contact:

Re: [CDB] Linked Accounts

Post by Flerex »

Linked Account has finally been aproved in the Official Extension Database. According to the rules, support must now be held in the official page of the extension inside the extension database.


Thank you guys for all the help, all the reports and all the testing. I appreciate it. ✊
Locked

Return to “Extensions in Development”