Script Modifications

gccarlin011700

New Member
YetiShare User
Aug 11, 2012
50
0
0
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
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>
The CSS

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

gccarlin011700

New Member
YetiShare User
Aug 11, 2012
50
0
0
Background Image

Create an image 125x125

The CSS
In screen.css
Add to:
Code:
/* site styles */
html, body
{
Code:
background: url("../images/bg.jpg") repeat scroll 0% 0% transparent!important;
 

gccarlin011700

New Member
YetiShare User
Aug 11, 2012
50
0
0
Here is a copy of my code. I will try to be a bit clearer. I have also removed the background image from the navbar.
After you place this code start to remove the other navbar from the script. I have also removed the login panel because the login in the new navbar directs to login.php

My code has been stripped to remove demo mode, as it is not needed and it cleans the script up for my use.

In file _header.php

place this right after the <body> tag

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 echo SITE_CONFIG_PAGE_EXTENSION; ?>" class="create-account"><?php echo _("Create account:"); ?></a></li>
					<li><a href="<?php echo $_CONFIG['site_url']; ?>/login.<?php echo SITE_CONFIG_PAGE_EXTENSION; ?>" class="sign-in"><?php echo _("Sign in!"); ?></a></li>
				
<li><a href="<?php echo $_CONFIG['site_url']; ?>/upgrade.<?php echo SITE_CONFIG_PAGE_EXTENSION; ?>" 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 echo SITE_CONFIG_PAGE_EXTENSION; ?>" 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 echo SITE_CONFIG_PAGE_EXTENSION; ?>"><?php echo _("Home"); ?></a></li>

<li><a href="<?php echo $_CONFIG['site_url']; ?>/upgrade.<?php echo SITE_CONFIG_PAGE_EXTENSION; ?>" 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 echo SITE_CONFIG_PAGE_EXTENSION; ?>"  class="aff"><?php echo _("Earn Money!"); ?></a></li>

                        <?php endif; ?>

					<li><a href="<?php echo $_CONFIG['site_url']; ?>/account_home.<?php echo SITE_CONFIG_PAGE_EXTENSION; ?>"  class="your-files"><?php echo _("Your files"); ?></a></li>
					<li><a href="<?php echo $_CONFIG['site_url']; ?>/account_edit.<?php echo SITE_CONFIG_PAGE_EXTENSION; ?>"  class="your-account"><?php echo _("Your account"); ?></a></li>
					<li><a href="<?php echo $_CONFIG['site_url']; ?>/logout.<?php echo SITE_CONFIG_PAGE_EXTENSION; ?>"  class="sign-out"><?php echo _("Sign out"); ?></a></li>

<?php endif; ?>



				</ul>
			
			</div>
		</div>

This is the CSS place into screen.css

Code:
#bar {
	background: #e0e0e0;
	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;
}
 

gccarlin011700

New Member
YetiShare User
Aug 11, 2012
50
0
0
I sent you a pm zipit, I will help you out.

My script is quite different than the stock version, so there may be an issue applying my code but I will
get you going.
 

gccarlin011700

New Member
YetiShare User
Aug 11, 2012
50
0
0
I setup a test site and re did the code.
Here is a screen shot:



Now, before you use this, please note that the demo has been removed, the current navbar has been removed, and the drop down login box has been removed.

Files needed are attached
 

Attachments