Lets try and dress this script up a bit and maybe add some nice new functions.
Please post any modifications here that you dont mind sharing.
Simple Navbar:
Create an image 1px by whatever height you want to match your site color and name it bar-bg-grey.gif upload it to the images folder
This is based on using the php extension but you can change the link extensions to suit your site.
The HTML
The CSS
Please post any modifications here that you dont mind sharing.
Simple Navbar:
Create an image 1px by whatever height you want to match your site color and name it bar-bg-grey.gif upload it to the images folder
This is based on using the php extension but you can change the link extensions to suit your site.
The HTML
Code:
<div id="bar">
<div id="bar-inner">
<ul id="account">
<?php if ($Auth->loggedIn() == false): ?>
<li><a href="<?php echo $_CONFIG['site_url']; ?>/register.php" class="create-account"><?php echo _("Create account:"); ?></a></li>
<li><a href="<?php echo $_CONFIG['site_url']; ?>/login.php" class="sign-in"><?php echo _("Sign in!"); ?></a></li>
<li><a href="<?php echo $_CONFIG['site_url']; ?>/upgrade.php" class="premium"><?php echo _("Premium"); ?></a></li>
<?php if(pluginHelper::pluginEnabled('rewards') == true): ?>
<li><a href="<?php echo $_CONFIG['site_url']; ?>/plugins/rewards/site/rewards.php" class="aff"><?php echo _("Earn Money!"); ?></a></li>
<?php endif; ?>
<?php else: ?>
<li class="signed-in-as"><?php echo _("Signed in as:"); ?> <strong>
(<?php echo $Auth->username; ?>)
</strong></li>
<li><a href="<?php echo $_CONFIG['site_url']; ?>/index.php"><?php echo _("Home"); ?></a></li>
<li><a href="<?php echo $_CONFIG['site_url']; ?>/upgrade.php" class="premium"><?php echo _("Premium"); ?></a></li>
<?php if(pluginHelper::pluginEnabled('rewards') == true): ?>
<li><a href="<?php echo $_CONFIG['site_url']; ?>/plugins/rewards/site/account_rewards.php" class="aff"><?php echo _("Earn Money!"); ?></a></li>
<?php endif; ?>
<li><a href="<?php echo $_CONFIG['site_url']; ?>/account_home.php" class="your-files"><?php echo _("Your files"); ?></a></li>
<li><a href="<?php echo $_CONFIG['site_url']; ?>/account_edit.php" class="your-account"><?php echo _("Your account"); ?></a></li>
<li><a href="<?php echo $_CONFIG['site_url']; ?>/logout.php" class="sign-out"><?php echo _("Sign out"); ?></a></li>
<?php endif; ?>
</ul>
</div>
</div>
Code:
#bar {
background: url(../images/bar-bg-grey.gif) top repeat-x;
color: #cdcdcd;
padding: 7px 0;
position: absolute; top: 0; right: 0; left: 0;
text-shadow: -1px -1px 0 #4e4e4e;
}
#bar-inner {
margin: auto;
width: 72em;
}
#account {
float: left;
list-style: none;
padding: 3px 0;
}
#account li {
float: left;
margin-right: 1.4em;
}
#account li a {
border: none;
color: #cdcdcd;
float: left;
font-weight: bold;
padding-left: 18px;
text-decoration: none;
text-shadow: -1px -1px 0 #4e4e4e;
}
#account .premium {
color: #FF6600;
}
#account .aff {
color: #33cc22;
}
#account .create-account,
#account .your-account {
padding-left: 17px;
}
#account .sign-out {
padding-left: 20px;
}
#account li a:hover {
background-position: left -21px;
color: #fff;
text-shadow: -1px -1px 0 #333;
}
.signed-in-as {
color: #fff;
font-weight: bold;
}