Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Banner rotation /random numbers (and bug)

Quote Reply
Banner rotation /random numbers (and bug)
One of the new features of the new version is the addition of <%random%> and <%random1%> <%random2%> and <%random3%>

The difference is, <%random%> returns a different random number each time it's called in the template.

<%random1%>, <%random2%>, <%random3%> are initialized when the page is called, and are the samefor each use on the page, so if an advertiser (such as LinkExchange, ValueClick, or DataComm, etc) requires the same 'ad number' in 2 or more places for the ad, you can do that using the <%random1%>.. variables.

If you just want a random number, you can use<%random%>

BUG:: The code in nph-build is:

Code:
$OUT{random} = rand (10000);
$OUT{random1} = rand (10000);
$OUT{random2} = rand (10000);
$OUT{random3} = rand (10000);

It should be changed to:

Code:
$OUT{random} = int(rand (10000));
$OUT{random1} = int(rand (10000));
$OUT{random2} = int(rand (10000));
$OUT{random3} = int(rand (10000));

The number inside can be set to the limits of your needs -- 10, 99, or 64000.
Subject Author Views Date
Thread Banner rotation /random numbers (and bug) pugdog 2578 Oct 2, 1999, 4:37 PM
Post Re: Banner rotation /random numbers (and bug)
dearnet 2512 Oct 31, 1999, 10:15 AM
Post Re: Banner rotation /random numbers (and bug)
Digital Concepts 2495 Oct 31, 1999, 11:39 AM
Post Re: Banner rotation /random numbers (and bug)
widgetz 2500 Oct 31, 1999, 11:48 AM
Post Re: Banner rotation /random numbers (and bug)
dearnet 2513 Nov 1, 1999, 3:34 AM
Post Re: Banner rotation /random numbers (and bug)
pugdog 2494 Nov 1, 1999, 4:32 PM
Post Re: Banner rotation /random numbers (and bug)
dearnet 2495 Nov 1, 1999, 8:59 PM
Post Re: Banner rotation /random numbers (and bug)
pugdog 2502 Nov 1, 1999, 10:33 PM