Forum Support

Shape 5
March 28, 2024, 04:31:05 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Shape 5 Forum
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Add icon to login / Logout  (Read 535 times)
KlintWeb
Jr. Member
**
Offline Offline

Posts: 253

Gravatar


« on: April 25, 2015, 02:30:52 AM »

I want to add icons to login / Logout
I've tryed with class="s5box_login <?php if ($s5_user_id) { echo ion-log-out; } else { echo ion-log-in; } ?>" in index.php - see the code below, but it don't work. What's wrong?
Code:
<?php if (($s5_login  != "") || ($s5_register  != "")) { ?>
<div id="s5_loginreg">
<div id="s5_logregtm">
<?php if ($s5_register  != "") { ?>
<?php if ($s5_user_id) { } else {?>
<div id="s5_register" class="s5box_register">
<?php echo $s5_register;?>
</div>
<?php ?>
<?php ?>
<?php if ($s5_login  != "") { ?>
                           <div id="s5_login" class="s5box_login <?php if ($s5_user_id) { echo ion-log-out; } else { echo ion-log-in; } ?>">
<?php if ($s5_user_id) { echo $s5_loginout; } else { echo $s5_login; } ?>
</div>
<?php ?>
</div>
</div>
<?php ?>
Niels - DK
« Last Edit: April 25, 2015, 06:49:04 PM by KlintWeb » Logged
KlintWeb
Jr. Member
**
Offline Offline

Posts: 253

Gravatar


« Reply #1 on: April 25, 2015, 06:51:52 PM »

I want to add icons to login / Logout
I've tryed with class="s5box_login <?php if ($s5_user_id) { echo ion-log-out; } else { echo ion-log-in; } ?>" in index.php - see the code below, but it don't work. What's wrong?
Code:
<?php if (($s5_login  != "") || ($s5_register  != "")) { ?>
<div id="s5_loginreg">
<div id="s5_logregtm">
<?php if ($s5_register  != "") { ?>
<?php if ($s5_user_id) { } else {?>
<div id="s5_register" class="s5box_register">
<?php echo $s5_register;?>
</div>
<?php ?>
<?php ?>
<?php if ($s5_login  != "") { ?>
                          <div id="s5_login" class="s5box_login <?php if ($s5_user_id) { echo ion-log-out; } else { echo ion-log-in; } ?>">
<?php if ($s5_user_id) { echo $s5_loginout; } else { echo $s5_login; } ?>
</div>
<?php ?>
</div>
</div>
<?php ?>
Niels - DK

I forgot the '
I've corrected it to:
Code:
class="s5box_login <?php if ($s5_user_id) { echo 'ion-log-out'; } else { 'echo ion-log-in'; } ?>
Now it works perfect
Logged
mikenicoll
Global Moderator
*****
Offline Offline

Posts: 20162



WWW
« Reply #2 on: April 27, 2015, 05:59:23 PM »

Awesome,

Glad you got it sorted out.
Logged

Mike Nicoll
------------
Shape 5 Team

- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Looking for the largest variety in template designs? Look no more. Never buy 1 theme again. Signups start at just $89 for access to all of our themes.
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.