|
||||||
| أرشيف تطوير منتديات vb3.0.0 :: يمنع منعاً باتا ً .. كتابة أي موضوع يهتم بمشاكل المنتديات (( يمنع وضع نسخ vBulletin )) |
|
|
LinkBack | أدوات الموضوع | طرق العرض |
|
||||
|
بسم الله الرحمن الرحيم السلام عليكم ورحمة الله وبركاته إخواني الكل يعلم بالمشاكل التي قد تحدث عند تركيب هاك إحصائيات كل قسم مع هاك أفضل خمس أعضاء بالقسم وذلك عند إختفاء جدول عرض أفضل أعضاء هذا القسم وعدم ظهوره وأيضا عدم تعريب بعض الكلمات مثال .. لقد قمت بكتابة 3 posts في هذا القسم. (0 threads و 3 replies) والآن أقدم لكم الحل لهذه المشاكل .. وهيَّ القيام بتركيب الهاكين دفعة واحدة مع بعض الإضافات الجميلة والتصحيح إليكم الطريقة الصحيحة للتركيب أولا إليكم مثال : http://www.3tr-sad.com/vb/forumdisplay.php?f=155 ************************ الملفات التي سوف يتم التعديل عليها ملف واحد فقط القوالب التي سوف يتم التعديل عليها قالب واحد فقط القوالب التي سنضيفها قالبين ******************* ملاحظة هامة جدا : 1- قم بعمل نسخة من كل ملف أو تمبلت تقوم بالتعديل عليه .. للرجوع إليه في حالة الخطأ لا سمح الله 2 - إن كنت قد قمت بتركيب أحد الهاكين فنرجو منك إزالته قبل القيام بالتركيب بسم الله نبدا شرح تركيب الهاكين دفعة واحدة أولا قم بفتح ملف forumdisplay.php قم بالبحث عن رمز Code:
'mailqueue' رمز Code:
'forumstatscache', 'mailqueue' رمز Code:
'FORUMDISPLAY', رمز Code:
'FORUMDISPLAY', 'forumdisplay_quickstats', ابحث عن : رمز Code:
'forumhome_lastpostby', رمز Code:
'forumdisplay_topposter', رمز Code:
$lastread = $bbuserinfo['lastvisit']; } رمز Code:
$topposter='';
$top = $DB_site->query("
SELECT count(post.postid) AS total_post,count(thread.threadid) AS total_thread, user.userid,user.username,user.joindate from " . TABLE_PREFIX . "user AS user
LEFT JOIN " . TABLE_PREFIX . "post AS post ON(user.userid = post.userid)
LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON(post.threadid = thread.threadid) where
thread.forumid='$forumid'
group by user.userid order by total_post DESC LIMIT 5");
$counteruser=0;
while ($topp = $DB_site->fetch_array($top))
{
$counteruser++;
$topp['joindate'] = vbdate($vboptions['dateformat'], $topp['joindate'], true);
eval('$topposter .= "' . fetch_template('forumdisplay_topposter') . '";');
}
رمز Code:
while ($thread = $DB_site->fetch_array($threads)) رمز Code:
////////////////////////////// BOOFO'S FORUM QUICK STATS CACHE HACK //////////////////////////////
$forumstatscache = unserialize($datastore['forumstatscache']);
$forumstats = $forumstatscache[$forumid];
$updatetime = $vboptions['forumcachetime'];
$statsupdate = '';
if ($forumstats['lastupdate'] == 0 OR ($forumstats['lastupdate'] + ($updatetime * 60)) < TIMENOW)
{
$numcount=$DB_site->query_first("
SELECT COUNT(threadid) AS threads, SUM(replycount) AS replies, SUM(views) AS views
FROM " . TABLE_PREFIX . "thread
WHERE forumid=$forumid
");
$forumid = intval($forumid);
$threadavg = $DB_site->query_first("
SELECT AVG(votetotal / votenum) AS avgrating
FROM " . TABLE_PREFIX . "thread
WHERE forumid=$forumid
AND votenum <> 0
");
$topthreads = $DB_site->query_first("
SELECT COUNT(threadid) as threads, postusername, postuserid
FROM " . TABLE_PREFIX . "thread
WHERE forumid=$forumid
GROUP BY postuserid
ORDER BY threads DESC, dateline ASC
LIMIT 1
");
$attachs=$DB_site->query_first("
SELECT forum.title AS forum, COUNT(attachment.attachmentid) AS count, SUM(IF(thumbnail = '', 0, 1)) AS thumbs, SUM(IF(thumbnail = '', 1, 0)) AS files, SUM(attachment.filesize) AS bytes
FROM " . TABLE_PREFIX . "attachment, " . TABLE_PREFIX . "post, " . TABLE_PREFIX . "thread, " . TABLE_PREFIX . "forum
WHERE attachment.postid = post.postid
AND post.threadid=thread.threadid
AND forum.forumid=thread.forumid
AND forum.forumid=$forumid
GROUP BY thread.forumid
ORDER BY count DESC
");
$forumstats['numthreads'] = intval ($numcount[threads]);
$forumstats['numreplies'] = intval ($numcount[replies]);
$forumstats['numviews'] = intval ($numcount[views]);
$forumstats['topthreadscount'] = intval ($topthreads[threads]);
$forumstats['topthreadsid'] = intval ($topthreads[postuserid]);
$forumstats['topthreadsun'] = ($topthreads[postusername]);
$forumstats['topthreadspercent'] = round(100 * ($topthreads[threads] / $numcount[threads]), 2);
$forumstats['toppostercount'] = intval ($topposter[postcount]);
$forumstats['topposterid'] = intval ($topposter[userid]);
$forumstats['topposterun'] = ($topposter[username]);
$forumstats['topposterpercent'] = round(100 * ($topposter[postcount] / ($numcount[threads] + $numcount[replies])), 2);
$forumstats['attachscount'] = intval ($attachs[count]);
$forumstats['attachsbytes'] = intval ($attachs[bytes]);
$forumstats['attachsthumbs'] = intval ($attachs[thumbs]);
$forumstats['attachsfiles'] = intval ($attachs[files]);
$forumstats['avgrating'] = intval (round($threadavg[avgrating]));
$forumstats['lastupdate'] = intval (TIMENOW);
$forumstatscache[$forumid] = $forumstats;
$DB_site->query ("
REPLACE INTO " . TABLE_PREFIX . "datastore
(title, data)
VALUES
('forumstatscache', '" . addslashes ( serialize ( $forumstatscache ) ) . "')
");
}
$forumstats['numthreads'] = vb_number_format($forumstats['numthreads']);
$forumstats['numreplies'] = vb_number_format($forumstats['numreplies']);
$forumstats['numviews'] = vb_number_format($forumstats['numviews']);
$forumstats['topthreadscount'] = vb_number_format($forumstats['topthreadscount']);
$forumstats['toppostercount'] = vb_number_format($forumstats['toppostercount']);
$forumstats['attachscount'] = vb_number_format($forumstats['attachscount']);
$forumstats['attachsbytes'] = vb_number_format($forumstats['attachsbytes'], 2, true);
$forumstats['attachsthumbs'] = vb_number_format($forumstats['attachsthumbs']);
$forumstats['attachsfiles'] = vb_number_format($forumstats['attachsfiles']);
$forumstats['avgrating'] = vb_number_format($forumstats['avgrating']);
if (($forumstats['topthreadspercent'] % 10) == 0)
$forumstats['topthreadspercent'] = vb_number_format($forumstats['topthreadspercent']) . '%';
else
$forumstats['topthreadspercent'] = vb_number_format($forumstats['topthreadspercent'], 2) . '%';
if (($forumstats['topposterpercent'] % 10) == 0)
$forumstats['topposterpercent'] = vb_number_format($forumstats['topposterpercent']) . '%';
else
$forumstats['topposterpercent'] = vb_number_format($forumstats['topposterpercent'], 2) . '%';
$getupdatetime = vbdate("$vboptions[timeformat] - F jS, Y", $forumstats['lastupdate']);
$statsupdate = "<font color=green>Last updated at $getupdatetime</font>";
$yourpost = $DB_site->query_first("
SELECT forum.title, forum.forumid, COUNT( post.postid ) AS yourposts, SUM( IF( thread.postuserid = $bbuserinfo[userid] AND post.dateline = thread.dateline , 1, 0 ) ) AS yourthreads
FROM " . TABLE_PREFIX . "forum, " . TABLE_PREFIX . "thread, " . TABLE_PREFIX . "post
WHERE forum.forumid = thread.forumid
AND thread.threadid = post.threadid
AND post.userid = $bbuserinfo[userid]
AND forum.forumid = $forumid
GROUP BY forum.forumid
ORDER BY yourposts
DESC LIMIT 1
");
$yourposts = $yourpost['yourposts'];
$yourthreads = $yourpost['yourthreads'];
$yourreplies = $yourposts - $yourthreads;
$yourposts = vb_number_format($yourposts);
$yourthreads = vb_number_format($yourthreads);
$yourreplies = vb_number_format($yourreplies);
if ($yourposts =="1")
{
$yourposts = $yourposts . " مشاركات";
}
else
{
$yourposts = $yourposts . " مشاركات";
}
if ($yourthreads =="1")
{
$yourthreads = $yourthreads . " مواضيع";
}
else
{
$yourthreads = $yourthreads . " مواضيع";
}
if ($yourreplies =="1")
{
$yourreplies = $yourreplies . " ردود";
}
else
{
$yourreplies = $yourreplies . " ردود";
}
if ($forumstats[attachsthumbs] =="1")
{
$forumstats[attachsthumbs] = "<strong>" . $forumstats[attachsthumbs] . "</strong> Image";
}
else
{
$forumstats[attachsthumbs] = "<strong>" . $forumstats[attachsthumbs] . "</strong> Images";
}
if ($forumstats[attachsfiles] =="1")
{
$forumstats[attachsfiles] = "<strong>" . $forumstats[attachsfiles] . "</strong> File";
}
else
{
$forumstats[attachsfiles] = "<strong>" . $forumstats[attachsfiles] . "</strong> Files";
}
eval('$forumdisplayquickstats = "' . fetch_template('forumdisplay_quickstats') . '";');
////////////////////////////// BOOFO'S FORUM QUICK STATS CACHE HACK //////////////////////////////
رمز Code:
// ### BUILD FORUMS LIST ################################################# رمز Code:
// Logician Last Post Minute Hack
if ($forumcache[$forumid]['lastpost'] AND $forumcache[$forumid]['lastpost']>0)
{
$lastpostdateline=(time()-$forumcache[$forumid]['lastpost'])/60;
if ($lastpostdateline<1) {
if (($lastpostdateline*60)<1) {$lastpostmin=" Now!";}
elseif (($lastpostdateline*60)<2) {$lastpostmin=(int)($lastpostdateline*60)." second ago!";}
else {$lastpostmin=(int)($lastpostdateline*60)." seconds ago!";}
}
elseif ($lastpostdateline<2) {$lastpostmin=(int)($lastpostdateline)." minute ago";}
elseif ($lastpostdateline<60) {$lastpostmin=(int)($lastpostdateline)." minutes ago";}
elseif ($lastpostdateline<(120)) {$lastpostmin=(int)($lastpostdateline/60)." hour ago";}
elseif ($lastpostdateline<(60*24)) {$lastpostmin=(int)($lastpostdateline/60)." hours ago";}
elseif ($lastpostdateline<(60*48)) {$lastpostmin=" Yesterday";}
else {$lastpostmin=((int)($lastpostdateline/(60*24)))." days ago";}
$lastthreadid = $forumcache[$forumid]['lastthreadid'];
$lastposter = $forumcache[$forumid]['lastposter'];
}
// Logician Last Post Minute Hack
الآن نأتي إلى القوالب : ابحث عن قالب forumdisplay قم بالبحث عن : رمز Code:
$navbar رمز Code:
$forumdisplayquickstats <br /> <table border="0" cellspacing="$stylevar[cellspacing]" cellpadding="4" class="tborder" width="$stylevar[tablewidth]"> <tr width="100%" class="alt1"> <td class="thead" width="50%" align="$stylevar[left]">أفضل خمس أعضاء</td> <td class="thead" width="50%" align="$stylevar[left]">المشاركات</td> $topposter </table> جاء دور إضافة القوالب : اضف قالب جديد باسم forumdisplay_topposter واضف فيه محتوى المرفق الذي ارفقته لكم باسمه وأيضا أضف قالب جديد باسم forumdisplay_quickstats واضف فيه محتوى المرفق المعدل الذي ارفقته لكم باسمه ومبروك عليكم الهاك تعديل وتطوير : X Skill
التعديل الأخير كان بواسطة X7 Skill; 19 - 12 - 2005 الساعة 17:43
|
|
ولا حرمانك يارب مشكور يا بعدهم والله والله يجعلها في موازين حسناتك يارب وسلملم |
|
|
الله يخليك حبيبي ولا يحرمنا منك بعد يالغالي وأي استفسار حبيب قلبي أنا في الخدمة أخووووك X Skill |
|
الله يعافيك حبيبي ههههههههههاع هذا منتداية ... كيف ما بيشتغل .. السيرفر حق الشركة ضعيف .. سووي له تحديث مرتين وبيعمل معاك .. وأدعووو ان شاء الله تنحل المشكلة واي شي أنا بالخدمة أخووك X Skill |
||||||||||||||||||||||||
|
:: عضو نشيط ::
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
عموماً شكراً على المجهود ووصلت الفكرة
|
|||||||||||||||||||||||
| العلامات المرجعية |
| أدوات الموضوع | |
| طرق العرض | |
|
|