بحث متقدم | التسجيل
الويب العربي
  تسجيل دخول
 
   
   

  ملاحظة
الموقع متاح للإطلاع والقراءة فقط، المشاركة والمواضيع الجديدة غير متاحة حالياً لحين تطوير الموقع.




الموقع متاح للإطلاع والقراءة فقط، المشاركة والمواضيع الجديدة غير متاحة حالياً لحين تطوير الموقع.

عـودة للخلف   الويب العربي المركز التعليمي المجاني تطويرالمواقع

تطويرالمواقع تبادل خبرات ، سكربتات ، تصاميم ،استفسارات

موضوع مغلق اضف موضوع جديد
 
خيارات الموضوع طريقة العرض
  #1  
قديم 10-12-2005, 03:38 AM
صعب المنال صعب المنال غير متصل
عضو
 
تاريخ التسجيل: May 2005
مشاركة: 267
مستوى تقييم العضوية: 20
صعب المنال is on a distinguished road
الافتراضي

هاك إحصائيات كل قسم

افتح ملف/ forumdisplay.php
ابحث عن/
كود PHP:
'mailqueue' 
أستبدله/
كود PHP:
    'forumstatscache',
    
'mailqueue' 
ابحث عن/
كود PHP:
'FORUMDISPLAY'
أستبدله/
كود PHP:
'FORUMDISPLAY',
        
'forumdisplay_quickstats'
ابحث عن/
كود PHP:
while ($thread $DB_site->fetch_array($threads)) 
في أعلاه ضع هذا /
كود PHP:
////////////////////////////// BOOFO'S FORUM QUICK STATS CACHE HACK //////////////////////////////
$forumstatscache unserialize($datastore['forumstatscache']);
$forumstats $forumstatscache[$forumid];

$updatetime $vboptions['forumcachetime'];
$statsupdate '';

if (
$forumstats['lastupdate'] == 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
    "
);

    
$topposter $DB_site->query_first("
        SELECT user.userid, user.username, COUNT(post.postid) AS postcount
        FROM " 
TABLE_PREFIX "post
        LEFT JOIN " 
TABLE_PREFIX "thread ON (post.threadid = thread.threadid)
        LEFT JOIN " 
TABLE_PREFIX "user ON (post.userid = user.userid)
        WHERE thread.forumid=
$forumid
        GROUP BY post.userid
        ORDER BY postcount DESC
        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'], 2true);
    
$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 " post";
        }
        else
        {
            
$yourposts $yourposts " posts";
        }
        if (
$yourthreads =="1")
        {
            
$yourthreads $yourthreads " thread";
        }
        else
        {
            
$yourthreads $yourthreads " threads";
        }
        if (
$yourreplies =="1")
        {
            
$yourreplies $yourreplies " reply";
        }
        else
        {
            
$yourreplies $yourreplies " replies";
        }

        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 ////////////////////////////// 
ابحث عن/
كود PHP:
// ### BUILD FORUMS LIST ################################################# 
في أعلاه ضع هذا /
كود PHP:
// 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_quickstats
كود PHP:
<table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tbody>
<
tr>
    <
td class="tfoot"><strong>
        <
a style="float:$stylevar[right]href="#top" onclick="return toggle_collapse('forumstats')"><img id="collapseimg_forumstats" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumstats].gif" alt="" border="0" /></a>
    <
span lang="ar-sa">إحصائية القسم</span> - <i>$foruminfo[title]</i></strong>
    </
td>
</
tr>
</
tbody>
<
tbody id="collapseobj_forumstats" style="$vbcollapse[collapseobj_forumstats]">
<
tr>
    <
td class="panelsurround" align="center">

    <
table class="panel" cellpadding="0" cellspacing="$stylevar[formspacer]border="0" width="100%">
    <
tr>
        <
td align="$stylevar[left]">
            <
fieldset class="fieldset" style="margin:0px">
                <
legend><font color=green>$statsupdate</font></legend>
                <
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0">
                <
tr>
                    <
td colspan="2" nowrap="nowrap"><div class="smallfont">
                      <
span lang="ar-sa">عدد المواضيع</span>: <strong>$forumstats[numthreads]</strong></div></td>
                </
tr>
                <
tr>
                    <
td nowrap="nowrap"><span class="smallfont">
                    <
a href="$vboptions[bburl]/showthread.php?$session[sessionurl]goto=newpost&t=$lastthreadid">
                    <
span lang="ar-sa">آخر مشاركة</span></a>: <strong>$lastpostmin </strong></span></td>
                </
tr>
                <
tr>
                    <
td nowrap="nowrap"><span class="smallfont">
                    <
span lang="ar-sa">أعلى المواضيع</span>: <a href="member.php?$session[sessionurl]u=$forumstats[topthreadsid]target="_blank">$forumstats[topthreadsun]</a> (<strong>$forumstats[topthreadscount]</strong>
                    <
span lang="ar-sa">المواضيع</span> = <strong>$forumstats[topthreadspercent]</strong>)</span></td>
                    </
tr>
                    <if 
condition="$forumstats[attachscount] !='0'">
                <
tr>
                    <
td nowrap="nowrap"><span class="smallfont">
                    <
span lang="ar-sa">عدد المرفقات</span>: <strong>$forumstats[attachscount]</strong> ($forumstats[attachsthumbs] - $forumstats[attachsfiles])</span></td>
                </
tr>
                    </if>
                <
tr>
                    <
td nowrap="nowrap"><span class="smallfont">
                    <
span lang="ar-sa">معدل التصويت للموضوع</span>: <img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$forumstats[avgrating].gif" alt="some text"></span></td>
                </
