ممكن يا شباب هاك للميلاد
دخيلكم
ممكن يا شباب هاك للميلاد
دخيلكم
__________________
؟؟
تحياتي اخوي
أنشأ ملف بإسم birthday.php وضع فيه النص التالي :
<?php
$today_day = date("d",mktime(date("H"),date("i"),date("s"),date("m"),date("d"),date("Y"))+($bbuserinfo[timezoneoffset]-$timeoffset)*3600);
$today_month = date("m",mktime(date("H"),date("i"),date("s"),date("m"),date("d"),date("Y"))+($bbuserinfo[timezoneoffset]-$timeoffset)*3600);
$today_year = date("Y",mktime(date("H"),date("i"),date("s"),date("m"),date("d"),date("Y"))+($bbuserinfo[timezoneoffset]-$timeoffset)*3600);
$userday = explode("-",$post[birthday]);
if($today_day == $userday[2] && $today_month == $userday[1])
{ $bday = explode("-",$userinfo[birthday]);
if(date("Y")>$bday[0] and $bday[0]>1901 && $bday[0]!='0000')
{ $birthday = @date($calformat1,mktime(0,0,0,$bday[1],$bday[2],$bday[0]));
}
else
{ // lets send a valid year as some PHP3 don't like year to be 0
// $calformat2 should not contania year identifier so the year doesn't matter
$birthday = @date($calformat2,mktime(0,0,0,$bday[1],$bday[2],1993));
}
if($birthday=="")
{ $birthday="$bday[1]-$bday[2]-$bday[0]";
}
if($today_year > $userday[0] && $userday[0] != '0000')
{ $age = $today_year-$userday[0];
}
eval ("\$post[has_a_birthday] = \"".gettemplate("postbit_birthday")."\";");
}
?>
الآن إذهب الى الصفحة الرئيسية وانظر اسفل الصفحة ستجد التهنئة قد ظهرت
إذا لم تظهر التهنئة فلابد من إضافة تامبلت في لوحة التحكم هذا التامبلت
كالاتي :
ادخل الى لوحة التحكم واذهب الى التامبلت وإختر إضافة سيكون إسم التامبلت
postbit_birthday ضع فيه هذا الكود :
<smallfont>كل سنة وإنت طيب يا $post[username]<br>
</smallfont>
وإذار اردت ان يظهر عمر العضو ضع هذا الكود بدلا من الكود السابق
<smallfont>كل سنة وإنت طيب يا $post[username]<br>
$birthday<br>
( $age )<font color="#3457E4"></smallfont>
وبذلك سيعمل الهاك تحياتي
المسافر...