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)
 Birthdate Mod V1.0
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 7

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 28 November 2001 :  05:16:40  Show Profile  Visit Azaniah's Homepage
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  Show Profile  Visit rick7165's Homepage
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
Go to Top of Page

Raichelle
Junior Member

370 Posts

Posted - 28 November 2001 :  09:39:15  Show Profile
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

Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 28 November 2001 :  09:42:36  Show Profile  Visit Azaniah's Homepage
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.
Go to Top of Page

Raichelle
Junior Member

370 Posts

Posted - 28 November 2001 :  09:47:59  Show Profile
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

Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 28 November 2001 :  09:58:55  Show Profile  Visit Azaniah's Homepage
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.
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 28 November 2001 :  10:04:20  Show Profile  Visit rick7165's Homepage
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
Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 28 November 2001 :  10:35:15  Show Profile  Visit Azaniah's Homepage
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
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 28 November 2001 :  11:08:13  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
Az, if you send the zip to da_stimulator@hotmail.com I can update it on the site for you :)

----
-Eric | Mod Resource | Test Area
Who has there phaser set to stupid?
http://phpscriptcenter.com -Quality PHP Scripts
Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 28 November 2001 :  11:15:37  Show Profile  Visit Azaniah's Homepage
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
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 28 November 2001 :  11:28:57  Show Profile  Visit rick7165's Homepage
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
Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 28 November 2001 :  11:33:06  Show Profile  Visit Azaniah's Homepage
Inc_profile.asp not pop_profile.asp

Cheers Az

-------
Eagles fly!, but weasels don't get sucked into jet engines.
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 28 November 2001 :  11:37:11  Show Profile  Visit rick7165's Homepage
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
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 28 November 2001 :  11:39:15  Show Profile  Visit rick7165's Homepage
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
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 28 November 2001 :  11:42:48  Show Profile  Visit rick7165's Homepage
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
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 28 November 2001 :  11:45:55  Show Profile  Visit rick7165's Homepage
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
Go to Top of Page
Page: of 7 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.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07