Jump to content

Recommended Posts

Posted

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

  • 1 year later...
Posted

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

Posted

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

Posted

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?

  • Like 1

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