XTIPS

Tips Mail Tools
GuestBook Link Exchange
Home Page

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 112 DAYS TILL CHRISTMAS

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

I HAVE BEEN ALIVE FOR 1584029365 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"/> = 621819

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

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"/> = 597122

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

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

The value of call can be almost anything.

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

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

call="1" = 597122
call="2" = 999790 call="aardvark" = 935103

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
Local="y" only local urls are returned . This can be omited if not required
Default="http://default url" the default url for non supporting browsers or for off site referer when local is set
<xt id="referer" local="y" default="http://DEFAULT"/>


Random Partner

BACK

©2009 - 2010 Theoldman
JOIN XTBOARD
X T B O A R D
THE MOBILE WORLD IS
X T G E M