If Statements
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
-
- New member
- Posts: 8
- Joined: 13 Jul 2012, 05:26
- Location: United Stated
Re: If Statements
oh thank you so much for this guide!
i have been trying to figure out how to make it so some new buttons on my header were only visible to members. this helps a ton!
[ Post made via Android ] [img]http://www.rmcgirr83.org/images/mobile/Android.png[/img]
i have been trying to figure out how to make it so some new buttons on my header were only visible to members. this helps a ton!
[ Post made via Android ] [img]http://www.rmcgirr83.org/images/mobile/Android.png[/img]
Re: If Statements
i've had a doubt about this, how is the correct way to add a IF statement for two forum pages
i've tried this: <!-- IF SCRIPT_NAME == 'index' or SCRIPT_NAME == 'viewtopic' -->some content<!-- ENDIF -->
but i thought i could make it shorter and try this: <!-- IF SCRIPT_NAME == ('posting' or 'viewtopic') -->some content<!-- ENDIF --> but it doesn't seem to work i still see the code in the index page.
or is it " or ' i've tried my first example and it works!
sorry for so many questions in one, but i think i might not be the only one...... or maybe i am.
i've tried this: <!-- IF SCRIPT_NAME == 'index' or SCRIPT_NAME == 'viewtopic' -->some content<!-- ENDIF -->
but i thought i could make it shorter and try this: <!-- IF SCRIPT_NAME == ('posting' or 'viewtopic') -->some content<!-- ENDIF --> but it doesn't seem to work i still see the code in the index page.
or is it " or ' i've tried my first example and it works!
sorry for so many questions in one, but i think i might not be the only one...... or maybe i am.
Re: If Statements
Is there any statement for groups?
For example: if is_newly_registered_user?
Edit: Found it: <!-- IF GROUP_ID eq number --><!-- ENDIF -->
For example: if is_newly_registered_user?
Edit: Found it: <!-- IF GROUP_ID eq number --><!-- ENDIF -->
Re: If Statements
Don't miss [url=http://RMcGirr83.org/viewtopic.php?p=308#p308]this page[/url]
[ Post made via Android ] [img]http://www.rmcgirr83.org/images/mobile/Android.png[/img]
[ Post made via Android ] [img]http://www.rmcgirr83.org/images/mobile/Android.png[/img]
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™
Re: If Statements
great stuff including Sniper's LINK above
I'm a bit baffled by this one, I assume bot= googlebot, yahoobot - all those? in which case why would an admin want to stop a googlebot, yahoobot ? :call:
<!-- IF S_REGISTERED_USER --> If user is logged in and not a bot
I'm a bit baffled by this one, I assume bot= googlebot, yahoobot - all those? in which case why would an admin want to stop a googlebot, yahoobot ? :call:
Re: If Statements
because even though you may have a forum or a section to be able to be seen by bots, there are certain areas, specially a link to a custom page or other custom stuff that you don't want a bot to see then you would use that statement for that!
Re: If Statements
Hi
Can anyone please check for me to see this is correct code ?
I just feel it not right and if it wrong how do a correct it ?
Thanks
Can anyone please check for me to see this is correct code ?
Code: Select all
<div id="mchatpage_h" class="<!-- IF S_ENABLE_SNOW -->forabg2<!-- ELSE -->forabg<!-- ENDIF -->" style="display: none">
I just feel it not right and if it wrong how do a correct it ?
Thanks
Re: If Statements
What is mchatpage_h and S_ENABLE_SNOW?
Re: If Statements
I do know that the snow command normally causes the pages to jump for some reason. Smashable Lights is a better way to go.
Re: If Statements
Love smashable lights. Turning mine on Friday AM!
Re: If Statements
WaGuns wrote:Love smashable lights. Turning mine on Friday AM!
Me too!
Re: If Statements
Ooopsie wrote:WaGuns wrote:Love smashable lights. Turning mine on Friday AM!
Me too!
Each to his own I guess. Don't like the smashable lights. I'd rather have light falling snow with a pile of snow laying on top of the letters of my logo image. Maybe a Christmas tree with presents under it nested somewhere in the page. Hmmm, I need to work on that when I get home.
[ Post made via Android ] [img]http://www.rmcgirr83.org/images/mobile/Android.png[/img]
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™
Re: If Statements
RMcGirr83 wrote:What is mchatpage_h and S_ENABLE_SNOW?
It's a Snow Effect mod that when I enable the mod it changes the forum background
No body says the code is wrong so I assume the code is fine. However after added the if statement the words style="display: none"> turn in black color on notepad ++ then I thought I doing in wrong
Last edited by kevinviet on 20 Nov 2012, 17:40, edited 1 time in total.
Re: If Statements
There is nothing wrong with the code...that's just the way notepad++ works.
Re: If Statements
Thanks Rich, I feel more confident now.