Support Forums

error class

This is a discussion on error class within the Technical Support forums, part of the Technical Support Forums category; Hi Guys, Sorry about wasting a thread on something as simple as this, but I can't the error class used ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 05-27-2009, 10:08 AM   #1
Graphic / Web Desginer
 
Join Date: Nov 2008
Location: London, England
Posts: 77
Rep Power: 13
DGiscombe is on a distinguished road
Default error class

Hi Guys,

Sorry about wasting a thread on something as simple as this, but I can't the error class used to display the error for when users upload images larger than the maximum file size.

Thanks.
__________________
68 Classifieds - Developer Edition v4.1

www.i-catchin.com
DGiscombe is offline  
Old 05-27-2009, 10:10 AM   #2
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,489
Rep Power: 135
Eric Barnes is just really nice Eric Barnes is just really nice
Default

I think you are needing to look in includes/core/checkout/step5.php
PHP Code:
if($size $maxSize)
    {
        
$class_tpl->assign('error'"Upload size exceeds limit of ".$maxSize." kb.<br />Please reduce the size and try again.");
    }
    elseif ((
$uploadMaxWidth <> '' && $imageSize[0] > $uploadMaxWidth) || ($uploadMaxHeight <> '' && $imageSize[1] > $uploadMaxHeight)) 
    {
        
$class_tpl->assign('error'"Upload size exceeds limit of ".$uploadMaxWidth."x".$uploadMaxHeight.".<br />Please reduce the size and try again.");
    } 
That actually needs to be translated.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 05-27-2009, 12:02 PM   #3
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,311
Rep Power: 69
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Quote:
Originally Posted by DGiscombe
Hi Guys,

Sorry about wasting a thread on something as simple as this, ...
Oh no! Now we won't have enough room for more questions.

No need to apologize. That's what this is here for. "Crunch all you want... We'll make more!"
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline  
Old 05-27-2009, 12:43 PM   #4
Graphic / Web Desginer
 
Join Date: Nov 2008
Location: London, England
Posts: 77
Rep Power: 13
DGiscombe is on a distinguished road
Default

Thanks guys, I'll translate it and add it to the style sheet. Just wanted to make it a bit bolder and in red
__________________
68 Classifieds - Developer Edition v4.1

www.i-catchin.com
DGiscombe is offline  
Old 05-27-2009, 01:10 PM   #5
Graphic / Web Desginer
 
Join Date: Nov 2008
Location: London, England
Posts: 77
Rep Power: 13
DGiscombe is on a distinguished road
Default

Ahh, I actually don't how to do what I just said.

I tried to use {$smarty.const....} but I guess that can only be used with templates.
__________________
68 Classifieds - Developer Edition v4.1

www.i-catchin.com
DGiscombe is offline  
Old 05-27-2009, 03:10 PM   #6
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,311
Rep Power: 69
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Try this:
PHP Code:
if($size $maxSize)
    {
        
$class_tpl->assign('error'"<strong><font color="red">Upload size exceeds limit of ".$maxSize." kb.<br />Please reduce the size and try again.</font></strong>");
    }
    elseif ((
$uploadMaxWidth <> '' && $imageSize[0] > $uploadMaxWidth) || ($uploadMaxHeight <> '' && $imageSize[1] > $uploadMaxHeight)) 
    {
        
$class_tpl->assign('error'"<strong><font color="red">Upload size exceeds limit of ".$uploadMaxWidth."x".$uploadMaxHeight.".<br />Please reduce the size and try again.</font></strong>");
    } 
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline  
Old 05-27-2009, 05:29 PM   #7
Graphic / Web Desginer
 
Join Date: Nov 2008
Location: London, England
Posts: 77
Rep Power: 13
DGiscombe is on a distinguished road
Default

Thanks Mike,

The <strong> worked but not the color change so i added it here in step4.tpl:

{if $error}
<br /><div class="error"><span style="color:red;">{$error}</span></div><br />
{/if}

Any idea on how I can pull the message from a language script? I'm using a multilingual mod so I like it to appear in another language as well.
__________________
68 Classifieds - Developer Edition v4.1

www.i-catchin.com
DGiscombe is offline  
Old 05-28-2009, 09:36 AM   #8
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,489
Rep Power: 135
Eric Barnes is just really nice Eric Barnes is just really nice
Default

If you would please submit this as a bug report I will get it fixed for the next release:
http://www.68classifieds.com/forums/project.php
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I append a dynamic class to a menu item? jonahcoyote Technical Support 4 06-25-2008 07:26 PM


All times are GMT -4. The time now is 12:46 AM.


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