عرض مشاركة واحدة
قديم 07-11-06, 12:03 PM   #1
عضو مميز
 
الصورة الرمزية بندر الحربي

 










 

بندر الحربي غير متواجد حالياً

بندر الحربي will become famous soon enoughبندر الحربي will become famous soon enoughبندر الحربي will become famous soon enoughبندر الحربي will become famous soon enoughبندر الحربي will become famous soon enoughبندر الحربي will become famous soon enoughبندر الحربي will become famous soon enoughبندر الحربي will become famous soon enoughبندر الحربي will become famous soon enoughبندر الحربي will become famous soon enoughبندر الحربي will become famous soon enough

افتراضي هاك التاريخ الهجري لنسخة 3.6.2 مجربه ومضمونه مع مثال

هاك التاريخ الهجري والوقت من PM و AM الى مساء وصباحا
اليكم الهاك
في ملف includes/functions إبحث عن :
كود PHP:
return $returndate;
}
else
{
return 
$datefunc($format$timestamp_adjusted);
}

إستبدله بما يلي :
كود PHP:
// التاريخ الهجري
return hijri($timestamp_adjusted,$format);
}
else
{
//by all-the-vb (vbulletin-arab.net)
$all_the_vb=$datefunc($format$timestamp_adjusted);
$all_the_vb=preg_replace('/AM/''صباحاً'$all_the_vb);
$all_the_vb=preg_replace('/PM/''مساء'$all_the_vb);
return 
$all_the_vb;
}
}
// ###################### Start hijri #######################
function hijri($GetDateFormat,$DFormat)
{
//start function
$GetDateFormat=date($DFormat,$GetDateFormat);
$Days=@date("D"); //print day name+Saturday-->Friday
//start hijri function date
$TDays=round(strtotime($GetDateFormat)/(3600*24));
$HYear=round($TDays/354.3667);
$Remain=$TDays-($HYear*354.3667);
$HMonths=round($Remain/29.5305);
$HDays=$Remain-($HMonths*29.5305);
$HYear=$HYear+1389;
$HMonths=$HMonths+10;
$HDays=$HDays+23;
//hijri function days between [29:30]
if ($HDays>29.5305 and round($HDays)!=30)
{
$HMonths=$HMonths+1;
$HDays=Round($HDays-29.5305);
}
else
{
$HDays=Round($HDays);
}
//hijri function months
if ($HMonths>12)
{
$HMonths=$HMonths-12;
$HYear=$HYear+1;
}
//hijri month names [print month name]
if ($HMonths=="1"$hmname="محرم";
if (
$HMonths=="2"$hmname="صفر";
if (
$HMonths=="3"$hmname="ربيع الأول";
if (
$HMonths=="4"$hmname="ربيع الثاني";
if (
$HMonths=="5"$hmname="جمادى الأولى";
if (
$HMonths=="6"$hmname="جمادى الثانية";
if (
$HMonths=="7"$hmname="رجب";
if (
$HMonths=="8"$hmname="شعبان";
if (
$HMonths=="9"$hmname="رمضان";
if (
$HMonths=="10"$hmname="شوال";
if (
$HMonths=="11"$hmname="ذو القعدة";
if (
$HMonths=="12"$hmname="ذو الحجة";
//day function [print day name]
if ($Days=="Sat"$dd="السبت";
if (
$Days=="Sun"$dd="الأحد";
if (
$Days=="Mon"$dd="الاثنين";
if (
$Days=="Tue"$dd="الثلاثاء";
if (
$Days=="Wed"$dd="الأربعاء";
if (
$Days=="Thu"$dd="الخميس";
if (
$Days=="Fri"$dd="الجمعة";
$les strlen($DFormat);
for(
$i=0$i<=$les$i++)
{
$df[$i]= substr ($DFormat,$i,1);
if(
$df[$i]=="A" || $df[$i]=="a")
{
$ddf=@date("a",$GetDateFormat);
if(
substr($ddf,0,1)=="a")
{
$Result.="صباحاً";
}
else
{
$Result>="مساءً";
}
}
elseif(
$df[$i]=="D") {$Result.="$dd";}
elseif(
$df[$i]=="d") {$Result.="$HDays";}
elseif(
$df[$i]=="m") {$Result.="$HMonths";}
elseif(
$df[$i]=="M") {$Result.="$hmname";}
elseif(
$df[$i]=="y") {$Result.="$HYear";}
elseif(
$df[$i]=="Y") {$Result.="$HYear"."هجري";}
elseif(
$df[$i]=="g") {$Result.=@date("g",$GetDateFormat);}
elseif(
$df[$i]=="G") {$Result.=@date("G",$GetDateFormat);}
elseif(
$df[$i]=="i") {$Result.=@date("i",$GetDateFormat);}
elseif(
$df[$i]=="H") {$Result.=@date("H",$GetDateFormat);}
elseif(
$df[$i]=="h") {$Result.=@date("i",$GetDateFormat);}
elseif(
$df[$i]=="s") {$Result.=@date("s",$GetDateFormat);}
else
{
$Result.=$df[$i];
}
}
return 
$Result;
//end hijri function date
}
// نهاية التاريخ الهجري 
وللمعلومية فسيقوم الهاك أيضا بإستبدال AM و PM إلى صباحا ومساءا
واخيرا اطلب العنوان التالى
http://batinah.com/vb/admincp/options....group=datetime
مع تعديله الى عنوان منتداك
وابحث عن مربع:
Format For Date
وباالحقل الى بجانبه استبدله بي d M Y
واضغط على save أو حفظ
وبالتوفيق مع كل الشكر للاخ الذى قام بكاتبة الدالة للتاريخ الهجري ومبرمج الهاك
مع أجمل تحية .
انا جربت الهاك وعمل على منتداي ولله الحمد وبدون مشاكل
واحد بقول سويت كل شي بس طلع لي التاريخ والشهر والسنة خطاء اقوله ادخل لوحة التحكم
واعمل الاتي
وابحث عن مربع:
الوقت والتاريخ
وباالحقل الى بجانبه استبدله بي d M Y
واضغط على save أو حفظ
منقول




التوقيع :
    رد مع اقتباس