Gossamer Forum
Home : Products : DBMan : Customization :

Can this be Done?

Quote Reply
Can this be Done?
Hi - been awhile since my last post. I am wanting to know if this can be done with DBMan. I have a field in the database called "birth_date".

What I would like to do is on the persons birthday - display via an ssi call their name like:

Birthday's Today: Name's Here

Can this be done?

TIA !



------------------
donm
All those who believe in psychokinesis, please raise my hand.




Quote Reply
Re: Can this be Done? In reply to
Hmm...well the only thing I can think of is comparing todays date with the birthday field in your default.cfg file.

I don't really understand what you want to do. Do you want to list all records that have birthdays today???

Regards.

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Can this be Done? In reply to
Eliot - Yes, that is exactly what I am trying to do !

On the homepage (which is a static page outside of DBman ) compare today's date against the birthdate field in the database and then list the names of those who have birthdays that day. And of course this would be done via SSI.

------------
donm
Quote Reply
Re: Can this be Done? In reply to
It would have to be a separate stand alone cgi script that you call using SSI. I don't have time to write the script...but you can take a look at the Mass Mailer Script and Records.cgi scripts to use as a possible template for this request.

Regards.

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Can this be Done? In reply to
Eliot - Thanks for your reply. I took a look at the mods you mentioned. However, I do not know enough about CGI scripting and Perl to put something like this together myself.

Thanks again!
----------------

donm
Quote Reply
Re: Can this be Done? In reply to
Anyone else up to taking a crack at this?

---------------
donm
Quote Reply
Re: Can this be Done? In reply to
This javaScript may be of interest - if not OK.
Code:
<HTML>
<HEAD>
<TITLE>DATE TEST</TITLE>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
dave = 1222
sally = 1221
john = 1223
var today = new Date()
var month = today.getMonth()
month = month + 1
var day = today.getDate()
lot = (month +""+ day)
if (lot == dave) {
alert("Happy Birthday Dave!")
} else if (lot == sally){
alert("Happy Birthday Sally!")
}
</SCRIPT>
</BODY>
</HTML>

------------------
JGU

Quote Reply
Re: Can this be Done? In reply to
Thanks jury - however this solution would not be good for over 1,300 birthdays :-)

I have been contacted by someone else here on the messageboard who likes to try to come up with solutions to problems and mods that are requested. As soon as something is worked up I'll post it.

Thanks for letting me know !

-----------------
donm
Quote Reply
Re: [donm] Can this be Done? In reply to
Hi All,

Its been a long time since this post and I was just wondering if someone found any solution to this requirement?

FHN
Quote Reply
Re: [fhnaqvi] Can this be Done? In reply to
Even a script that can generate this inside of dbman, on the db home page or something? Any pointers are also welcome. I am not a programmer but can try to give it a shot!

TIA
FHN
Quote Reply
Re: [fhnaqvi] Can this be Done? In reply to
Which do you want to do?..the javascript alert or the listing?

Last edited by:

Paul: Feb 13, 2003, 8:46 AM
Quote Reply
Re: [Paul] Can this be Done? In reply to
Hi Paul,

Actually the Ideal thing that I would like is to have an alert/listing outside dbman and an email sent to everyone else other than the person whose birthday/anniversary it is.

Since I was unable to do anything by myself I modified the javascript in this thread. The problem with that is that each persons details need to be coded on that page itself. I was wondering if it is possible to get that info out of the database and then either list it or popup an alert (inside or outside dbman) about "Birthdays today" or "Anniversaries today" and list the headings only if there is any birthday or anniversary on that day.

If you want to see a sample of what I would like to do you can visit http://d25499.new24.yourserver.net/imt93 . I am setting up some dummy dates for feb 14th and 15th so you can see what it looks like.

TIA

FHN
Quote Reply
Re: [fhnaqvi] Can this be Done? In reply to
Does anyone have any ideas !!

FHN
Quote Reply
Re: [fhnaqvi] Can this be Done? In reply to
In my case, I'm afraid I didn't read any further than this line:-
Quote:
Actually the Ideal thing that I would like is to have an alert/listing outside dbman and an email sent to everyone else other than the person whose birthday/anniversary it is.
Although it might seem a cool idea at first, something like this would soon start to annoy visitors. Once you had 400 or so birthdays in the database, you'd be sending an email every day.

Even if you sent an "upcoming birthdays" email once per week, most people are really only going to be interested in people they know anyway.

Something a lot more useful would be to have an "email me a reminder of upcoming birthdays for people on my buddies list 3 or 4 days in advance so I have time to send them a present or card" option.

