{% else %}
seems to do the trick (if I understand you correctly this time...):navbar_header_profile_list_after.html
:Code: Select all
{% if switchable_account %}
{% INCLUDECSS '@flerex_linkedaccounts/linkedaccounts.css' %}
<li id="linked_accounts" class="bg1">
<ul>
{% for account in switchable_account %}
<li><a href="{{ account.SWITCH_LINK }}">
{% 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>
{% else %}
{% INCLUDECSS '@flerex_linkedaccounts/linkedaccounts.css' %}
<li id="linked_accounts" class="bg1">
<ul>
<li><a href="https://www.phpbb.com/">
<img src="{T_THEME_PATH}/images/no_avatar.gif" class="avatar" alt="">
No linked accounts
</a></li>
</ul>
</li>
{% endif %}
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 }}">
{% 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>
{% else %}
<li>
<a href="{{ U_PROFILE }}?i=-flerex-linkedaccounts-ucp-main_module&mode=link">
<i class="icon fa-user-secret fa-fw" aria-hidden="true"></i><span>{{ lang('LINKING_ACCOUNT') }}</span></a>
</li>
{% endif %}
'S_USE_LINKACCOUNT' => $auth->acl_get('u_link_accounts'),
in the main_listener.php again.{% if switchable_account %}
means if you have an account link setup. {% if S_USER_HAS_PERMISSION_TO_USE_LINKED_ACCOUNTS %}
working. <-- just playing with words there.Permissions are good because as the end user you're able to set them according to whatever you think it's ideal for your forum. However, permissions are set to yes for all users by default because it's the expected behavior when you install the extension. When you click the “install” button you, as the user of the extension, expect something to happen, which in my opinion is having it enabled for everybody.
U_CAN_LINK_ACCOUNT
variable, which is a boolean value that represents whether the user has linking permissions. This should be useful for what you are trying to accomplish.Code: Select all
Unknown Server Error
»/ Switchaccount / 93
That actually looks quite nice. Gratz!
Have you tried the extension on a brand new phpBB installation? I have never been able to replicate your problem. Maybe nou nou is right and there's another extension causing this problem. It could also be that you haven't set up theFroddelaar wrote: ↑Tue Apr 17, 2018 5:46 pm I still have the unknown server error when switching account ..
Error log:
Code: Select all
Unknown Server Error »/ Switchaccount / 93
.htaccess
file correctly and you have hidden app.php
in custom URLs.Hey nou nou, I actually got rid of the
{% else %}
statement and have that ucp link showing under my linked accounts.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 }}">
{% 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">
<i class="icon fa-user-secret fa-fw" aria-hidden="true"></i><span>{{ lang('LINKING_ACCOUNT') }}</span></a>
</li>
{% endif %}
Yeah I'm quoting myself again. I'm just that stupidFroddelaar wrote: ↑Tue Apr 17, 2018 5:46 pm I still have the unknown server error when switching account ..
Error log:
Code: Select all
Unknown Server Error »/ Switchaccount / 93
Accounts switched successfuly.
instead of the errorDo you have any other extension installed? Doesn't look like it comes from Linked Accounts. Try disabling all extensions but Linked Accounts to see if it's still happening.Sir Scrambledeggs wrote: ↑Mon May 21, 2018 7:23 pm Hello!
First of all thanks for the great extension. Unfortunately I have a bug in the SQL:
SQL ERROR [ mysqli ]
Unknown column 'testuser' in 'where clause' [1054]
Can you help me?
Many thanks!
I think the SQL syntax is wrong. Instead of:SQL ERROR [ mysqli ]
Unknown column 'vagabund' in 'where clause' [1054]
SQL
SELECT user_id, username, username_clean, user_colour FROM phpbb_users WHERE username_clean = vagabund
BACKTRACE
SELECT user_id, username, username_clean, user_colour FROM phpbb_users WHERE username_clean = testuser
SELECT user_id, username, username_clean, user_colour FROM phpbb_users WHERE username_clean = 'testuser'