browsertools + smarty number sorting

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
msaluste
New Member
New Member
Posts: 8
Joined: Sun Aug 14, 2011 8:17 am

browsertools + smarty number sorting

Post by msaluste »

Hi!
I'm using BrowserTools to detect the version of browser and check if it is the latest one.
It's all good until browser version reaches 10 and above. For example, Google Chrome version 13.x is considered older than Chrome 1.x-9.x by the following Smarty code:

Code: Select all

{elseif $browser_name=="Chrome"}
{assign var='Latest' value='13.0.782.112'}
{if $browser_version<$Latest}
...
{else}
...
{/if}
So the default sort order goes like this: 1, 10-19, 2, 20-29, 3, etc.
How can I tell Smarty that numbers 1-9 are not greater than 10 (or sort the mess out otherwise)?
Post Reply

Return to “Modules/Add-Ons”