Jump to content

Recommended Posts

Posted

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

  • Moderators
Posted

Or even:

<?php
if(Auth::LoggedIn() && PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN))
{
 echo '<li><a href="'.fileurl('/admin').'">Admin Center</a></li>';
}
?>

:)

  • Like 1
Posted

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>';
}
?>

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...