Much more useful than an "email me every time anyone has a birthday, even if I have never heard of them, have nothing in common with them (other than visiting the same site) and they are on the opposite side of the world to me" option. Wink

Telling people on the day is also usually too late to be useful for anything other than saying "Happy Birthday". Giving 3 or 4 days notice would be more helpful as a reminder to do something special - especially if the number of days notice could be set by the user (to allow for International postal delays).

If I was doing this for one of my sites, I'd likely start by looking at HotScripts and seeing if anything there could be used or adapted.
Quote Reply
Re: [wysardry] Can this be Done? In reply to
Hi,

Thanks for your response. A little background will help clear the situation a bit. The database I am running is for my class at graduate school and it had about 50 students. I dont expect more than 25 or 30 to join anyway. However the suggestion of informing "upcoming" birthdays by email is very good idea as I do agree that last minute info will not leave enough time to do anything but say "happy b'day". I think in light of the suggestion you have made it would be nice to have an email reminder for "birthdays in the coming week" sent out every sunday or so (if there is any b'day/anniversary in the upcoming week) along with this a daily popup again if there is a b'day or anniversary.

I already searched the site you mentioned but didnt find anything I could use. specially because my coding skills are nearly useless Frown If you know of anything that I can use please let me know and I can try and see if there is any modifications that I can manage.

TIA

FHN
Quote Reply
Re: [fhnaqvi] Can this be Done? In reply to
Well, WebCal uses a flat text file for its database, which you might be able to access using DBMan. You'd have to create a matching definition file etc. but it would give you a head start on solving the problem.
Quote Reply
Re: [fhnaqvi] Can this be Done? In reply to
Hi Tia,

I think we can do this (may beBlush). I have the same case, but instead of birthday, I wrote an reminder script, if it will be expired in 2 weeks or it already expired and I use cron to run at Sunday night.

If birthday is comming in a week, then an email will sennd to the team. can be done.

1. What happend if 12 people have birthday in 03/03 -03/09 ? will it mail to the team 12 email ?

2. Or Do you want to have one mail and have 12 people name in the list ?

Tell me how many field you have ? and BOD is at what field, if I can do it I will share with you.

Britney Blush
Quote Reply
Re: [britneythuyduong] Can this be Done? In reply to
Hi Britney,

Thanks for your response. It seems what you have is the exact thing I was looking for, or atleast 95% similar to my requirements. Let me explain my requirements to you in some more detail.

As I said earlier in the thread, I am managing a site for my class at graduatae school. I have the following fields, with the field numbers, in the config file that I will ideally like to use.

'Last Name' => [ 2,
'First Name' => [ 3,
'Date of Birth' => [ 5,
'Anniversary' => [ 6,
'Spouse' => [12,

What I would like is that on execution of the cronjob an email be sent out to all members titled "b'days & anniversaries this week" and in that it should say something like the following

BIRTHDAYS

In the coming week we have the following birthdays:
"First Name" "Last Name" => "Date of Birth" (value)
"First Name" "Last Name" => "Date of Birth" (value)

repeat as many times as there are occurances for the coming week. Meaning all the birthdays in the above list. Further, within the same email, the following

ANNIVERSARIES

In the coming week we have the following anniversaries:
"spouse" and "First Name" "Last Name" => "anniversary" (Values)
"spouse" and "First Name" "Last Name" => "anniversary" (Values)

once again repeat as many times as there are occurances for the coming week. What this will mean is there should be only one email (and that too only if there are any birthdays or anniversaries in the coming week) and in the email if there are birthdays then the birthdays part and if there are anniversaries then the anniversary part and if there are both then both should be there.

Also a popup or an SSI thinggy that can display the same info on a page like the site home page or the db home page.

Now I know this is asking too much off you, but this is the ideal thing I would like to have but any help will be greately appreciated !! Thanks a ton in advance.

FHN

Last edited by:

fhnaqvi: Mar 4, 2003, 10:00 AM
Quote Reply
Re: [fhnaqvi] Can this be Done? In reply to
Hi Friend Blush,

Ooop, I stuck at DOB, if your DOB is 03/06/2000 how do I know the BD shoudl be 03/06/2003 ? then it is not the same as I have Blush.

Any one have any idea ? It is fun to learn. Smile
Quote Reply
Re: [britneythuyduong] Can this be Done? In reply to
hmmm, that should not be too difficult to fugure. We can use the split function to get month and date from the DOB field and use that along with the time function. I dont know how to get this in perl but in Unix we can easily get the date and month and compare with the values we have obtained from the DOB field.

Can you send me what you have in a PM and I will take a look and see if I can modify it somehow.

Thanks again for your help.

FHN