tr>
                </
table>
            </
fieldset>
        </
td>
        <
td align="$stylevar[left]">
            <
fieldset class="fieldset" style="margin:0px">
                <
legend>$statsupdate</legend>
                <
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0">
                <
tr>
                    <
td colspan="2" nowrap="nowrap"><span class="smallfont">
                    <
span lang="ar-sa">عدد الردود</span>: <strong>$forumstats[numreplies]</strong></span></td>
                </
tr>
                <
tr>
                    <
td nowrap="nowrap"><span class="smallfont">
                    <
span lang="ar-sa">آخر كاتب</span>: <a href="member.php?$session[sessionurl]find=lastposter&amp;f=$forumidtarget="_blank">$lastposter</a></span></td>
                </
tr>
                <
tr>
                    <
td nowrap="nowrap"><span class="smallfont">
                    <
span lang="ar-sa">أكثر عضو مشارك</span>: <a href="member.php?$session[sessionurl]u=$forumstats[topposterid]target=_blank>$forumstats[topposterun]</a> (<strong>$forumstats[toppostercount]</strong>
                    <
span lang="ar-sa">الردود</span> = <strong>$forumstats[topposterpercent]</strong>)</span></td>
                </
tr>
                    <if 
condition="$forumstats[attachscount] !='0'">
                <
tr>
                    <
td nowrap="nowrap"><span class="smallfont">
                    <
span lang="ar-sa">حجم المرفقات</span>: <strong>$forumstats[attachsbytes]</strong></span></td>
                </
tr>
                    </if>
                <
tr>
                    <
td nowrap="nowrap"><span class="smallfont">
                    <
span lang="ar-sa">إجمالي المشاهدات</span>: <strong>$forumstats[numviews]</strong></span></td>
                </
tr>
                </
table>
            </
fieldset>
        </
td>
    </
tr>
    </
table>
<
tr>
<if 
condition="$yourposts != 0">
        <
td class="thead" align="center" nowrap="nowrap" colspan="2"><if condition="$forumstats[topposterun] == $bbuserinfo[username]"><strong>
        
$bbuserinfo[username], <span lang="ar-sa">&nbsp;في هذا القسم أنت</span>
        <
span lang="ar-sa"><font color="#800000">أكثر مشاركة</font></span>
        <
span lang="ar-sa">بعدد المشاركات</span$yourposts</strong>. (<strong>$yourthreads 
        
<span lang="ar-sa">و</span$yourreplies</strong>)<else /><strong>$bbuserinfo[username], 
        <
span lang="ar-sa">لقد قمت بكتابة</span$yourposts <span lang="ar-sa">
        
في هذا القسم</span></strong>. (<strong>$yourthreads <span lang="ar-sa">و</span$yourreplies</strong>)</if></td>
<else />
    <
td class="thead" align="center" nowrap="nowrap" colspan="2"><strong>
    
$bbuserinfo[username], <span lang="ar-sa">لم تشارك في هذا القسم حتى الآن</span></strong>.</td>
</if>
</
tr>
</
tbody>
</
table>
<
br /> 
افتح تمبلت/ForumDisplay
ابحث عن/
كود PHP:
$navbar 
أضف فوقه /
كود PHP:
$forumdisplayquickstats 





موضوع مغلق




قوانين المشاركة
لا يمكنك إضافة موضوع جديد
لا يمكنك الرد على المواضيع
لا يمكنك إضافة مرفقات
لا يمكنك تعديل مشاركاتك

كود vB متاح
كود [IMG] متاح
كود HTML مغلق
إنتقل إلى

مواضيع مشابهة
الموضوع الكاتب القسم مشاركة آخر مشاركة
الدعم العربي لمنتديات phpbb3 الجيل الثالث مكسرات دعم وتطوير الـ PHPBB 5 07-06-2007 11:39 PM
نسخة ( السوبر ) لمنتديات الجيل الثالث + استايل احترافي = .. SAT مزاد المواقع 2 15-03-2007 09:01 PM
ثغره للـ vb الجيل الثالث تعرف عليها بمنتداك 90% مصاب بها جنتل أمن المعلومات 12 06-07-2005 03:30 PM
استايل لمنتديات الجيل الثالث للبيع::. أسياد الامارات مزاد المواقع 0 23-02-2005 07:50 PM


جميع الأوقات بتوقيت مكة المكرمة. الساعة الآن » 08:19 PM.

Powered by vBulletin
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.


 
 »  خدمات البرمجة   »  رئيسية الدليل
  »  خدمات التصميم   »  الأمن والحماية
  »  الدعاية والتسويق
  »  الدعم والتطوير
  »  الشركات الرسمية
  »  حجز دومينات
  »  خدمات الإستضافة
 
 
  »  مكتبة الإستايلات   »  رئيسية المكتبة
  »  أكواد برمجية   »  أدوات الويب ماسترز
  »  مكتبة الهاكات   »  أدوات المصممين
  »  سكربتات متنوعة
  »  مجلات إلكترونية
  »  بلوكات متنوعة
  »  ثيمات مختلفة
 
 

صحيفة متخصصة في متابعة أخبار وجديد الإنترنت العربي
والحوارات الصحفية ومعلومات تقنية متنوعة .

   
 
 

للتواصل مع فريق عمل الويب العربي
يمكنك ذالك من خلال مركز الدعم والمساندة.

 الدعم الفني |  اعتماد العضويات |  قوانين الإنتساب |  إتفاقية الإستخدام |  أهداف الويب العربي |  دليل الشركات |  مكتبة الويب |  صحيفة الويب العربي |  الرئيسية