Doğumgünü olanlara Otomatik İyiki Doğdun Konusu Açma

Dark_Angel

Webmaster
Staff member
Bu hack doğum günü olan kullanıcılar için sizin forumda belırttıgınız bolume belıttıgınız ıcerıkte konu acar...

/includes/cron/birthday.php de kodu bulun

PHP:
$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

PHP:
$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

PHP:
$emails .= $userinfo['username'];
altına bunu ekleyin

PHP:
$bday_people .= "<a href=\"member.php?u=".$userinfo['userid']."\">".$username."</a>, born ".$userinfo['birthday']."\n";
$bday_title .= $username.", ";
bu kodu bulun

PHP:
log_cron_action('Birthday Email sent to: ' . $emails, $nextitem);
altına bunları ekleyin

PHP:
// Create Birthday Thread Hack 

$birthday_greeting_thread = "Dear Forum,<br><br>Here are today's birthdays!<br><br>$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

Konu baslıgı ve msj'ı isteğinize göre türkçeleştirebilirsiniz... Konuyu hangi başlık altına açmasını istiyorsanızda $greetings_forum=1; //enter the forum id that you want the thread to go into yazan yerdeki 1 yerine başlığınızın id numarasını yazmanız yeterlidir iyi forumlar...
 

kfyonur

New member
Forum ID sini nerden öğrenebilirim ?

Bir dğeişikil olmadı da forumda,ondan olabilir mi diye düşünüyorum.
 
Top