Announcement

  •  » Engine
  •  » [resolved] Smarty function to detect user's groups?

#1 2018-03-21 01:07:27

TallGuysFree
Member
2017-11-10
10

[resolved] Smarty function to detect user's groups?

Hi!

I apologize if this is not the correct subforum to post in.

I'm curious if there's any way to check if the current visitor is part of a group using Smarty. I know there is {$U_ADMIN] and {$U_GUEST}, but is it possible to check if the visitor is part of a certain group, or has a certain attribute? I want to show content differently based upon user group.

Piwigo version: unsure - latest.
Piwigo URL: https://tallguysfree.com / https://tallguysfree.com/index.amp

Thank you in advance.

Offline

 

#2 2018-03-21 06:21:57

samwilson
Member
Fremantle, Western Australia
2014-02-06
42

Re: [resolved] Smarty function to detect user's groups?

I think you just have to set your own template variable, and do any checking required in PHP. (But I'm not the full bottle on Smarty by a long shot.)

Offline

 

#3 2018-03-25 20:43:23

TallGuysFree
Member
2017-11-10
10

Re: [resolved] Smarty function to detect user's groups?

Sorry if it's common sense, but how can I set a template variable without the risk of the file being overridden by Piwigo on update? Thanks!

Offline

 

#4 2018-03-25 21:01:04

flop25
Piwigo Team
2006-07-06
7037

Re: [resolved] Smarty function to detect user's groups?

in a custom plugin or theme


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 
  •  » Engine
  •  » [resolved] Smarty function to detect user's groups?

Board footer

Powered by FluxBB

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