2 Replies - 1860 Views - Last Post: 26 May 2011 - 12:28 AM

#1 KlayDetailing  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 2
  • Joined: 08-May 11

turn on and off user interface

Posted 08 May 2011 - 07:13 AM

Hello everyone, this is my first post here, I am getting together a new website as a side part for a car detailing business that I am slowly getting off it's feet. I am very much a noob when it comes to coding, I seem to have an understanding of html and css, but unfortunately it pretty much ends there. My problem is this, before I start rambling too much, I am trying to set up my website so then when a guest is on they get to see a basic layout and when they become a memeber/user then more buttons open up to them. I understand that the easiest way to do is to use php coding with if and else statements, my biggest problem is my lack of knowledge with using this part of code, I can't seem to stumble my way through it. I hope my understanding is pretty spot on so i'll write up a bit of code and see what everyone thinks

<?php
          if ($user) = true
          include ("headerlogin.php") true;
          else
          if ($user) = false
          include ("headerlogin.php") false
?>



I know that this is wrong and you all get to see how bad I am at coding with if and else statements but I am hoping that I am on the right track, any help with this would be greatly appreciated. I also hope that making another php file to call upon the buttons was a smarter choice than just writing it up in a div tag to be called upon.

This is what I have up and running on my site at the moment which has allowed me to do the visual layout of the user buttons, but it isn't working how I would like.
<?php
        if ($forum_user_online['user_id'] > 
        include("headerlogin.php"));
?>



so for a rough overview if I have confused the hell out of you all

when a user is logged in there are more buttons that pop up on the screen
when a user is not logged in there is only a login button

Thank you for any and all of your help
oh yeah the site is KlayDetailing if you want to see what I'm doing and get a scope on what I am trying to achieve

Is This A Good Question/Topic? 0
  • +

Replies To: turn on and off user interface

#2 KlayDetailing  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 2
  • Joined: 08-May 11

Re: turn on and off user interface

Posted 12 May 2011 - 02:17 AM

View PostKlayDetailing, on 09 May 2011 - 12:43 AM, said:

Hello everyone, this is my first post here, I am getting together a new website as a side part for a car detailing business that I am slowly getting off it's feet. I am very much a noob when it comes to coding, I seem to have an understanding of html and css, but unfortunately it pretty much ends there. My problem is this, before I start rambling too much, I am trying to set up my website so then when a guest is on they get to see a basic layout and when they become a memeber/user then more buttons open up to them. I understand that the easiest way to do is to use php coding with if and else statements, my biggest problem is my lack of knowledge with using this part of code, I can't seem to stumble my way through it. I hope my understanding is pretty spot on so i'll write up a bit of code and see what everyone thinks

<?php
          if ($user) = true
          include ("headerlogin.php") true;
          else
          if ($user) = false
          include ("headerlogin.php") false
?>



I know that this is wrong and you all get to see how bad I am at coding with if and else statements but I am hoping that I am on the right track, any help with this would be greatly appreciated. I also hope that making another php file to call upon the buttons was a smarter choice than just writing it up in a div tag to be called upon.

This is what I have up and running on my site at the moment which has allowed me to do the visual layout of the user buttons, but it isn't working how I would like.
<?php
        if ($forum_user_online['user_id'] > 
        include("headerlogin.php"));
?>



so for a rough overview if I have confused the hell out of you all

when a user is logged in there are more buttons that pop up on the screen
when a user is not logged in there is only a login button

Thank you for any and all of your help
oh yeah the site is KlayDetailing if you want to see what I'm doing and get a scope on what I am trying to achieve


It's ok peeps I have managed to find the answer on a blog site through a good friend of mine. It works a charm the best thing that I can suggest is to make another php file and if you are pedantic with making things easy to find (like I am) a css file as well that controls it you can use this code and you'll be able to have buttons appear if a person is logged into your wordpress site, and have them not appear if they are not logged in

<?php if (is_user_logged_in() )  //only logged in user can see this 
        include("yourfilename.php");   
?>



it is really useful especially for those that want to add more for the members of your site vs a guest. Also I have come across a fantastic plugin if you want to run a Membership site I got it from Here if you install it then go to the video's you'll get a grasp on how powerful this plugin really is .... I take my hat off to the guy who coded this.

I hope that this helps anyone who would like to do anything with membership sites and adding more flexibility to their members over their guests
Was This Post Helpful? 1
  • +
  • -

#3 calebjonasson  Icon User is offline

  • $bert = new DragonUnicorn(); $bert->rawr();
  • member icon

Reputation: 209
  • View blog
  • Posts: 989
  • Joined: 28-February 09

Re: turn on and off user interface

Posted 26 May 2011 - 12:28 AM

Thank you for posting a second reply telling users how you managed to solve your problem!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1