Template variable for checking group membership
Forum rules
Please only request support for mods released by phpbbmodders.net found at either https://github.com/phpbbmodders/ or the MODDB at http://www.phpbb.com
Please only request support for mods released by phpbbmodders.net found at either https://github.com/phpbbmodders/ or the MODDB at http://www.phpbb.com
- RMcGirr83
- Past Contributor
- Posts: 6243
- Joined: 30 Nov 2006, 14:23
- Real name: Rich McGirr [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Template variable for checking group membership
Last edited by RMcGirr83 on 13 Jan 2015, 00:00, edited 9 times in total.
Reason: fixed code if not in group
Reason: fixed code if not in group
Re: Template variable for checking group membership
Wow, I asked about this exact thing on the phpbb board a few years ago and never really got a good answer. And here you are with a mod to do the very thing..
Thank you very much!
Thank you very much!
Re: Template variable for checking group membership
I've been Googling for just this sort of MOD - BUT (sorry - there's always a but...) could this be incorporated into a BBcode that would do either of the following?
Either display some text if the condition is true or grayed if false
or
Show text if true or hide text if false
(the BBcode can do one or the other - it doesnt have to offer both within the same tag)
I want to be able to post a topic 'common' to several groups but mask or differentiate text to members of certain groups,
Either display some text if the condition is true or grayed if false
or
Show text if true or hide text if false
(the BBcode can do one or the other - it doesnt have to offer both within the same tag)
I want to be able to post a topic 'common' to several groups but mask or differentiate text to members of certain groups,
- RMcGirr83
- Past Contributor
- Posts: 6243
- Joined: 30 Nov 2006, 14:23
- Real name: Rich McGirr [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Template variable for checking group membership
No you can't pass IF statements within custom bbcode tags.
-
- New member
- Posts: 4
- Joined: 17 May 2010, 11:24
- [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Template variable for checking group membership
YOU ARE THE BEST !
Very thank you !
Very thank you !
- RMcGirr83
- Past Contributor
- Posts: 6243
- Joined: 30 Nov 2006, 14:23
- Real name: Rich McGirr [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Template variable for checking group membership
You're very welcome.
-
- New member
- Posts: 1
- Joined: 30 Jun 2011, 10:14
- [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Template variable for checking group membership
Hello, I am trying to define the "Guests" group so that unregistered guest will be able to view the members list and forums but would not be able to click the member names which would lead to profile view.
I've tried to put this
$_profile_cache['tpl_profile'] = '<!-- IF not S_GROUP_1 --><a href="{PROFILE_URL}" target="_blank">{USERNAME}</a><!-- ELSE -->{USERNAME}<!-- ENDIF -->';
in functions_content.php and it is not working. Can anyone here help me please? Thank you very much!
I've tried to put this
$_profile_cache['tpl_profile'] = '<!-- IF not S_GROUP_1 --><a href="{PROFILE_URL}" target="_blank">{USERNAME}</a><!-- ELSE -->{USERNAME}<!-- ENDIF -->';
in functions_content.php and it is not working. Can anyone here help me please? Thank you very much!
-
- New member
- Posts: 35
- Joined: 01 Aug 2009, 23:02
- Location: Falmouth, Cornwall, UK [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Template variable for checking group membership
this is a great snippet, thanks Rich
Kind Regards,
-Ashley.S. [ Moderator ]
-Ashley.S. [ Moderator ]
- RMcGirr83
- Past Contributor
- Posts: 6243
- Joined: 30 Nov 2006, 14:23
- Real name: Rich McGirr [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Template variable for checking group membership
If you became a donor you could get the hook file which does the same thing but you don't have to edit any php file.
-
- New member
- Posts: 35
- Joined: 01 Aug 2009, 23:02
- Location: Falmouth, Cornwall, UK [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Template variable for checking group membership
Kind Regards,
-Ashley.S. [ Moderator ]
-Ashley.S. [ Moderator ]
Return to “Modders MOD support”
Who is online
Users browsing this forum: Ahrefs [Bot], Yandex [Bot] and 38 guests