Announcement

#1 2021-01-27 14:34:48

Karol
Member
2021-01-27
1

Smart Pocket template, no user login button

Hi,

What should be changed (configured) in the Smart Pocket template so that when visiting the gallery page via a browser, users can see the login button (most galleries are available after logging in)?

Piwigo 11.1.0

Piwigo URL: https://galeria.piatkowscy.pl/

Offline

 

#2 2021-02-03 11:12:13

TOnin
Member
1970-01-01
106

Re: Smart Pocket template, no user login button

Hi,
I have seen your home page:
- with a PC, there is a login link at the top right corner (not smartpocket template);
- with a smartphone, the login link is to find in the top right menubar (smartpocket template).
Menubar > Uprawnienia > Logowanie

You want to display a more visible login link, but I don't see any settings to make it possible.

Idea #1
If you feel confortable with writing some code, you can edit template code in order to display a login link right after link to close menubar X:
In file (piwigo)/themes/smartpocket/template/menubar.tpl
after line 2

Code:

<li data-icon="delete"><a href="#menubar" data-rel="close">{'Close'|@translate}</a></li>

before line 3

Code:

</ul>

insert line

Code:

{if isset($U_LOGIN)}<li><a href="{$U_LOGIN}">{'Login'|@translate}</a></li>{/if}

PS : I've got inspired by file (piwigo)/themes/smartpocket/template/menubar_identification.tpl


Idea #2
In order to redirect to identification.php page any guest user, it is possible to craft a minimal extension with this code inside main.inc.php:

Code:

if (is_a_guest())
{
    redirect(get_root_url().'identification.php');
}

Offline

 

#3 2021-02-05 17:11:29

TOnin
Member
1970-01-01
106

Re: Smart Pocket template, no user login button

Idea #3
You may try this setting from local/config which makes landing page a prompt for login.
It forces login for any template before entering gallery.
https://piwigo.org/forum/viewtopic.php? … 63#p179663

This replaces Idea #2

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact