Author |
Topic |
Aznknight
Senior Member
USA
1373 Posts |
Posted - 10 May 2001 : 20:05:04
|
What this does is greet you by the time of day instead of saying "You are logged on as, so and so". It'll say "Good Morning, {your membername}" if it's morning where you're at, "Good Afternoon," or "Good Evening." pretty simple to install and use.
demo: http://www.calvsa.net/snitz/ gotta be logged in to see it though.
below this in inc_top.asp:
function openWindow4(url) { popupWin = window.open(url,'new_page','width=400,height=525') } ADD:
function getGreeting() { now = new Date(); theHour = now.getHours(); if (theHour < 12) { greeting = 'Good Morning'; } else if (theHour < 17) { greeting = 'Good Afternoon'; } else { greeting = 'Good Evening'; } document.write(greeting); }
Change this (also in inc_top.asp): You are logged on as<br> to
<script language="javascript"> getGreeting() </script>,<br>
that's all.
- Alan www.iamviet.com www.calvsa.net Snitz Resource |
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 11 May 2001 : 00:52:02
|
Alan has done it again!!! Another Awesome Mod
Thanks!!
BTW... Gota have that Weather Mod
Test Site www.eastpasco.com HuwR's SR4 release. Colors and Graphic scheme done by Richard Kinser. |
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 11 May 2001 : 18:00:58
|
Alan... I want to change the color of the Greeting... Can you tell me how?
Thanks, Rick
Test Site www.eastpasco.com HuwR's SR4 release. Colors and Graphic scheme done by Richard Kinser. |
|
|
Aznknight
Senior Member
USA
1373 Posts |
Posted - 11 May 2001 : 18:11:56
|
what color do you want to change it to? a specific color or one of the forum's color variables?
- Alan www.iamviet.com www.calvsa.net Snitz Resource |
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 11 May 2001 : 18:41:02
|
Yellow
Test Site www.eastpasco.com HuwR's SR4 release. Colors and Graphic scheme done by Richard Kinser. |
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 11 May 2001 : 18:53:10
|
In the following tag that is right before where you inserted the code that Alan posted:
<font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
change it to:
<font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>" color="yellow">
Or were you wanting the greeting to be a different color than the Username? |
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 11 May 2001 : 19:08:11
|
Just want the Greeting to be yellow.
Test Site www.eastpasco.com HuwR's SR4 release. Colors and Graphic scheme done by Richard Kinser. |
|
|
bjlt
Senior Member
1144 Posts |
Posted - 29 May 2001 : 09:56:23
|
does this work with the timezone mod, i.e. show local time of the users'?
|
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 29 May 2001 : 10:26:34
|
From what I've tested it only pulls the time from the server. I also have the time zone mod installed.
Rick
Test Site www.eastpasco.com HuwR's SR4 release. Colors and Graphic scheme done by Richard Kinser. |
|
|
blackinwhite
Average Member
Turkey
657 Posts |
Posted - 29 May 2001 : 10:55:20
|
it seems it is working with the local times, since it is a client-side code.
__________________ aQuarium > right-click intellectual device "I am a legal alien" |
|
|
Aznknight
Senior Member
USA
1373 Posts |
Posted - 29 May 2001 : 12:31:01
|
blankand white is right, this is client-side javascript so runs on the client's browser and not the server.
- Alan www.iamviet.com www.calvsa.net Snitz Resource |
|
|
auroraborealis2001
Starting Member
United Kingdom
3 Posts |
Posted - 29 May 2001 : 19:18:22
|
Many thanks for this great little addition to this great piece of software
Snitz Rocks!
|
|
|
wundabua
Starting Member
Switzerland
14 Posts |
Posted - 30 May 2001 : 04:03:29
|
thx for this short but fancy mod
I get more and more impressed by the people in this forum ...
klement.
Edited by - wundabua on 30 May 2001 04:04:37 |
|
|
Aznknight
Senior Member
USA
1373 Posts |
Posted - 30 May 2001 : 13:08:22
|
Your welcome guys . Made my day.
Hey i was thinking, There's only 3 time of day states right now for greeting: Good Morning, Good Afternoon, and Good Evening. I was thinking of add more states. Like if they're on at from 12-4 am say, "Burning the midnight oil?" and like from 4-7am greet by saying, "Morning, early bird" etc. what do you guys think? any other suggestions for greetings??
- Alan www.iamviet.com www.calvsa.net Snitz Resource |
|
|
auroraborealis2001
Starting Member
United Kingdom
3 Posts |
Posted - 30 May 2001 : 14:19:01
|
The 12-4am midnight oil state in particular is a great idea and makes more sense than 'good morning' although technically speaking obviously it is morning
I am Guildmaster for a Guild that plays the on-line roleplaying game 'Ultima Online', and I use Snitz as our Guild's Discussion Forum's (although it's becoming so much more now). I have customised the greetings with roleplaying speak eg...
Hail and Good Evening to thee (Member Name)
One interesting idea I thought if you were to develop this mod/addon any further was perhaps to have a set of random greetings. Following the above example.. the Hail, could either be Hail, Greetings, Well Met, Welcome back, How art thee? etc... you get the general idea.
I guess not high on the priority list , but it would rock for me .
Keep up the good work.
|
|
|
BuffyNET
Junior Member
United Kingdom
126 Posts |
Posted - 30 May 2001 : 14:25:40
|
You could maybe even add it into the admin section so the forum admin could change the greetings to suit?
Neil |
|
|
Topic |
|