Support Forums

blueerror

This is a discussion on blueerror within the TemplateCodes forums, part of the Third Party Support category; Hi. There's a class on the userjoin.tpl file called <div class="blueerror">. Basically it's an X warning icon informing the user ...


Go Back   68 Classifieds Forums > Third Party Support > TemplateCodes

Reply
 
Thread Tools Display Modes
Old 02-04-2010, 01:00 PM   #1
Customer
 
Join Date: Jan 2010
Posts: 70
Rep Power: 10
metrony is on a distinguished road
Default blueerror

Hi. There's a class on the userjoin.tpl file called <div class="blueerror">. Basically it's an X warning icon informing the user that they need to confirm their email address. But the same error icon appears when they actually confirm the account since the class doesn't change.

How do you put an 'if' statement in the code that says if the message is a successful confirmation to show another class?

The full code in userjoin.tpl is:

Code:
{if $errorText}
	<div class="blueerror">
		{$errorText}
	</div>
{/if}
Is it possible?
__________________
Metro New York Apartments
Apartment listings for the Metro New York Area
metrony is offline   Reply With Quote
Old 02-04-2010, 01:19 PM   #2
All Hands On Deck
 
seymourjames's Avatar
 
Join Date: Mar 2008
Posts: 3,524
Rep Power: 89
seymourjames is a jewel in the rough
Default

Not sure what you mean - please post a screen shot
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C
seymourjames is offline   Reply With Quote
Old 02-04-2010, 03:17 PM   #3
Customer
 
Join Date: Jan 2010
Posts: 70
Rep Power: 10
metrony is on a distinguished road
Default

Here's a screenshot. It's not a big deal it's just that when I first looked at it I thought I got an error when I confirmed the email address. And I just wanted to put an if statement to show another image for the successful message.
__________________
Metro New York Apartments
Apartment listings for the Metro New York Area
metrony is offline   Reply With Quote
Old 02-04-2010, 03:18 PM   #4
Customer
 
Join Date: Jan 2010
Posts: 70
Rep Power: 10
metrony is on a distinguished road
Default

Forgot the screenshot.
Attached Images
File Type: png erroricon.png (120.8 KB, 8 views)
__________________
Metro New York Apartments
Apartment listings for the Metro New York Area
metrony is offline   Reply With Quote
Old 02-04-2010, 03:50 PM   #5
All Hands On Deck
 
seymourjames's Avatar
 
Join Date: Mar 2008
Posts: 3,524
Rep Power: 89
seymourjames is a jewel in the rough
Default

I see it. You can delete this from the css style sheets in each template folder.

div.blueerror {
color:#444;
padding:8px 12px 8px 38px;
text-decoration:none;
margin:5px 0 15px 0;
font-size:1.1em;
font-weight:bold;
font-style:normal;
background:#fff url(../images/icons/error.jpg) no-repeat 8px center;
border:1pxsolid #ead19b;
clear:both;
text-align:left;
}


It is actually redundant. No cross will now appear at all which is the default template behavior if I am not mistaken.

The other solution (nicer) is to do a test and define two classes. Please test this and let me know. Put this in the style sheets for each of your templates.

div.success {
color:#444;
padding:8px 12px 8px 38px;
text-decoration:none;
margin:5px 0 15px 0;
font-size:1.1em;
font-weight:bold;
font-style:normal;
background:#fff url(../images/icons/accept.gif) no-repeat 8px center;
border:1pxsolid #ead19b;
clear:both;
text-align:left;
}

then in the userlogin.tpl files in each template you are using replace this

{if $msg<>""}
{if $msg <> $smarty.const.LANG_USER_LOGIN_SUCCESS_VALIDATION}
<div class="blueerror">
{$msg}
</div>
{else}
<div class="success">
{$msg}
</div>
{/if}
{/if}


I don't think there is another case of "success" that we need to worry about producing a cross when it should be a tick.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C
seymourjames is offline   Reply With Quote
Old 02-04-2010, 06:26 PM   #6
Customer
 
Join Date: Jan 2010
Posts: 70
Rep Power: 10
metrony is on a distinguished road
Default

Works perfectly! Thank you.

I'm attaching an image that I called success.jpg just in case anyone else wants to do this.
Attached Images
File Type: jpg success.jpg (643 Bytes, 14 views)
__________________
Metro New York Apartments
Apartment listings for the Metro New York Area
metrony is offline   Reply With Quote
Old 02-04-2010, 08:20 PM   #7
All Hands On Deck
 
seymourjames's Avatar
 
Join Date: Mar 2008
Posts: 3,524
Rep Power: 89
seymourjames is a jewel in the rough
Default

did you not like my image then? LOL
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C
seymourjames is offline   Reply With Quote
Old 02-04-2010, 11:58 PM   #8
Customer
 
Join Date: Jan 2010
Posts: 70
Rep Power: 10
metrony is on a distinguished road
Default

LOL- I thought you just forgot to attach accept.gif. But now I realize it's already in the templates folder. I'll use yours so you don't feel bad
__________________
Metro New York Apartments
Apartment listings for the Metro New York Area
metrony is offline   Reply With Quote
Reply

Thread Tools
Display Modes



All times are GMT -4. The time now is 10:07 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0