If Statements

Support for mods released by phpbbmodders.net found at either https://github.com/phpbbmodders/ or the MODDB at http://www.phpbb.com
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
ThE KuKa_2
New member
New member
Posts: 6
Joined: 12 Aug 2012, 22:11
[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: If Statements

Postby ThE KuKa_2 » 18 Apr 2013, 09:28


ThE KuKa_2
New member
New member
Posts: 6
Joined: 12 Aug 2012, 22:11
[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: If Statements

Postby ThE KuKa_2 » 18 Apr 2013, 09:54


Seeeeler
New member
New member
Posts: 6
Joined: 04 May 2012, 20:30
[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: If Statements

Postby Seeeeler » 28 Apr 2014, 22:13

Hi guys,

What is the IF statement for own self or a user who views his own self?

Lets say, I have warning and ban mod which shows warning and ban info on viewtopic and profile. I want warning to be shown only for the user who has the warning and of course mods and admins can see too, I tried, It works for admin and mod but does not work for the user since in don't know the IF statement for ownself

User avatar
Sniper_E
MOD Team
MOD Team
Posts: 591
Joined: 13 Jun 2011, 16:53
Location: Shreveport, LA
Contact:

Re: If Statements

Postby Sniper_E » 28 Apr 2014, 23:02

For the viewtopic page:
<!-- IF U_ACP or U_MCP or postrow.POST_AUTHOR == S_USERNAME -->show acp, mcp and that poster this warning<!-- ENDIF -->

For the profile page:
<!-- IF U_ACP or U_MCP or USERNAME == S_USERNAME -->show acp, mcp and that user this warning<!-- ENDIF -->

I'm just guessing...
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™

Seeeeler
New member
New member
Posts: 6
Joined: 04 May 2012, 20:30
[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: If Statements

Postby Seeeeler » 28 Apr 2014, 23:51

wow, it worked

Thank you so much Sniper_E

Truth
I've Been Banned!!!
Posts: 9
Joined: 31 Dec 2014, 06:36
[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: If Statements

Postby Truth » 17 Jan 2015, 17:24

Nice! Great source of info thanks!


[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

Return to “Modders MOD support”

Who is online

Users browsing this forum: No registered users and 24 guests