TAV1702 Posted December 19, 2009 Report Posted December 19, 2009 Looking to move my admin center link from main nav, to my footer. I robbed the code out of the core nav for the admin link and it gave me a parse error on site and messed up the entire layout. Here is the code I tried to use. <?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>'; } ?> I'm thinking I might just need to go with the following <?php if(Auth::LoggedIn()) { if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { echo '<li><a href="'.fileurl('/admin').'">Admin Center</a></li>'; } ?> Quote
Administrators Nabeel Posted December 20, 2009 Administrators Report Posted December 20, 2009 Yep, make sure you grab the entire thing, all the { } braces and php start/end tags all intact Quote
Mark J Posted July 1, 2011 Report Posted July 1, 2011 Did you ever get this to work? I got the link moved somewhere else but if i remove it from the navigation bar it screws the site up.. Quote
Ahmad Posted July 1, 2011 Report Posted July 1, 2011 Guys I am using this Code and it is fully working in BrillianceV1 Skin......... <!-- Footer Starts --> <div id="footer"> <p class="floatleft"><font color="#000000">copyright © 2007 - <?php echo date('Y') ?> - <?php echo SITE_NAME; ?> | <a href="http://www.phpvms.net" target="_blank">powered by phpVMS</a> | Template repackaged by Emirates Virtual Group</a></p> <p class="center"><?php echo '<a href="'.fileurl('/index.php/contact').'"><font color="#000000"><b>Contact</a></b> | '; ?> <?php if(Auth::LoggedIn()) { if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { echo '<a href="'.fileurl('/admin').'"><font color="#000000"><b>Admin Center</a></b> | '; } ?> <a href="<?php echo url('/logout'); ?>"><font color="#000000"><b>Log Out</a></b> | <?php } ?> <a href="#top"><font color="#000000"><b>Back to Top</a></p></b> </div> <!-- Footer Ends --> </div> I hope it works for you also... Regards Ahmad Quote
Mark J Posted July 2, 2011 Report Posted July 2, 2011 i have the code where i want it to be and its working there but the link cannot be taken on the navigation bar or else it screws my site up.. i am using brilliance v1 as well Quote
Petey Posted July 2, 2011 Report Posted July 2, 2011 i have the code where i want it to be and its working there but the link cannot be taken on the navigation bar or else it screws my site up.. i am using brilliance v1 as well I'm sure you have something similar to this in your navigation bar: <?php if(Auth::LoggedIn()) { if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { echo '<a href="'.fileurl('/admin').'"><font color="#000000"><b>Admin Center</a></b> | '; } ?> Try just taking the HTML inside the echo out, but leaving the echo: <?php if(Auth::LoggedIn()) { if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) { echo ''; } ?> Or is it a problem with the length of your navigation bar that you cannot remove it? 1 Quote
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.