Adding Login Links on theme.
Permalink
Hi I am wondering how I can add the same login links for my site.
Sign In | Cart | Join Now
and when signedd in:
ADSSERVER's profile | Cart | Logout
I know I have to add it in my .php files but don't have a clue for the script.
Any idea's?
Sign In | Cart | Join Now
and when signedd in:
ADSSERVER's profile | Cart | Logout
I know I have to add it in my .php files but don't have a clue for the script.
Any idea's?
look at the footer of the default theme, it has all the code you need except for the cart but for that you just stick in your own url
Found the script.
Just customized the names!
Thanks for all your help!
Just customized the names!
Thanks for all your help!
<?php $uinfo = new User(); if($uinfo->IsLoggedIn()){ ?> <a href="<?php echo DIR_REL?>/index.php/login/-/logout">Logout</a> | <a href="<?php echo $this->url('/profile')?>">My Profile</a> <?php } else { ?> <a href="<?php echo $this->url('/login')?>">Login</a> | <a href="<?php echo $this->url('/register')?>">Register</a> <?php }?>
Hi I added code in the footer.php but I still do not see the footer on the bottom of our pages.
Here is footer
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); ?>
<div id="footer">
<span class="powered-by"><?php echo t('Built with ')?> <a href="http://www.concrete5.org"><?php echo t('concrete5 CMS') ?></a>.</span>
© <?php echo date('Y')?> <a href="<?php echo DIR_REL?>/"><?php echo SITE?></a>.
<?php echo t('All rights reserved.')?>
<?php
$u = new User();
if ($u->isRegistered()) { ?>
<?php
if (Config::get("ENABLE_USER_PROFILES")) {
$userName = '<a href="' . $this->url('/profile') . '">' . $u->getUserName() . '</a>';
} else {
$userName = $u->getUserName();
}
?>
<span class="sign-in"><?php echo t('Currently logged in as <b>%s</b>.', $userName)?> <a href="<?php echo $this->url('/login', 'logout')?>"><?php echo t('Sign Out')?></a></span>
<?php } else { ?>
<span class="sign-in"><a href="<?php echo $this->url('/login')?>"><?php echo t('Sign In to Edit this Site')?></a></span>
<?php } ?>
</div>
</div>
<?php Loader::element('footer_required'); ?>
</body>
</html>
here is main
html, body {
margin:0px;
padding:0px;
text-align:center;
height: 100%;
overflow: hidden;
background: #000099;
}
#outercontainer1 {
height:100%;
overflow:auto;
width:100%;
text-align:center;
}
#outercontainer2 {
min-height:100%;
background:
width:1059px;
margin:auto auto;
}
#container {
width:1019px;
height: 100%;
margin:0px auto;
text-align:left;
z-index: 99;
}
#logo {
width:1019px;
height: 310px;
background: #000099;
}
#content {
width:1019px;
height: 310px;
background:#000099;
}
#content {
width:1019px;
}
#column_1 {
float: left;
width: 1019px;
background: #000099;
}
#column_2 {
float: left;
width: 145px;
border-right: 1px solid white;
background: #FFCC00;
padding: 10px;
font-family: Trebuchet MS;
font-size: 14px;
font-weight: bold;
}
#column_2 ul {
margin: 0px;
padding: 0px;
}
#column_2 li {
list-style: none;
margin-bottom: 10px;
}
#column_2 a:link {
text-decoration: none;
color: #000099;
}
#column2 a.nav-selected, #column2 a:hover {
color: #000;
}
#column_3 {
float: left;
width: 570px;
background: #000099;
padding: 10px;
font-family: Trebuchet MS;
}
#column_4 {
float: right;
width: 230px;
background: #FFCC00;
padding: 10px;
font-family: Trebuchet MS;
font-size: 14px;
font-weight: bold;
color: #FFCC00;
}
/* =Hoverbox Code
----------------------------------------------------------------------*/
.hoverbox
{
cursor: default;
list-style: none;
}
.hoverbox a
{
cursor: default;
}
.hoverbox a .preview
{
display: none;
}
.hoverbox a:hover .preview
{
display: block;
position: absolute;
top: -33px;
left: -45px;
z-index: 1;
}
.hoverbox img
{
background: #fff;
border-color: #aaa #ccc #ddd #bbb;
border-style: solid;
border-width: 1px;
color: inherit;
padding: 2px;
vertical-align: top;
width: 100px;
height: 75px;
}
.hoverbox li
{
background: #eee;
border-color: #ddd #bbb #aaa #ccc;
border-style: solid;
border-width: 1px;
color: inherit;
display: inline;
float: left;
margin: 3px;
padding: 5px;
position: relative;
}
.hoverbox .preview
{
border-color: #000;
width: 200px;
height: 150px;
}
#footer{ padding-top:24px; clear:both; padding-bottom:16px; color:#999; font-size:10px }
#footer a{ text-decoration:none }
#footer span.sign-in {margin-left: 20px}
#footer span.powered-by { float:right; }
.style1 {
font-size: 14
}
.style2 {
color: #FFCC00;
font-weight: bold;
}
</style>
Here is footer
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); ?>
<div id="footer">
<span class="powered-by"><?php echo t('Built with ')?> <a href="http://www.concrete5.org"><?php echo t('concrete5 CMS') ?></a>.</span>
© <?php echo date('Y')?> <a href="<?php echo DIR_REL?>/"><?php echo SITE?></a>.
<?php echo t('All rights reserved.')?>
<?php
$u = new User();
if ($u->isRegistered()) { ?>
<?php
if (Config::get("ENABLE_USER_PROFILES")) {
$userName = '<a href="' . $this->url('/profile') . '">' . $u->getUserName() . '</a>';
} else {
$userName = $u->getUserName();
}
?>
<span class="sign-in"><?php echo t('Currently logged in as <b>%s</b>.', $userName)?> <a href="<?php echo $this->url('/login', 'logout')?>"><?php echo t('Sign Out')?></a></span>
<?php } else { ?>
<span class="sign-in"><a href="<?php echo $this->url('/login')?>"><?php echo t('Sign In to Edit this Site')?></a></span>
<?php } ?>
</div>
</div>
<?php Loader::element('footer_required'); ?>
</body>
</html>
here is main
html, body {
margin:0px;
padding:0px;
text-align:center;
height: 100%;
overflow: hidden;
background: #000099;
}
#outercontainer1 {
height:100%;
overflow:auto;
width:100%;
text-align:center;
}
#outercontainer2 {
min-height:100%;
background:
width:1059px;
margin:auto auto;
}
#container {
width:1019px;
height: 100%;
margin:0px auto;
text-align:left;
z-index: 99;
}
#logo {
width:1019px;
height: 310px;
background: #000099;
}
#content {
width:1019px;
height: 310px;
background:#000099;
}
#content {
width:1019px;
}
#column_1 {
float: left;
width: 1019px;
background: #000099;
}
#column_2 {
float: left;
width: 145px;
border-right: 1px solid white;
background: #FFCC00;
padding: 10px;
font-family: Trebuchet MS;
font-size: 14px;
font-weight: bold;
}
#column_2 ul {
margin: 0px;
padding: 0px;
}
#column_2 li {
list-style: none;
margin-bottom: 10px;
}
#column_2 a:link {
text-decoration: none;
color: #000099;
}
#column2 a.nav-selected, #column2 a:hover {
color: #000;
}
#column_3 {
float: left;
width: 570px;
background: #000099;
padding: 10px;
font-family: Trebuchet MS;
}
#column_4 {
float: right;
width: 230px;
background: #FFCC00;
padding: 10px;
font-family: Trebuchet MS;
font-size: 14px;
font-weight: bold;
color: #FFCC00;
}
/* =Hoverbox Code
----------------------------------------------------------------------*/
.hoverbox
{
cursor: default;
list-style: none;
}
.hoverbox a
{
cursor: default;
}
.hoverbox a .preview
{
display: none;
}
.hoverbox a:hover .preview
{
display: block;
position: absolute;
top: -33px;
left: -45px;
z-index: 1;
}
.hoverbox img
{
background: #fff;
border-color: #aaa #ccc #ddd #bbb;
border-style: solid;
border-width: 1px;
color: inherit;
padding: 2px;
vertical-align: top;
width: 100px;
height: 75px;
}
.hoverbox li
{
background: #eee;
border-color: #ddd #bbb #aaa #ccc;
border-style: solid;
border-width: 1px;
color: inherit;
display: inline;
float: left;
margin: 3px;
padding: 5px;
position: relative;
}
.hoverbox .preview
{
border-color: #000;
width: 200px;
height: 150px;
}
#footer{ padding-top:24px; clear:both; padding-bottom:16px; color:#999; font-size:10px }
#footer a{ text-decoration:none }
#footer span.sign-in {margin-left: 20px}
#footer span.powered-by { float:right; }
.style1 {
font-size: 14
}
.style2 {
color: #FFCC00;
font-weight: bold;
}
</style>
clear your cache in your browser and site