Quite easy using the Group Template Variables extension (Guest are not logged in).SAGOnly wrote: Tue Dec 03, 2024 4:13 pm Hello, can you please advise me what should be the entry write in the file "navbar_header.html", which would show the quick links only to logged in users, but not to visitors ? Thank you for your help, sincerely Scott
quicklinks.png
Code: Select all
<!-- IF S_DISPLAY_SEARCH -->
Code: Select all
<!-- IF not S_IS_BOT and (S_DISPLAY_MEMBERLIST or U_TEAM) -->
Hi, thank you for help. I've tried this in both the theme prosilver and the theme I use (HexagonRebornLight). I deleted all cookies, cleared the temporary cache, but it doesn't work.
temporary cache? Do you mean board cache, browser cache or both (the latter being the the most complete.SAGOnly wrote: Tue Dec 03, 2024 8:12 pm ...
I've tried this in both the theme prosilver and the theme I use (HexagonRebornLight). I deleted all cookies, cleared the temporary cache, but it doesn't work.
Hi, both caches. I cleared the browser cache and the board cache directly. I also had the navbar_header.html file in the theme prosilver and copied it directly into the theme I'm using. I also downloaded the 0.3.0 development version of the "Group Template Variables extension" from github, which should also work on phpbb 3.3.x, but even these writes to a file where I specify only selected groups do not work. It's also possible that I'm just doing something wrong.
<li id="quick-links" ... > ... </li>
element into {% if S_REGISTERED_USER %} ... {% endif %}
condition.Certainly
Code: Select all
<ul id="nav-main" class="nav-main linklist" role="menubar">
Code: Select all
{% if S_REGISTERED_USER %}
Code: Select all
</li>
Code: Select all
{% endif %}
This is the navbar_header.html that I have in the theme I usessl wrote: Wed Dec 04, 2024 6:56 amCertainly
The file modification is to be done in the style used for the board, we leave the prosilver style in its original state.
Can you provide us your modified file to see where the problem is coming from?
Code: Select all
<div class="navbar" role="navigation">
<div class="inner">
<ul id="nav-main" class="nav-main linklist" role="menubar">
<li id="quick-links" class="quick-links dropdown-container responsive-menu<!-- IF not S_DISPLAY_QUICK_LINKS and not S_DISPLAY_SEARCH --> hidden<!-- ENDIF -->" data-skip-responsive="true">
<a href="#" class="dropdown-trigger">
<i class="icon fa-bars fa-fw" aria-hidden="true"></i><span>{L_QUICK_LINKS}</span>
</a>
<div class="dropdown">
<div class="pointer"><div class="pointer-inner"></div></div>
<ul class="dropdown-contents" role="menu">
<!-- EVENT navbar_header_quick_links_before -->
<!-- IF S_DISPLAY_SEARCH -->
<li class="separator"></li>
<!-- IF S_REGISTERED_USER -->
<li>
<a href="{U_SEARCH_SELF}" role="menuitem">
<i class="icon fa-file-o fa-fw icon-gray" aria-hidden="true"></i><span>{L_SEARCH_SELF}</span>
</a>
</li>
<!-- ENDIF -->
<!-- IF S_USER_LOGGED_IN -->
<li>
<a href="{U_SEARCH_NEW}" role="menuitem">
<i class="icon fa-file-o fa-fw icon-red" aria-hidden="true"></i><span>{L_SEARCH_NEW}</span>
</a>
</li>
<!-- ENDIF -->
<!-- IF S_LOAD_UNREADS -->
<li>
<a href="{U_SEARCH_UNREAD}" role="menuitem">
<i class="icon fa-file-o fa-fw icon-red" aria-hidden="true"></i><span>{L_SEARCH_UNREAD}</span>
</a>
</li>
<!-- ENDIF -->
<li>
<a href="{U_SEARCH_UNANSWERED}" role="menuitem">
<i class="icon fa-file-o fa-fw icon-gray" aria-hidden="true"></i><span>{L_SEARCH_UNANSWERED}</span>
</a>
</li>
<li>
<a href="{U_SEARCH_ACTIVE_TOPICS}" role="menuitem">
<i class="icon fa-file-o fa-fw icon-blue" aria-hidden="true"></i><span>{L_SEARCH_ACTIVE_TOPICS}</span>
</a>
</li>
<li class="separator"></li>
<li>
<a href="{U_SEARCH}" role="menuitem">
<i class="icon fa-search fa-fw" aria-hidden="true"></i><span>{L_SEARCH}</span>
</a>
</li>
<!-- ENDIF -->
<!-- IF not S_IS_BOT and (S_DISPLAY_MEMBERLIST or U_TEAM) -->
<li class="separator"></li>
<!-- IF S_DISPLAY_MEMBERLIST -->
<li>
<a href="{U_MEMBERLIST}" role="menuitem">
<i class="icon fa-group fa-fw" aria-hidden="true"></i><span>{L_MEMBERLIST}</span>
</a>
</li>
<!-- ENDIF -->
<!-- IF U_TEAM -->
<li>
<a href="{U_TEAM}" role="menuitem">
<i class="icon fa-shield fa-fw" aria-hidden="true"></i><span>{L_THE_TEAM}</span>
</a>
</li>
<!-- ENDIF -->
<!-- ENDIF -->
<li class="separator"></li>
<!-- EVENT navbar_header_quick_links_after -->
</ul>
</div>
</li>
<!-- EVENT overall_header_navigation_prepend -->
<li <!-- IF not S_USER_LOGGED_IN -->data-skip-responsive="true"<!-- ELSE -->data-last-responsive="true"<!-- ENDIF -->>
<a href="{U_FAQ}" rel="help" title="{L_FAQ_EXPLAIN}" role="menuitem">
<i class="icon fa-question-circle fa-fw" aria-hidden="true"></i><span>{L_FAQ}</span>
</a>
</li>
<!-- EVENT overall_header_navigation_append -->
<!-- IF U_ACP -->
<li data-last-responsive="true">
<a href="{U_ACP}" title="{L_ACP}" role="menuitem">
<i class="icon fa-cogs fa-fw" aria-hidden="true"></i><span>{L_ACP_SHORT}</span>
</a>
</li>
<!-- ENDIF -->
<!-- IF U_MCP -->
<li data-last-responsive="true">
<a href="{U_MCP}" title="{L_MCP}" role="menuitem">
<i class="icon fa-gavel fa-fw" aria-hidden="true"></i><span>{L_MCP_SHORT}</span>
</a>
</li>
<!-- ENDIF -->
<!-- IF S_REGISTERED_USER -->
<!-- EVENT navbar_header_user_profile_prepend -->
<li id="username_logged_in" class="rightside <!-- IF CURRENT_USER_AVATAR --> no-bulletin<!-- ENDIF -->" data-skip-responsive="true">
<!-- EVENT navbar_header_username_prepend -->
<div class="header-profile dropdown-container">
<a href="{U_PROFILE}" class="header-avatar dropdown-trigger"><!-- IF CURRENT_USER_AVATAR -->{CURRENT_USER_AVATAR} <!-- ENDIF --> {CURRENT_USERNAME_SIMPLE}</a>
<div class="dropdown">
<div class="pointer"><div class="pointer-inner"></div></div>
<ul class="dropdown-contents" role="menu">
<!-- IF U_RESTORE_PERMISSIONS -->
<li>
<a href="{U_RESTORE_PERMISSIONS}">
<i class="icon fa-refresh fa-fw" aria-hidden="true"></i><span>{L_RESTORE_PERMISSIONS}</span>
</a>
</li>
<!-- ENDIF -->
<!-- EVENT navbar_header_profile_list_before -->
<li>
<a href="{U_PROFILE}" title="{L_PROFILE}" role="menuitem">
<i class="icon fa-sliders fa-fw" aria-hidden="true"></i><span>{L_PROFILE}</span>
</a>
</li>
<!-- IF U_USER_PROFILE -->
<li>
<a href="{U_USER_PROFILE}" title="{L_READ_PROFILE}" role="menuitem">
<i class="icon fa-user fa-fw" aria-hidden="true"></i><span>{L_READ_PROFILE}</span>
</a>
</li>
<!-- ENDIF -->
<!-- EVENT navbar_header_profile_list_after -->
<li class="separator"></li>
<li>
<a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x" role="menuitem">
<i class="icon fa-power-off fa-fw" aria-hidden="true"></i><span>{L_LOGIN_LOGOUT}</span>
</a>
</li>
</ul>
</div>
</div>
<!-- EVENT navbar_header_username_append -->
</li>
<!-- IF S_DISPLAY_PM -->
<li class="rightside" data-skip-responsive="true">
<a href="{U_PRIVATEMSGS}" role="menuitem">
<i class="icon fa-inbox fa-fw" aria-hidden="true"></i><span>{L_PRIVATE_MESSAGES} </span><strong class="badge<!-- IF not PRIVATE_MESSAGE_COUNT --> hidden<!-- ENDIF -->">{PRIVATE_MESSAGE_COUNT}</strong>
</a>
</li>
<!-- ENDIF -->
<!-- IF S_NOTIFICATIONS_DISPLAY -->
<li class="dropdown-container dropdown-{S_CONTENT_FLOW_END} rightside" data-skip-responsive="true">
<a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button" class="dropdown-trigger">
<i class="icon fa-bell fa-fw" aria-hidden="true"></i><span>{L_NOTIFICATIONS} </span><strong class="badge<!-- IF not NOTIFICATIONS_COUNT --> hidden<!-- ENDIF -->">{NOTIFICATIONS_COUNT}</strong>
</a>
<!-- INCLUDE notification_dropdown.html -->
</li>
<!-- ENDIF -->
<!-- EVENT navbar_header_user_profile_append -->
<!-- ELSE IF not S_IS_BOT -->
<li class="rightside" data-skip-responsive="true">
<a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x" role="menuitem">
<i class="icon fa-power-off fa-fw" aria-hidden="true"></i><span>{L_LOGIN_LOGOUT}</span>
</a>
</li>
<!-- IF S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) -->
<li class="rightside" data-skip-responsive="true">
<a href="{U_REGISTER}" role="menuitem">
<i class="icon fa-pencil-square-o fa-fw" aria-hidden="true"></i><span>{L_REGISTER}</span>
</a>
</li>
<!-- ENDIF -->
<!-- EVENT navbar_header_logged_out_content -->
<!-- ENDIF -->
</ul>
<ul id="nav-breadcrumbs" class="nav-breadcrumbs linklist navlinks" role="menubar">
{% set MICRODATA = 'itemtype="https://schema.org/ListItem" itemprop="itemListElement" itemscope' %}
{% set navlink_position = 1 %}
{% EVENT overall_header_breadcrumbs_before %}
<li class="breadcrumbs" itemscope itemtype="https://schema.org/BreadcrumbList">
{% if U_SITE_HOME %}
<span class="crumb" {{ MICRODATA }}><a itemprop="item" href="{{ U_SITE_HOME }}" data-navbar-reference="home"><i class="icon fa-home fa-fw" aria-hidden="true"></i><span itemprop="name">{{ L_SITE_HOME }}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
{% endif %}
{% EVENT overall_header_breadcrumb_prepend %}
<span class="crumb" {{ MICRODATA }}><a itemprop="item" href="{{ U_INDEX }}" accesskey="h" data-navbar-reference="index">{% if not U_SITE_HOME %}<i class="icon fa-home fa-fw"></i>{% endif %}<span itemprop="name">{{ L_INDEX }}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
{% for navlink in navlinks %}
{% set NAVLINK_NAME = navlink.BREADCRUMB_NAME | default(navlink.FORUM_NAME) %}
{% set NAVLINK_LINK = navlink.U_BREADCRUMB | default(navlink.U_VIEW_FORUM) %}
{% EVENT overall_header_navlink_prepend %}
<span class="crumb" {{ MICRODATA }}{% if navlink.MICRODATA %} {{ navlink.MICRODATA }}{% endif %}><a itemprop="item" href="{{ NAVLINK_LINK }}"><span itemprop="name">{{ NAVLINK_NAME }}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span>
{% EVENT overall_header_navlink_append %}
{% endfor %}
{% EVENT overall_header_breadcrumb_append %}
</li>
{% EVENT overall_header_breadcrumbs_after %}
{% if S_DISPLAY_SEARCH and not S_IN_SEARCH %}
<li class="rightside responsive-search">
<a href="{{ U_SEARCH }}" title="{{ lang('SEARCH_ADV_EXPLAIN') }}" role="menuitem">
<i class="icon fa-search fa-fw" aria-hidden="true"></i><span class="sr-only">{{ lang('SEARCH') }}</span>
</a>
</li>
{% endif %}
</ul>
</div>
</div>
I've tried it in both the theme prosilver and the theme I use, following your instructions exactly, it still doesn't work.thecoalman wrote: Wed Dec 04, 2024 11:12 am To elaborate on what rxu posted, open /styles/prosilver/template/navbar_header.html and at line 6 find:
After add:Code: Select all
<ul id="nav-main" class="nav-main linklist" role="menubar">
At line 78 find:Code: Select all
{% if S_REGISTERED_USER %}
After add:Code: Select all
</li>
Save and uplaod, purge phpBB's cache after uploading.Code: Select all
{% endif %}
Probably a typo by thecoalman : it's on line 4SAGOnly wrote: Wed Dec 04, 2024 3:36 pmthecoalman wrote: Wed Dec 04, 2024 11:12 am To elaborate on what rxu posted, open /styles/prosilver/template/navbar_header.html and at line 6 find:
Code: Select all
<ul id="nav-main" class="nav-main linklist" role="menubar">
./styles/HexagonReborn/template/navbar_main.html
, find (line 145)
Code: Select all
{% if S_DISPLAY_SEARCH %}
Code: Select all
{% if S_REGISTERED_USER %}
Hi, thanks a lot for the help, this procedure is already working properly, at the same time I managed to hide the FAQ section with this entry, and that's also great. Guests now see the top navbar only as follows... Thank you very much for your willingness. Best Regards, Scott