php forum
php mysql forum
php mysql smarty
 
Topic Options
#311825 - 10/27/06 01:55 PM birthday - auto send mail
melder Offline
Enthusiast

Registered: 02/28/01
Posts: 497
Loc: dresden, germany

   birthday - auto send mail to Del.icio.us Add to del.icio.us
  Digg birthday - auto send mail Digg it
yes, i have a 6.2 ubb.classic smile

i need a script or a hack to send automaticly a mail on his birthday ...

and yes, i have your calendar hack (birthday hack).

-------------------------------------

ich will in mein 6.2 einen hack einbauen oder ein script wo am geburtstag eines users eine mail versand wird (automatisch)!

kalender hack ist schon eingebaut.

wer kann mir helfen ???
_________________________
loveground.com

Top
#311842 - 10/30/06 10:15 PM Re: birthday - auto send mail [Re: melder]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25408
Loc: Texas
hmm.. I looked high and low for one, I thought it was a classic mod but I guess it was only for threads :\
_________________________
- Allen wavey
- What Drives You?

Top
#311868 - 11/04/06 09:19 AM Re: birthday - auto send mail [Re: AllenAyres]
melder Offline
Enthusiast

Registered: 02/28/01
Posts: 497
Loc: dresden, germany
ok, but i need it ! wink

.... thinking ...
if i will read the member files and the membertotal file - first i start the new script to read alle files ... to the max counter from the membertotal file ...

in every memberfile i read the line 34 (the bisthday, like: 19741005|yes) ... is this date = today i start a mail to the memberfile line 4 (mail adress) ...

... this script starts bei a cron job at night ...


BUT: how can i read a file like: membertotal.cgi
_________________________
loveground.com

Top
#311871 - 11/04/06 11:34 AM Re: birthday - auto send mail [Re: melder]
melder Offline
Enthusiast

Registered: 02/28/01
Posts: 497
Loc: dresden, germany
here i am again ... ok i do it.

inside ultimatebb near line 770:
Code:
if ($ubb eq 'mail') {
        &RequireCode("$vars_config{CGIPath}/ubb_birthday.cgi");
        &mail;
        exit(0);
}




-> and this is the new ubb_birthday.cgi:

Code:
# UBB Public Forum BIRTHDAY MAIL : Perl Code
# by me ... robert zernisch

&RequireCode("$vars_config{CGIPath}/ubb_lib_posting.cgi");
&RequireCode("$vars_config{CGIPath}/ubb_lib_2.cgi");

sub birthday {

	# set date/time
	@LG_real_date = &GetDateTime;
	my @LG_check_date = split(/\-/, $LG_real_date[13]);

	# this is today in: day.month.
	$the_checker = "$LG_check_date[1].$LG_check_date[0].";
	$the_mail_ko = "$LG_check_date[1].$LG_check_date[0].$LG_check_date[2]";

	#print $the_checker;
	#print "<br><br><br>";


		#LG grab member list
		@LG_members_array = &OpenFileAsArray("$vars_config{MembersPath}/memberslist.cgi");

		#LG set counters to zero
		$LG_counter   = 0;
		$LG_total_mem = 0;

		#LG look for the members
		foreach (@LG_members_array) {
			($LG_usertmp, $LG_usernumtmp) = split(/\|\!\!\|/, $_); chomp($LG_usernumtmp);
			@LG_user_array = &OpenProfile($LG_usernumtmp);


				#LG birthday inside? print ... name, birthday, mail
				if ($LG_user_array[32] != ""){

					my @LG_birthday   = split(/\|/, $LG_user_array[32]);
					my $LG_year       = int($LG_birthday[0] / 10000);
					my $LG_month      = sprintf("%0.2d", int($LG_birthday[0] / 100) - $LG_year * 100);
					my $LG_day        = sprintf("%0.2d", $LG_birthday[0] - ($LG_year * 10000 + $LG_month * 100));
					$LG_date       	  = "$LG_day.$LG_month.";

					### name				  day.month.		mailadress
					### $LG_user_array[15] 	  $LG_date 		    $LG_user_array[2];

					my @LG_birthmail  = split(/\@/, $LG_user_array[2]);
					$LG_birthmail_all = $LG_birthmail[0] . "\@" . $LG_birthmail[1];


if ($LG_date eq $the_checker){
################################################################
my $subject    = "Herzlichen Glückwunsch zum Geburtstag $LG_user_array[15]!";
my $send_from  = "info\@dresden-web.de";
my $send_to    = $LG_birthmail_all;

# mailcontent
my $content    = "
Alles Gute zum Geburtstag ... $LG_user_array[15].\n
Die Community www.dresden-web.de wünscht dir einen schönen Geburtstag\n
und alles Gute heute am $the_mail_ko. Das ist dein Tag.\n\n\n
";


&RequireVars("$vars_config{VariablesPath}/vars_wordlets_email.cgi");
&RequireCode("$vars_config{CGIPath}/ubb_lib_mail.cgi");

&ubb_mail("$send_to", "$send_from", "$send_from", "$send_from", "$subject", "$content", "", "");
print "MAIL: $send_to | $send_from | $subject | $content <br><br>";
################################################################
}


				}


			$LG_total_mem++;
		}
}



# DANGER: Do not remove the next line!
1;
# $Id: ubb_birthday.cgi,v 1.0 2006/11/04 16:00:00 cvscapps Exp $



-> start it ... ../cgi-bin/ultimatebb?ubb=mail
every day you start this ... u send a mail !!!


Edited by melder (11/04/06 04:14 PM)
_________________________
loveground.com

Top
#311896 - 11/06/06 10:53 AM Re: birthday - auto send mail [Re: melder]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25408
Loc: Texas
It looks ok, is it working for you?
_________________________
- Allen wavey
- What Drives You?

Top
#311931 - 11/10/06 11:39 AM Re: birthday - auto send mail [Re: AllenAyres]
melder Offline
Enthusiast

Registered: 02/28/01
Posts: 497
Loc: dresden, germany
yes it works ...

i start this script with a cron job daily ... perfect! smile
im the boss ...
_________________________
loveground.com

Top


Moderator:  Charles, Zarzal 
Top Posters Last 30 Days
AllenAyres 18
Gizmo 12
sirdude 6
GEN 3
tackaberry 2
Philipp 2
willing 2
Who's Online
0 Registered (), 32 Guests and 7 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Team UBBDev Rides Again!
by Gizmo
Yesterday at 11:45 PM
Multiple Identity Detector
by MattUK
Yesterday at 04:10 PM
[7.3.x] ubb.links
by AllenAyres
08/26/08 09:57 AM
Installing FlashChat with 7.3
by Gizmo
08/23/08 05:36 AM
[7.2.1] - Naked shoutbox
by Iann128
08/22/08 07:27 PM
Nice Ajax Chat
by M4D
08/21/08 10:02 PM
51-card NVIDIA folding rig cranks out 265,200 ppd
by AllenAyres
08/13/08 10:10 PM
New Mods
Installing FlashChat with 7.3
by Paug
08/23/08 12:14 AM
[7.x] AddThis - Social Networking
by Gizmo
08/01/08 01:30 AM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
[7.3] Dissallow quotes more then 3 levels deep
by blaaskaak
06/09/08 09:01 AM
[7.2.1] - Naked shoutbox
by sirdude
08/17/07 10:36 PM
Newest Members
welcomeback1, Paug, Tim Keating, anscers, Murphdog
13324 Registered Users

 

 

 
fusionbb message board php hacks