Post by Teg on Nov 28, 2015 18:27:08 GMT -8
hogwartsexp.boards.net/page/home
So, for custom page above, I have the following code:
The issue that I'm having is centered around this portion of the code:
Regardless if a user is placed into group specified by the group ids above, or not, the Gryffindor Common room one is displayed. As an example, the admin account (group 1) that's not in any other group aside from the admin group, or headmaster group, is getting the Gryffindor Common Room link.
So, can someone help me figure out what's going on and why this isn't working correctly? I've tried placing myself in other groups, and it's just not changing no matter what I do.
So, for custom page above, I have the following code:
<div class="homeSide">
<h1>Welcome to Hogwarts Express!</h1>
<h2>Getting Started</h2>
{if $[current_user.is_member]}
<ul>
<li><a href="#" title="What is Hogwarts Express?">About Us</a></li>
<li><a href="#" title="Our site's staff">Our Staff Team</a></li>
<li><a href="#" title="Site-Wide Rules & Guide">Site-Wide Rules & Guide</a></li>
<li><a href="#" title="Campus Life">Campus Life</a></li>
<li><a href="#" title="Get Sorted into your Hogwarts Express House">The Sorting Hat</a></li>
</ul>
<h2>Student Center</h2>
<ul>
<!--#####Common Rooms#####-->
{if $[current_user.group.id] = 4}
<li><a href="#" title="Gryffindor Common Room">Gryffindor Common Room</a></li>
{elseif $[current_user.group.id] = 5}
<li><a href="#" title="Slytherin Common Room">Slytherin Common Room</a></li>
{elseif $[current_user.group.id] = 6}
<li><a href="#" title="Hufflepuff Common Room">Hufflepuff Common Room</a></li>
{elseif $[current_user.group.id] = 7}
<li><a href="#" title="Ravenclaw Common Room">Ravenclaw Common Room</a></li>
{else}
<li><a href="#" title="Get Sorted into your Hogwarts Express House">Get Sorted</a></li>
{/if}
<!--End Common Rooms-->
{if $[current_user.group.id] = 1 || $[current_user.group.id] = 8}
<li><a href="#" title="All Classes">All Hogwarts Classes</a></li>
{elseif $[current_user.group.id] = 9}
<li><a href="#" title="Your Classes">Your Current Classes</a></li>
{else}
<li><a href="#" title="First Year student registration">First Year Class Registration</a></li>
{/if}
<li><a href="#" title="Library Containing text books for first year students">Text-Book Library</a></li>
</ul>
{/if}
</div>
<div class="clear both"> </div>
<div class="homeMain">
$[zone_1]
</div>
The issue that I'm having is centered around this portion of the code:
<!--#####Common Rooms#####-->
{if $[current_user.group.id] = 4}
<li><a href="#" title="Gryffindor Common Room">Gryffindor Common Room</a></li>
{elseif $[current_user.group.id] = 5}
<li><a href="#" title="Slytherin Common Room">Slytherin Common Room</a></li>
{elseif $[current_user.group.id] = 6}
<li><a href="#" title="Hufflepuff Common Room">Hufflepuff Common Room</a></li>
{elseif $[current_user.group.id] = 7}
<li><a href="#" title="Ravenclaw Common Room">Ravenclaw Common Room</a></li>
{else}
<li><a href="#" title="Get Sorted into your Hogwarts Express House">Get Sorted</a></li>
{/if}
<!--End Common Rooms-->
Regardless if a user is placed into group specified by the group ids above, or not, the Gryffindor Common room one is displayed. As an example, the admin account (group 1) that's not in any other group aside from the admin group, or headmaster group, is getting the Gryffindor Common Room link.
So, can someone help me figure out what's going on and why this isn't working correctly? I've tried placing myself in other groups, and it's just not changing no matter what I do.