- الرئيسية
- ما الجديد !
-
الصفحات▼
الصفحات
أهلا وسهلا بك زائرنا الكريم في منتدى دعم PBBoard الرسمي، لكي تتمكن من المشاركة ومشاهدة جميع أقسام المنتدى وكافة الميزات ، يجب عليك إنشاء حساب جديد بالتسجيل بالضغط هنا أو تسجيل الدخول اضغط هنا إذا كنت عضواً .
Making detailed settings for hours
-
-
[مجابه] Making detailed settings for hours14-10-2011 08:58 صباحاً
-
Solimanمعلومات الكاتبPBBoard developer
- انضم في :
- 18-07-2009
- رقم العضوية :
- 1
- المشاركات :
- 13422
- الدولة :
- KSA
- الجنس:
- الدعوات:
- 55
- قوة السمعة:
- 82296
- موقعي:
- زيارة موقعي
-
Old, but does not prevent that by adding the solution with respect to time
To make history last post on the subject appear on the home page instead of the time when the past history
Open the file: engine/ibs/functions.class.php
And search for:
CODEfunction BackHTML($text)
Place the top:
CODEfunction arabi_time_ago($input,$type = 'ty') { /* get it from :http://css-tricks.com/snippets/php/time-ago-function/ translated by :codeboxy */ if($input > time()){ return false; exit; } $period = array ("seconds", "minute", "hour", "Day", "week", "month", "Year", "decade"); $periods = array ("sec", "minutes", "hours", "days", "weeks", "months", "years", "decade"); $periodtw = array ("two seconds", "minutes", "hours", "day", "two weeks", "two months", "two", "decade"); $lengths = array("60","60","24","7","4.35","12","10"); $now = time(); $difference = $now - $input; for($j = 0; $difference >= $lengths[$j] && $j < count($lengths)-1; $j++) { $difference /= $lengths[$j]; } $difference = round($difference); if($difference == 2){ $x = $periodtw[$j]; return "ago $x"; }elseif($difference != 1 and $difference <= 10) { $x= $periods[$j]; return "ago $difference $x"; }else{ $x = $period[$j]; return "ago $difference $x"; } }
# And save the file
--------------------------------------------
Open the file: includes/functions.class.php
And search for:
CODE$forum['last_date'] = $PowerBB->functions->date($forum_last_time1);
And replace with:
CODE$forum['last_date'] = $PowerBB->sys_functions->arabi_time_ago($forum_last_time1);
# And save the file
Ended ...
الساعة الآن 09:08 AM