Here's the code that should work:
Code:
{if $smarty.server.HTTPS ne "on"}
Your Script Code
{/if}
If it doesn't work, which it sounds like it's not, try this:
Open auth.php
At the very end, but before ?> put:
Code:
$smarty->assign("wcmServerport",$HTTP_SERVER_VARS['SERVER_PORT']);
Then in your smarty template use:
Code:
{if $wcmServerport eq "80"}
Your Script Code
{/if}