BBuchanan Posted May 3, 2011 Report Share Posted May 3, 2011 Everytime I try to move the <?php if(!Auth::LoggedIn()) { // Show these if they haven't logged in yet ?> <li><a href="<?php echo url('/login'); ?>">Login</a></li> <li><a href="<?php echo url('/registration'); ?>">Register</a></li> <?php } else { // Show these items only if they are logged in ?> <li><a href="<?php echo url('/profile'); ?>">Pilot Center</a></li> <?php } ?> I get: Parse error: parse error in .....\core_navigation.tpl on line 113 which is <?php } ?> Which, if I remove said line, I get it at line 111, which of course is the end of the file. I want to move it below the main navigation, ie. Home, Pilots, Live Map, etc Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted May 3, 2011 Administrators Report Share Posted May 3, 2011 You may be putting it in between existing php tags, or there is an extra, or a missing curly brace somewhere. Quote Link to comment Share on other sites More sharing options...
BBuchanan Posted May 9, 2011 Author Report Share Posted May 9, 2011 Would someone be kind enough, to help me out. All my tries to move: <?php if(!Auth::LoggedIn()) { // Show these if they haven't logged in yet ?> <a href="<?php echo url('/login'); ?>">Login</a> <a href="<?php echo url('/registration'); ?>">Register</a> has all ended up the same way. I even checked the documents and started with a blank layout.tpl file (the example listed there). This way I'd know that it wasn't another file that might have been causing it. Well, at least not from the layout. What I'm looking to do, is have the navigation as: Home Pilots Live Map (space for skin) Login (or if already logged in, the other stuff) Register Quote Link to comment Share on other sites More sharing options...
BBuchanan Posted May 9, 2011 Author Report Share Posted May 9, 2011 Haha, found that this works (yes, I stripped it) removed: <li></li> this way I could see only the php coding, then my outcome to get it arranged: <a href="<?php echo url('/'); ?>">home</a> <a href="<?php echo url('/acars') ?>">Live Map</a> <?php echo $MODULE_NAV_INC;?> <?php if(!Auth::LoggedIn()) { // Show these if they haven't logged in yet ?> <a href="<?php echo url('/login'); ?>">Login</a> <a href="<?php echo url('/registration'); ?>">Register</a> <?php } else { // Show these items only if they are logged in ?> <a href="<?php echo url('/profile'); ?>">Pilot Center</a> <?php } ?> <?php if(Auth::LoggedIn()) { if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { echo '<a href="'.fileurl('/admin').'">Admin Center</a>'; } ?> <a href="<?php echo url('/logout'); ?>">Log Out</a> <?php } ?> Quote Link to comment Share on other sites More sharing options...
BBuchanan Posted May 9, 2011 Author Report Share Posted May 9, 2011 Guess the next thing to ask is, what is: <?php echo $page_content; ?> How does that differ from running the news? (by the way, I don't even know the code to pull the news) Quote Link to comment Share on other sites More sharing options...
Jeff Posted May 10, 2011 Report Share Posted May 10, 2011 Guess the next thing to ask is, what is: <?php echo $page_content; ?> How does that differ from running the news? (by the way, I don't even know the code to pull the news) This will show the news on any page you place this code. If you want to show more or less than 5 at a time, just change the number to any one you want. <?php // Show the News module, call the function ShowNewsFront // This is in the modules/Frontpage folder MainController::Run('News', 'ShowNewsFront', 5); ?> Quote Link to comment Share on other sites More sharing options...
BBuchanan Posted May 10, 2011 Author Report Share Posted May 10, 2011 This will show the news on any page you place this code. If you want to show more or less than 5 at a time, just change the number to any one you want. <?php // Show the News module, call the function ShowNewsFront // This is in the modules/Frontpage folder MainController::Run('News', 'ShowNewsFront', 5); ?> Thanks Jeff! Quote Link to comment Share on other sites More sharing options...
Jeff Posted May 10, 2011 Report Share Posted May 10, 2011 (edited) Thanks Jeff! No problem, and I forgot to answer your first question. <?php echo $page_content; ?> This code is what pulls all the information for the page (what is supposed to be shown on the page (layout excluded)) Edited for typo. Edited May 10, 2011 by Jeff Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.