XTIPS .MOBI
WELCOME TO XTIPS

NEW XT FUNCTIONS RELEASED

Povilas has released several NEW Xt functions that can be used from xhtml/html and wml the most complex is handling of HTTP GET arguments and is covered in a fairly technical posting on xtboard to read this click HERE The others are a countdown generator and a random number generator a function to return the current url and a function to return the referer url
_____
XT COUNTDOWN
function format
_____
<xt id="countdown" format="format" from="now 1" to="now 2"/>
_____
format =years months days hours minutes or seconds
now 1 and now 2 = yesterday today tomorrow or a date in mm//dd/yy/ or dd month yy form or a time hh:mm:ss and it seems just about any way you can describe a date or time! The parser also understands timezone names ie. BST PST UTC etc and things like "last tuesday"! SO IF IN DOUBT TRY IT IT MIGHT WORK!
for the technical explaination see HERE (full web site) or HERE (via google transcoder)
_____
EXAMPLES
<xt id="countdown" format="days" from="now" to="25th december"/>

THERE ARE 289 DAYS TILL CHRISTMAS

_____
<xt id="countdown" format="seconds" from="12:05 pm 23rd june 1960" to="now"/>

I HAVE BEEN ALIVE FOR 1568733188 SECONDS


_____
RANDOM NUMBERS
_____
FUNCTION FORMAT
<xt id="random" from="val1" to="val2"/>
_____
it will produce a random number between val1 and val2 inclusive
_____
Due to the way the function is cached multiple calls on one page using the same input values will produce the same output.

<xt id="random" from="0" to="1000000"/> = 148773

<xt id="random" from="0" to="1000000"/> = 148773

To cure this add another operator/argument pair the name can be anything I chose call

<xt id="random" from="0" to="1000000" call="1"/> = 418194

Change the value of "call" to change the output.

<xt id="random" from="0" to="1000000" call="2"/> = 49797

The value of call can be almost anything.

<xt id="random" from="0" to="1000000" call="aardvark"/> = 391482

You can also retrieve values used on the same page by using the same values for "call"

call="1" = 418194
call="2" = 49797 call="aardvark" = 391482

Pointless note:
The Aardvark is a medium sized burrowing nocturnal mammal related to the elephant . Also the first noun in most english dictionaries!

Function to return the current url
This XTfunction has 3 outputs
<xt id="url"/>
http://theoldmans.madpath.com/xtra
<xt id="url" type="path" />
xtra
<xt id="url" type="domain" />
theoldmans.madpath.com
function to return the referer url
This function is browser dependant
<xt id="referer" />


GO TO
XTIPS HOME PAGE
for more tips
CLICK HERE TO SEND
FEEDBACK
VISIT
MY GUESTBOOK
PLEASE SIGN
LINK TO XTIPS
ON YOUR SITE
AND JOIN MY LINK
EXCHANGE
©2009 - 2010 Theoldman
THE MOBILE WORLD IS
X T G E M