Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 ADDON: Custom greet ing by time of day
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Aznknight
Senior Member

USA
1373 Posts

Posted - 10 May 2001 :  20:05:04  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
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  Show Profile  Visit rick7165's Homepage
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.
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 11 May 2001 :  18:00:58  Show Profile  Visit rick7165's Homepage
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.
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 11 May 2001 :  18:11:56  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
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
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 11 May 2001 :  18:41:02  Show Profile  Visit rick7165's Homepage
Yellow


Test Site
www.eastpasco.com
HuwR's SR4 release. Colors and Graphic scheme done by Richard Kinser.
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 11 May 2001 :  18:53:10  Show Profile
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?
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 11 May 2001 :  19:08:11  Show Profile  Visit rick7165's Homepage
Just want the Greeting to be yellow.



Test Site
www.eastpasco.com
HuwR's SR4 release. Colors and Graphic scheme done by Richard Kinser.
Go to Top of Page

bjlt
Senior Member

1144 Posts

Posted - 29 May 2001 :  09:56:23  Show Profile
does this work with the timezone mod, i.e. show local time of the users'?

Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 29 May 2001 :  10:26:34  Show Profile  Visit rick7165's Homepage
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.
Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 29 May 2001 :  10:55:20  Show Profile
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"
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 29 May 2001 :  12:31:01  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
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
Go to Top of Page

auroraborealis2001
Starting Member

United Kingdom
3 Posts

Posted - 29 May 2001 :  19:18:22  Show Profile  Visit auroraborealis2001's Homepage
Many thanks for this great little addition to this great piece of software

Snitz Rocks!



Go to Top of Page

wundabua
Starting Member

Switzerland
14 Posts

Posted - 30 May 2001 :  04:03:29  Show Profile  Send wundabua an AOL message
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
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 30 May 2001 :  13:08:22  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
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
Go to Top of Page

auroraborealis2001
Starting Member

United Kingdom
3 Posts

Posted - 30 May 2001 :  14:19:01  Show Profile  Visit auroraborealis2001's Homepage
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.

Go to Top of Page

BuffyNET
Junior Member

United Kingdom
126 Posts

Posted - 30 May 2001 :  14:25:40  Show Profile  Visit BuffyNET's Homepage  Send BuffyNET an ICQ Message
You could maybe even add it into the admin section so the forum admin could change the greetings to suit?

Neil
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07