Jump to content

Pilot login/logout and admin buttons


CapitalConnectVirtualGroup

Recommended Posts

Hey guys,

So I'm new to skinning, and am basically needing assitance! Can anybody tell me the code/provide me with a snippet for the login link? I've got a screenshot to put it into context - basically, if pilot is logged out, display login button, if logged in display logout button etc etc.

I assume the principle for an Admin Centre Link is the same too..

snippet.png

I've already added the buttons, I'm working on menu bar before I add it to the main "template" file as I always do, hence the lack of a detailed screenie!

Thanks in advance!

Regards,

Damon

Link to comment
Share on other sites

But with that added I get Parse error: syntax error, unexpected '<' in /home/ccvgnet/public_html/pilots/lib/skins/iceair/layout.php on line 58

even though the only < is the <li> and <a href="..."> blah blah blah

EDIT: Fixed by using

<?php

if(Auth::LoggedIn())    {
echo '<li><a href="http://pilots.ccvg.net/index.php/Login/logout"/>Log Out</a></li>';
}
else   {
echo '<li><a href="http://pilots.ccvg.net/index.php/Login">Login</a></li>';
echo '<li><a href="http://pilots.ccvg.net/index.php/Registration/">Join Us</a></li>';
}
?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...