Icon Buttons

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
User avatar
jPaul
 
 
Posts: 92
Joined: Thu Jun 10, 2021 11:00 am

Icon Buttons

Post by jPaul »

Hi Everybody,

I plan to use an Icon Button control on a website. It will be a "Log In" and "Log Out" named button. The name used will be selected by

Code: Select all

<?php
session_start();
// Check if the user is logged in
if (isset($_SESSION['user_Name'])) {
    $welcome_message = "Welcome back, " . htmlspecialchars($_SESSION['user_Name']);
    $myLogValue="Log Out";
} else {
    $welcome_message = "Welcome, you are signed in as a Guest";
    $myLogValue="Log In";
}
?>
I have three issues to approach:
  • I need to link two different events to this button... "LogIn.php" and "Logout.php". How can I make these links?
  • The icon used will be different, of course. a Log in icon and a Log Out icon.
  • Lastly, can I manage the colour of the icon in this control? The default seems to be white, and that colour will be too weak.
Many thanks for any time you give to me on this.
Many Thanks,
-Paul-
If I wasn't so stupid, I wouldn't have to be so persistent.
User avatar
AliGW
 
 
Posts: 651
Joined: Thu Dec 19, 2024 3:41 pm

Re: Icon Buttons

Post by AliGW »

There may be an easier way to do this, but I have recently set up login and logout buttons (icons) on a menu, and have one for each state. I made use of the protected content property to determine who should see each button (logged in users, logged out users). For an icon button, the property is on the Arrange ribbon.
Ali
Retired, but still loving to learn & very busy.
https://alisongwright.me.uk
Novice with WWB, but was an avid user of Serif WebPlus before.
Fairly expert at Microsoft Excel (but not VBA) & Affinity by Canva (for page layout).
User avatar
Pablo
 
Posts: 24554
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Icon Buttons

Post by Pablo »

I also suggest to use the protected content option to show and hide a login and logout button, then you do not need custom code to change the text, link and icon.

The color of the icon can be set via the 'Icon Color' property.
Post Reply