Ok, don't crucify me! This not a REAL mod.
I wanted to lighten the mood around my site a little.
So, I put a line on my front page that read:
" 34,203 People have viewed this site, effectively doubling the size of their heads."
I then decided that editing the header every time I wanted to change it was going to be a pain so, I made it an include.
I then decided to make the number random. I then wanted the number formated so.....
SillyStat mod
Place this include wherever you want the string to show up at on your page:
%>
<!--#INCLUDE FILE="../forum/include/inc_silly.asp" -->
<%
Of course, you can name your file anything you want
Create a new file naming it the same name that you put in your
include statement above. Put the following code in the new file:
<%
Dim intLowerBound ' Lower bound of the random number range
Dim intUpperBound ' Upper bound of the random number range
Dim intRangeSize ' Size of the range
Dim sngRandomValue ' A random value from 0 to intRangeSize
Dim intRandomInteger ' Our final result - random integer to return
intLowerBound = 23000
intUpperBound = 94599
Randomize()
intRangeSize = intUpperBound - intLowerBound + 1
sngRandomValue = intRangeSize * Rnd()
sngRandomValue = sngRandomValue + intLowerBound
intRandomInteger = Int(sngRandomValue)
Response.Write "<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumLinkColor & """> " & FormatNumber(intRandomInteger,0,false,false,true) & " </font><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strHeadFontColor & """>People have viewed this site, effectively doubling the size of their heads.</font>" & vbNewLine & _
Again, change the string to say anything you want and you can change the upper and lower number limits to fit your needs.