ADMİN Mesaj Sayısı : 128
Lider Point : 50358
National Ponit : 1
Kayıt Tarihi : 23/12/09
Yaş : 32
Nerden : Zonguldak
Ruh Hali : Irk : Job :
| Konu: Doğumgünü olanlara Otomatik İyiki Doğdun Konusu Açma 2010-03-26, 19:55 | |
| doğum günü olan kullanıcılar için sizin forumda belırttıgınız bolume [php]belıttıgınız ıcerıkte konu acar...
/includes/cron/birthday.php de kodu bulun
- Kod:
-
$birthdays = $DB_site->query(" SELECT username, email, languageid, birthday FROM " . TABLE_PREFIX . "user WHERE birthday LIKE '$today-%' AND (options & $_USEROPTIONS[adminemail]) AND usergroupid IN ($ids) "); bunlar ile değiştirin
- Kod:
-
$birthdays = $DB_site->query(" SELECT username, email, languageid, birthday, userid FROM " . TABLE_PREFIX . "user WHERE birthday LIKE '$today-%' AND (options & $_USEROPTIONS[adminemail]) AND usergroupid IN ($ids) ");
bu kodu bulun
- Kod:
-
$emails .= $userinfo['username']; altına bunu ekleyin
- Kod:
-
$bday_people .= "[url=http://turkmmo.forumotion.com/%22member.php?u=".$userinfo['userid']."\"]".$username."[/url], born ".$userinfo['birthday']."\n"; $bday_title .= $username.", ";
bu kodu bulun
- Kod:
-
log_cron_action('Birthday Email sent to: ' . $emails, $nextitem); altına bunları ekleyin
- Kod:
-
// Create Birthday Thread Hack
$birthday_greeting_thread = "Dear Forum,
Here are today's birthdays!
$bday_people"; $greeter=1; //Your User ID $greeter_name="Your User Name"; //Your User Name $greetings_forum=1; //enter the forum id that you want the thread to go into $todays_date11= date("F j, Y", mktime (date("H")+$timeset, date("i"), date("s"), date("m"), date("d"), date("Y"))); $title3= "Happy Birthday to "; $title3.= $bday_title; $title3.= "on "; $title3.=$todays_date11; $DB_site->query("INSERT INTO " . TABLE_PREFIX . "thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($title3))."','".time()."','$greetings_forum','1','0','".addslashes($greeter_name)."','$greeter','".addslashes($greeter_name)."','".time()."','0','1','0')"); $log_threadid=$DB_site->insert_id(); // Creating Post $DB_site->query("INSERT INTO " . TABLE_PREFIX . "post (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$log_threadid','".addslashes(htmlspecialchars($title3))."','".addslashes($greeter_name)."','$greeter','".time()."','".addslashes($birthday_greeting_thread)."','1','0','127.0.0.1','0','1')"); // Updating Forum $DB_site->query("UPDATE " . TABLE_PREFIX . "forum SET replycount=replycount+1,threadcount=threadcount+1,lastpost='".time()."',lastposter='".addslashes($greeter_name)."' WHERE forumid = $greetings_forum"); // Updating User's Post $DB_site->query("UPDATE " . TABLE_PREFIX . "user SET posts=posts+1 WHERE userid=$greeter"); // End Create Birthday Thread Hack
|
|