Jump to content

Is there something wrong with this code?


Kyle

Recommended Posts

  • Moderators

Hi, I am making a new menu bar which it looks like this on the picture and i get the following error, on Parse error: syntax error, unexpected $end in /home/flycsunc/public_html/csunmodtester/core/templates/core_navigation.tpl on line 44

and heres my code

<p>
  <style media="all" type="text/css">
@import "/menu/menu_style.css";
  </style>
<ul>
  <li><a href="<?php echo url('/'); ?>" target="_self" >Home</a></li>
  <?php
if(!Auth::LoggedIn())
{
// Show these if they haven't logged in yet
?>
  <li><a href="<?php echo url('/login'); ?>" target="_self" >Login</a></li>
  <li><a href="<?php echo url('/registration'); ?>" target="_self" >Register</a> </li>
  <?php
}
else
{
// Show these items only if they are logged in
?>
  <li><a href="<?php echo url('/profile'); ?>" target="_self" >Pilot Center</a>
    <ul>
      <li><a href="<?php echo url('/Mail'); ?>" target="_self">AirMail</a></li>
      <li><a href="<?php echo url('/Forum'); ?>" target="_self">Forums </a></li>
      <li><a href="" target="_self">View Flight Schedules</a></li>
      <li><a href="" target="_self">View Your Flight Bids</a></li>
    </ul>
  </li>
  <li><a href="<?php echo url('/pilots'); ?>" target="_self" >Pilots</a> </li>
  <li><a href="<?php echo url('/acars') ?>" target="_self" >Live Map</a></li>
  <?php echo $MODULE_NAV_INC;?>
  <?php
if(Auth::LoggedIn())
{
if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN))
{
	echo '<li><a href="'.fileurl('/admin').'">Admin Center</a></li>';
}
?>


<li><a href="<?php echo url('/logout'); ?>" target="_self" >Log Out</a> </li>
<?php
}
?>

Thats what i am getting, i dobule check it everything.

Link to comment
Share on other sites

  • Administrators

Looks like you erased a closing bracket at line 27-28. Find


</li>
<li><a href="<?php echo url('/pilots'); ?>" target="_self" >Pilots</a> </li>

and change it to

</li>
<?php
}
?>
<li><a href="<?php echo url('/pilots'); ?>" target="_self" >Pilots</a> </li>

Link to comment
Share on other sites

  • Administrators

nope doesn't work, the following error is

Parse error: syntax error, unexpected $end in /home/flycsunc/public_html/csunmodtester/core/templates/core_navigation.tpl on line 44

Check it again - when I change it as shown it clears the error in the page here on my development server.

Link to comment
Share on other sites

  • Administrators

k it works but the new menu is not showing

You have some html errors as well, but I am not sure what menu or code you are using. IThe one thing that jumps out at me is the unordered list you start at line 5 "<ul>". It never gets closed. That may be part of the menu issue.

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