Articles Hierarchy
Show Content by Default User Groups
- 12 Oct 2008
- Tutorials
- 9719 Reads
- 0 Comments
To start out easy ill show you how to display a message to guests only.
First we will define which group we want to show content to, which is guests.
<?php if (iGUEST)
Next we will add the php echo to the code to show specified text to guests. For example ill choose Hi Guest!.
<?php if (iGUEST) echo"Hi Guest!"
Lastly dont forget to add the php ending tag.
<?php if (iGUEST) echo"Hi Guest!" ?>
---------------------------------------------------
If you wanted to show content to members and admins you would change the (iGUEST) to (iMEMBER). If you only wanted something to display to admins you would change the (iGUEST) to (iADMIN).
---------------------------------------------------
And of course you can change the Hi Guest! to whatever you want to display to that group.
---------------------------------------------------
There are a few other things that can be added like the php else, but i dont want to confuse you with all that other messy coding at the moment.
Written by Brandon
First we will define which group we want to show content to, which is guests.
<?php if (iGUEST)
Next we will add the php echo to the code to show specified text to guests. For example ill choose Hi Guest!.
<?php if (iGUEST) echo"Hi Guest!"
Lastly dont forget to add the php ending tag.
<?php if (iGUEST) echo"Hi Guest!" ?>
---------------------------------------------------
If you wanted to show content to members and admins you would change the (iGUEST) to (iMEMBER). If you only wanted something to display to admins you would change the (iGUEST) to (iADMIN).
---------------------------------------------------
And of course you can change the Hi Guest! to whatever you want to display to that group.
---------------------------------------------------
There are a few other things that can be added like the php else, but i dont want to confuse you with all that other messy coding at the moment.
Written by Brandon
Post Comment
Please Login to Post a Comment.
Ratings


Information
Resources
Submit





