*

Recent

Author Topic: [Mod] Add Login to Simple Template  (Read 6963 times)

am-fs

  • Owner
  • Developer
  • Full Member
  • ******
  • Posts: 228
  • Force: +1/-0
    • Great Flash Games
[Mod] Add Login to Simple Template
« on: March 21, 2015, 10:53:37 PM »
This mod adds a login navigation to the Simple Template.



Add to styles.css
Code: [Select]
.top_nav{
float:right;
        color:#000;
padding-top:10px;
padding-bottom:10px;
padding-right:40px;
text-align:right;
}
.top_nav a{color:#333;font-family:Arial;font-size:16px;font-weight:bold;text-decoration:none;}
.top_nav a:hover{color:#EAEAEA;font-family:Arial;font-size:16px;font-weight:bold;text-decoration:none;}

template.php
Find:
Code: [Select]
        <div class="socialmedia">
Follow us on :
<?php
if (!$socialmedia1 == "") { echo '<a href="'.$socialmedia1.'"><img src="'.$domain.'/images/icons/facebook.png" alt="FaceBook" title="FaceBook" width="16" height="16" /></a> '; };
if (!
$socialmedia2 == "") { echo '<a href="'.$socialmedia2.'"><img src="'.$domain.'/images/icons/twitter.png" alt="Twitter" title="Twitter" width="16" height="16" /></a> '; };
if (!
$socialmedia3 == "") { echo '<a href="'.$socialmedia3.'"><img src="'.$domain.'/images/icons/googleplus.png" alt="Google Plus" title="Google Plus" width="16" height="16" /></a> '; };
if (!
$socialmedia4 == "") { echo '<a href="'.$socialmedia4.'"><img src="'.$domain.'/images/icons/linkedin.png" alt="Linkedin" title="Linkedin" width="16" height="16" /></a> '; };
if (!
$socialmedia5 == "") { echo '<a href="'.$socialmedia5.'"><img src="'.$domain.'/images/icons/pinterest.png" alt="Pinterest" title="Pinterest" width="16" height="16" /></a> '; };
if (!
$socialmedia6 == "") { echo '<a href="'.$socialmedia6.'"><img src="'.$domain.'/images/icons/youtube.png" alt="You Tube" title="You Tube" width="16" height="16" /></a> '; };
if (!
$socialmedia7 == "") { echo '<a href="'.$socialmedia7.'"><img src="'.$domain.'/images/icons/myspace.png" alt="MySpace" title="MySpace" width="16" height="16" /></a> '; };
if (!
$socialmedia8 == "") { echo '<a href="'.$socialmedia8.'"><img src="'.$domain.'/images/icons/stumbleupon.png" alt="StumbleUpon" title="StumbleUpon" width="16" height="16" /></a> '; };
if (!
$socialmedia9 == "") { echo '<a href="'.$socialmedia9.'"><img src="'.$domain.'/images/icons/digg.png" alt="Digg" title="Digg" width="16" height="16" /></a> '; };
if (!
$socialmedia10 == "") { echo '<a href="'.$socialmedia10.'"><img src="'.$domain.'/images/icons/icon4.png" alt="" title="" width="16" height="16" /></a> '; };
?>

       </div>

Replace With:
Code: [Select]
        <div class="top_nav">
<?php
if($seo_on == 1){
if(!isset($suserid)){
echo '<a href=\''.$domain.'/login/\'>Login</a> |
<a href=\''
.$domain.'/signup/\'>Signup</a>';
}else{
echo '<a href=\''.$domain.'/myaccount/\'>My Account</a> |
<a href=\''
.$domain.'/myaccount/favorites/\'>Favorites</a> |
<a href=\''
.$domain.'/logout/\'>Logout</a>';
}
}else{
if(!isset($suserid)){
echo '<a href=\''.$domain.'/index.php?action=login\'>Login</a> |
<a href=\''
.$domain.'/index.php?action=signup\'>Signup</a>';
}else{
echo '<a href=\''.$domain.'/index.php?action=myaccount\'>My Account</a> |
<a href=\''
.$domain.'/index.php?action=myaccount&cmd=favorites\'>Favorites</a> |
<a href=\''
.$domain.'/index.php?action=logout\'>Logout</a>';
}
}
if($usrdata['user_level'] == 2){echo '| <a href=\''.$domain.'/index.php?action=admin\'>AdminCP</a>';};
if($usrdata['gamelevel'] >= 2) {echo '| <a href=\''.$domain.'/index.php?action=gameadmin\'>Game AdminCp</a>';};
if($usrdata['bloglevel'] >= 2) {echo '| <a href=\''.$domain.'/index.php?action=blogadmin\'>Blog AdminCp</a>';};
?>

       </div>

Option for Social Media Icons/Links
template.php
Find:
Code: [Select]
<div id="footer">

Add Above:
Code: [Select]
<div align="center">
<?php
if (!$socialmedia1 == "") { echo '<a href="'.$socialmedia1.'"><img src="'.$domain.'/images/icons/facebook.png" alt="FaceBook" title="FaceBook" width="16" height="16" /></a> '; };
if (!
$socialmedia2 == "") { echo '<a href="'.$socialmedia2.'"><img src="'.$domain.'/images/icons/twitter.png" alt="Twitter" title="Twitter" width="16" height="16" /></a> '; };
if (!
$socialmedia3 == "") { echo '<a href="'.$socialmedia3.'"><img src="'.$domain.'/images/icons/googleplus.png" alt="Google Plus" title="Google Plus" width="16" height="16" /></a> '; };
if (!
$socialmedia4 == "") { echo '<a href="'.$socialmedia4.'"><img src="'.$domain.'/images/icons/linkedin.png" alt="Linkedin" title="Linkedin" width="16" height="16" /></a> '; };
if (!
$socialmedia5 == "") { echo '<a href="'.$socialmedia5.'"><img src="'.$domain.'/images/icons/pinterest.png" alt="Pinterest" title="Pinterest" width="16" height="16" /></a> '; };
if (!
$socialmedia6 == "") { echo '<a href="'.$socialmedia6.'"><img src="'.$domain.'/images/icons/youtube.png" alt="You Tube" title="You Tube" width="16" height="16" /></a> '; };
if (!
$socialmedia7 == "") { echo '<a href="'.$socialmedia7.'"><img src="'.$domain.'/images/icons/myspace.png" alt="MySpace" title="MySpace" width="16" height="16" /></a> '; };
if (!
$socialmedia8 == "") { echo '<a href="'.$socialmedia8.'"><img src="'.$domain.'/images/icons/stumbleupon.png" alt="StumbleUpon" title="StumbleUpon" width="16" height="16" /></a> '; };
if (!
$socialmedia9 == "") { echo '<a href="'.$socialmedia9.'"><img src="'.$domain.'/images/icons/digg.png" alt="Digg" title="Digg" width="16" height="16" /></a> '; };
if (!
$socialmedia10 == "") { echo '<a href="'.$socialmedia10.'"><img src="'.$domain.'/images/icons/icon4.png" alt="" title="" width="16" height="16" /></a> '; };
?>

</div>