Author |
Topic |
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 28 November 2001 : 05:16:40
|
OK,
After much playing, here is draft one.
What you get -
- Turn on / off Birthdate info at admin level. - Allow user to show Birthdate info. - Drop down selects for Birthdate - Info regarding birthdate in Profile - eg Starsign, BIrthstone, Chinese Year, - Include page for portal_content. - Automatically updates the event table.
What you don't get
Emails sent to people in their birthday (unless someone can REALLY REALLY help out here) Free coffee
Down load from here --> http://www.freeaspcode.net/snitz/details.asp?id=41
Zip file Updated, fix for age calculation and drop down for year (thanks Stim)
Support in this forum.
Cheers Az
------- Eagles fly!, but weasels don't get sucked into jet engines.
Edited by - azaniah on 28 November 2001 08:10:35
Edited by - azaniah on 28 November 2001 11:30:31 |
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 28 November 2001 : 09:11:22
|
Azaniah! Great Job! Easy Install... Drops right in :)
If anyone wants to see what this does look here: My Profile
Test Site: EastPasco running on Huw's Code 3.3.10 SQL 2000 Need a Snitz MOD? Click Here: Snitz Mod Resource |
|
|
Raichelle
Junior Member
370 Posts |
Posted - 28 November 2001 : 09:39:15
|
please try adjusting the birthday because I registered on rick forum and tried it out and changed my date it says am 25 and am not 25 yet. my birthday is on december 19 so am not 25 yet umm little glitch and also can you make the year a drop down?
also can this mod be used to add on the default forum showing whos birthday is today?
really nice mod by the way showing starsign and chinese starsign I really like it just adjust it a little thats all
Rai
|
|
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 28 November 2001 : 09:42:36
|
really?
oooo that's not good - Lemmie have a look at the code that works out age...
You really want a drop down for year?
I'll look at it.
Az
------- Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
Raichelle
Junior Member
370 Posts |
Posted - 28 November 2001 : 09:47:59
|
nice fast reply ya I think drop down year might be better I am going to add this soon as our site is back up wow so many new mods and our site is not even up
but anyway I have been waiting for a birthday mod for decade looks like god just sent us a savior
|
|
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 28 November 2001 : 09:58:55
|
ok I know what the problem is
Just gotta find the easiest way to fix it ...
Be right back
Az
------- Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 28 November 2001 : 10:04:20
|
quote:
nice fast reply ya I think drop down year might be better I am going to add this soon as our site is back up wow so many new mods and our site is not even up
but anyway I have been waiting for a birthday mod for decade looks like god just sent us a savior
Azaniah.... I didn't tell Raichelle to say that! LOL
Test Site: EastPasco running on Huw's Code 3.3.10 SQL 2000 Need a Snitz MOD? Click Here: Snitz Mod Resource
Edited by - Rick7165 on 28 November 2001 10:07:34 |
|
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 28 November 2001 : 10:35:15
|
Here is the fix.
Add the following function to inc_functions.asp
Function GetAge(dtBirthdate) Dim dtToday Dim iAge dtToday = date() iAge = Year(dtToday) - Year(dtBirthdate) If (Month(dtToday) * 100 + Day(dtToday)) < (Month(dtBirthdate) * 100 + Day(dtBirthdate)) then iAge = iAge -1 GetAge = iAge End Function
In the following files
events_functions.asp inc_birthdate.asp pop_profile.asp
Replace:
GetAge = DateDiff("yyyy", strBirthDate, Date)
with
Age = GetAge(strBirthdate)
Replace all instances of:
& getage &
with
& age &
Replace any instance of
<%= ChkString(GetAge, "disply") %>
with
<%= ChkString(Age, "disply") %>
Sorry about that...
Cheers Az
( I will amend the zip file when I can get hold of stim to change it)
------- Eagles fly!, but weasels don't get sucked into jet engines.
Edited by - azaniah on 28 November 2001 11:50:27 |
|
|
Da_Stimulator
DEV Team Forum Moderator
USA
3373 Posts |
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 28 November 2001 : 11:15:37
|
Plus ( aren't I nice)
How to do the drop down for years.
Add the following function to inc_functions.asp
Function Date_FillBoxWithYears( nDefault ) nDefault = Cint(nDefault) Dim nYear nDefault = Cint(nDefault) if nDefault = "0" then Response.Write "<option selected=yes value=year>Year</option>" For nDay = 1910 To 2010 Response.Write "<option" Response.Write " value=" & nDay Response.Write ">" & nDay & "</option>" & vbcrlf Next Else Response.Write "<option value=year>Year</option>" For nDay = 1910 To 2010 Response.Write "<option" If nDay = nDefault Then Response.Write " selected=yes" End If Response.Write ">" & nDay & "</option>" & vbcrlf Next End if End Function
In inc_profile.asp
Replace this
<INPUT NAME="BirthDateYear" size="4" maxlength="4" Value="<%= BirthdateCCYY %>">
with this
<SELECT NAME="BirthDateYear"><% Date_FillBoxWithYears BirthdateCCYY %></SELECT>
That's it.
Gives you a range of 1910 - 2010 (should be enough)
Cheers Az
Zip file updated to reflect this change ( and the fix )
------- Eagles fly!, but weasels don't get sucked into jet engines.
Edited by - azaniah on 28 November 2001 11:18:54 |
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 28 November 2001 : 11:28:57
|
Can't find & getage & in the pop_profile.asp are you sure it's there?
Test Site: EastPasco running on Huw's Code 3.3.10 SQL 2000 Need a Snitz MOD? Click Here: Snitz Mod Resource |
|
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 28 November 2001 : 11:33:06
|
Inc_profile.asp not pop_profile.asp
Cheers Az
------- Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 28 November 2001 : 11:37:11
|
Well you got pop_profile.asp as the file to be modded... Don't you just like me :)
Test Site: EastPasco running on Huw's Code 3.3.10 SQL 2000 Need a Snitz MOD? Click Here: Snitz Mod Resource |
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 28 November 2001 : 11:39:15
|
It's not in there either...
Test Site: EastPasco running on Huw's Code 3.3.10 SQL 2000 Need a Snitz MOD? Click Here: Snitz Mod Resource |
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 28 November 2001 : 11:42:48
|
quote:
In the following files
events_functions.asp inc_birthdate.asp pop_profile.asp
Replace:
GetAge = DateDiff("yyyy", strBirthDate, Date)
with
Age = GetAge(strBirthdate)
Replace all instances of:
& getage &
with
& age &
Replace all instances of:
& getage &
with
& age &
don't show in inc_profile.asp or profile.asp
Am I right or just loosing it?
BTW my Test Site has been updated.
Test Site: EastPasco running on Huw's Code 3.3.10 SQL 2000 Need a Snitz MOD? Click Here: Snitz Mod Resource |
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 28 November 2001 : 11:45:55
|
BTW... Got a good laugh at this one :
For nDay = 1910 To 2010
1910? That's before the Titanic went down. LOL
(Just Messin with You) LOL
Test Site: EastPasco running on Huw's Code 3.3.10 SQL 2000 Need a Snitz MOD? Click Here: Snitz Mod Resource |
|
|
Topic |
|