- الرئيسية
- ما الجديد !
-
الصفحات▼
الصفحات
أهلا وسهلا بك زائرنا الكريم في منتدى دعم PBBoard الرسمي، لكي تتمكن من المشاركة ومشاهدة جميع أقسام المنتدى وكافة الميزات ، يجب عليك إنشاء حساب جديد بالتسجيل بالضغط هنا أو تسجيل الدخول اضغط هنا إذا كنت عضواً .
مكن إضافة معدل مشاركات العضو في قالب writer_info
-
-
مكن إضافة معدل مشاركات العضو في قالب writer_info21-10-2012 11:51 صباحاً
-
Solimanمعلومات الكاتبPBBoard developer
- انضم في :
- 18-07-2009
- رقم العضوية :
- 1
- المشاركات :
- 13422
- الدولة :
- KSA
- الجنس:
- الدعوات:
- 55
- قوة السمعة:
- 82296
- موقعي:
- زيارة موقعي
-
تفضل الطريقة لإضافة معدل المشاركات اليومية تحتاج تركيز
حرر ملف includes/functions.class.php
وابحث عن :
CODEfunction GetEditorTools()<br />
واضف اعلاها :
CODEfunction pbb_number_format($number, $decimals = 0, $bytesize = false) { global $PowerBB; $type = ''; if (empty($number)) { return 0; } else if (preg_match('#^(\\d+(?:\\.\\d+)?)(?>\\s*)([mkg])b?$#i', trim($number), $matches)) { switch(strtolower($matches[2])) { case 'g': $number = $matches[1] * 1073741824; break; case 'm': $number = $matches[1] * 1048576; break; case 'k': $number = $matches[1] * 1024; break; default: $number = $matches[1] * 1; } } if ($bytesize) { if ($number >= 1073741824) { $number = $number / 1073741824; $decimals = 2; $type = " GB"; } else if ($number >= 1048576) { $number = $number / 1048576; $decimals = 2; $type = " MB"; } else if ($number >= 1024) { $number = $number / 1024; $decimals = 1; $type = " KB"; } else { $decimals = 0; $type = " $vbphrase[bytes]"; } } return str_replace('_', ' ', number_format($number, $decimals)) . $type; }
ثم حرر ملف : modules/topic.module.php
وابحث عن :
CODE$extraEmptyFields=$PowerBB->extrafield->getEmptyLoginFields(true);
واضف اعلاه :
CODEif ($jointime < 1) { // User has been a member for less than one day. $postsperday = $PowerBB->functions->pbb_number_format($this->Info['posts']); } else { $postsperday = $PowerBB->functions->pbb_number_format($this->Info['posts'] / $jointime, 2); } $this->Info['postsperday'] = $postsperday;
إذا كنت تستخدم نسخة من الجيل الثاني ابحث عن :
CODEif (is_numeric($this->RInfo[$this->x]['register_date']))
اضف اعلاه :
CODE$jointime = ($PowerBB->_CONF['now'] - $this->RInfo[$this->x]['register_date']) / 86400; // Days Joined if ($jointime < 1) { // User has been a member for less than one day. $postsperday = $PowerBB->functions->pbb_number_format($this->RInfo[$this->x]['posts']); } else { $postsperday = $PowerBB->functions->pbb_number_format($this->RInfo[$this->x]['posts'] / $jointime, 2); } $this->Info['postsperday'] = $postsperday;
حرر قالب: writer_info
ابحث عن :
CODE{$lang['posts']} : {$Info['posts']} </div>
اضف اسفله :
CODE{if {$Info['postsperday']} != ''} <div class="writer_info" align="right"> بمعدل : {$Info['postsperday']} يومياً </div> {/if}
إذا كنت تستخدم نسخة من ال جيل الثالث :
ابحث عن :
CODE$ReplierInfo = $PowerBB->core->GetInfo($MemberArr,'member');
اضف اسفله :
CODE$jointime = ($PowerBB->_CONF['now'] - $ReplierInfo['register_date']) / 86400; // Days Joined if ($jointime < 1) { // User has been a member for less than one day. $postsperday = $PowerBB->functions->pbb_number_format($ReplierInfo['posts']); } else { $postsperday = $PowerBB->functions->pbb_number_format($ReplierInfo['posts'] / $jointime, 2); } $ReplierInfo['postsperday'] = $postsperday;
حرر قالب: writer_info
ابحث عن :
CODE{$lang['posts']} : {$ReplierInfo['posts']} </div>
اضف اسفله :
CODE{if {$ReplierInfo['postsperday']} != ''} <div class="writer_info" align="right"> بمعدل : {$ReplierInfo['postsperday']} يومياً </div> {/if}
أنتهى ..
وهنا اضافة مشابهه لهاك اسمه النشاط للجيل الثاني
https://pbboard.info/forums/post-49052&num=2
تم تحرير المشاركة بواسطة :Soliman بتاريخ:21-10-2012 11:53 صباحاً
الساعة الآن 04:54 PM