TAV1702
December 19, 2009, 10:59pm
1
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>';
}
?>
nabeel
December 20, 2009, 12:59am
2
Yep, make sure you grab the entire thing, all the { } braces and php start/end tags all intact
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..
Ahmad
July 1, 2011, 11:23pm
5
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
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
Petey
July 2, 2011, 2:30am
7
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 Like