|
Sorularınızı
sorarken başlıkta "Acil, yardım, biri yardım etsin, bir bakın, çözümü nedir?,
yardım edecek yok mu?" gibi başlıklar kullanmayınız. Başlıklar okuyan
kişilere mesaj içeriği ile ilgili bilgi vermesi için var. Ve bilgi vermeyen
başlık yöneticiler tarafından kilitlenebilir, silinebilir, değiştirilebilir.
| Turkish Nuke Forum Ana Sayfası
-> vBulletin
-> Eklentiler -> Gelişmiş "İstatistikler" Menüsü [vB 3.0.0] |
|
|
| |
|
Site Admin

Kayıt: Jan 28, 2005
Mesajlar: 1707
Nerden: İstanbul/Avcılar
|
|
Toplam konular, en çok mesaj atan, en aktif üye, profiline en çok bakılan üye vs...Kodları Türkçeleştirdim fakat gözümden kaçan noktalar olmuş olabilir çünkü eklentiyi kurup denemedim. Eksik yer varsa bildirin lütfen...
- Alttaki SQL döngülerini gerçekleştirin;
| Kod: |
INSERT INTO datastore ( title, data ) VALUES (
'statscache' ,'a:20:{
s:10:"newthreads";s:1:"0";
s:8:"newposts";s:1:"0";
s:8:"newusers";s:1:"0";
s:14:"getthreadviews";s:1:"0";
s:9:"topposter";s:0:"";
s:11:"topposterid";s:1:"0";
s:14:"toppostercount";s:1:"0";
s:10:"topstarter";s:0:"";
s:12:"topstarterid";s:1:"0";
s:15:"topstartercount";s:1:"0";
s:14:"getfileviewsun";s:0:"";
s:14:"getfileviewsid";s:1:"0";
s:12:"getfileviews";s:1:"0";
s:4:"ref2";s:0:"";
s:13:"topreferrerid";s:1:"0";
s:3:"ref";s:1:"0";
s:8:"toprepun";s:0:"";
s:8:"toprepid";s:1:"0";
s:9:"topreprep";s:1:"0";
s:10:"lastupdate";s:1:"0";
}' )
|
| Kod: |
|
ALTER TABLE user ADD profileviews int(10) unsigned NOT NULL default '0'
|
- member.php 'yi açıp şu kısmı bulun;
| Kod: |
|
$templatename = iif($quick, 'memberinfo_quick', 'MEMBERINFO');
|
Üstüne şunları ekleyin;
| Kod: |
if ($bbuserinfo['userid'] != $userid)
{
$DB_site->query("
UPDATE " . TABLE_PREFIX . "user
SET profileviews=profileviews+1
WHERE userid=$userid
");
}
|
Kaydedip upload edin;
- index.php 'yi açıp şu kısmı bulun;
Şununla değiştirin;
| Kod: |
'mailqueue',
'statscache'
|
Sonra şunu bulun;
| Kod: |
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('FORUMHOME') . '");');
|
Üstüne şunları ekleyin;
| Kod: |
// <!-- BOOFO'S VB3 FORUMHOME STATS -->
global $vboptions;
$statscache = unserialize($datastore['statscache']);
$updatetime = 10;
$statsupdate = '';
$getupdatetime = vbdate("$vboptions[timeformat] - F jS, Y", $statscache['lastupdate']);
$statsupdate = "<font color=green>Last updated at $getupdatetime</font> ;;";
if ($statscache['lastupdate'] == 0 OR ($statscache['lastupdate'] + ($updatetime * 60)) < TIMENOW)
{
$starttime = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
// <!-- NEW THREADS TODAY -->
$newestthreads = $DB_site->query_first("
SELECT COUNT(*) AS count
FROM " . TABLE_PREFIX . "thread
WHERE dateline >= $starttime
");
// <!-- NEW POSTS TODAY -->
$newestposts = $DB_site->query_first("
SELECT COUNT(*) AS count
FROM " . TABLE_PREFIX . "post
WHERE dateline >= $starttime
");
// <!-- NEW REGISTRATIONS TODAY -->
$newestusers = $DB_site->query_first("
SELECT COUNT(*) AS count
FROM " . TABLE_PREFIX . "user
WHERE joindate >= $starttime
");
// <!-- THREAD VIEWS -->
$getthreadviews=$DB_site->query_first("
SELECT SUM(views) AS tviews
FROM " . TABLE_PREFIX . "thread
");
// <!-- TOP POSTER -->
$topposter = $DB_site->query_first("
SELECT username,posts,userid
FROM " . TABLE_PREFIX . "user
ORDER BY posts
DESC LIMIT 1
");
// <!-- TOP THREAD STARTER -->
$topstarter=$DB_site->query_first("
SELECT COUNT(*) AS count,postuserid,postusername
FROM " . TABLE_PREFIX . "thread
WHERE postuserid <> 0
GROUP BY postuserid
ORDER BY count
DESC LIMIT 1
");
// <!-- TOP PROFILE VIEWS -->
$getfileviews=$DB_site->query_first("
SELECT profileviews,username,userid
FROM " . TABLE_PREFIX . "user
ORDER BY profileviews
DESC LIMIT 1
");
// <!-- TOP REFERRER -->
$ref = $DB_site->query_first("
SELECT COUNT(*) AS referrals, user.username, user.userid
FROM " . TABLE_PREFIX . "user AS users
LEFT JOIN " . TABLE_PREFIX . "user ON (users.referrerid = user.userid)
WHERE users.referrerid <> 0
GROUP BY users.referrerid
ORDER BY referrals DESC
LIMIT 1
");
// <!-- TOP REPUTATION -->
$toprep = $DB_site->query_first("
SELECT userid, username, reputation
FROM " . TABLE_PREFIX . "user
ORDER BY reputation
DESC LIMIT 1
");
$statscache['newthreads'] = intval ($newestthreads[count]) ;
$statscache['newposts'] = intval ($newestposts[count]);
$statscache['newusers'] = intval ($newestusers[count]);
$statscache['getthreadviews'] = intval ($getthreadviews[tviews]);
$statscache['topposter'] = $topposter[username];
$statscache['topposterid'] = intval ($topposter[userid]);
$statscache['toppostercount'] = intval ($topposter[posts]);
$statscache['topposterpercent'] = round(100 * ($topposter[posts] / ($totalthreads + $totalposts)), 2);
$statscache['topstarter'] = $topstarter[postusername];
$statscache['topstarterid'] = intval ($topstarter[postuserid]);
$statscache['topstartercount'] = intval ($topstarter[count]);
$statscache['topthreadspercent'] = round(100 * ($topstarter[count] / $totalthreads), 2);
$statscache['getfileviewsun'] = $getfileviews[username];
$statscache['getfileviewsid'] = intval ($getfileviews[userid]);
$statscache['getfileviews'] = intval ($getfileviews[profileviews]);
$statscache['ref2'] = $ref[username];
$statscache['topreferrerid'] = intval ($ref[userid]);
$statscache['ref'] = intval ($ref[referrals]);
$statscache['toprepun'] = $toprep[username];
$statscache['toprepid'] = intval ($toprep[userid]);
$statscache['topreprep'] = intval ($toprep[reputation]);
$statscache['lastupdate'] = intval (TIMENOW);
$DB_site->query ( "
REPLACE INTO " . TABLE_PREFIX . "datastore
( title, data )
VALUES
( 'statscache', '" . addslashes ( serialize ( $statscache ) ) . "' )
" ) ;
}
$statscache['newthreads'] = vb_number_format($statscache['newthreads']);
$statscache['newposts'] = vb_number_format($statscache['newposts']);
$statscache['newusers'] = vb_number_format($statscache['newusers']);
$statscache['getthreadviews'] = vb_number_format($statscache['getthreadviews']);
$statscache['toppostercount'] = vb_number_format($statscache['toppostercount']);
$statscache['topstartercount'] = vb_number_format($statscache['topstartercount']);
$statscache['getfileviews'] = vb_number_format($statscache['getfileviews']);
$statscache['ref'] = vb_number_format($statscache['ref']);
$statscache['topreprep'] = vb_number_format($statscache['topreprep']);
// Ditch the 2 decimal zeros on a whole percent ...
if (($statscache['topposterpercent'] % 10) == 0)
$statscache['topposterpercent'] = vb_number_format($statscache['topposterpercent']) . '%';
else
$statscache['topposterpercent'] = vb_number_format($statscache['topposterpercent'], 2) . '%';
// Ditch the 2 decimal zeros on a whole percent ...
if (($statscache['topthreadspercent'] % 10) == 0)
$statscache['topthreadspercent'] = vb_number_format($statscache['topthreadspercent']) . '%';
else
$statscache['topthreadspercent'] = vb_number_format($statscache['topthreadspercent'], 2) . '%';
// <!-- NEW THREADS/POSTS SINCE LAST VISIT -->
$getposts = $DB_site->query_first ("
SELECT COUNT(postid) AS newposts, SUM(IF( t.firstpostid = p.postid, 1, 0 )) AS newthreads
FROM " . TABLE_PREFIX . "post p
LEFT JOIN " . TABLE_PREFIX . "thread t ON t.threadid = p.threadid
WHERE p.dateline >= $bbuserinfo[lastvisit]
");
$newthreadssince = vb_number_format($getposts['newthreads']);
$newpostssince = vb_number_format($getposts['newposts']);
// is reputation turned on or off?
if ($vboptions['reputationenable'] == 1)
{
$show['reputation'] = true;
}
else
{
$show['reputation'] = false;
}
// <!-- END BOOFO'S VB3 FORUMHOME STATS -->
|
Kaydedip upload edin.
- FORUMHOME templatesinde şu kısmı bulun;
| Kod: |
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_stats')"><img id="collapseimg_forumhome_stats" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_stats].gif" alt="" border="0" /></a>
<phrase 1="$vboptions[bbtitle]">$vbphrase[x_statistics]</phrase>
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_stats" style="$vbcollapse[collapseobj_forumhome_stats]">
<tr>
<td class="alt2"><img src="$stylevar[imgdir_misc]/stats.gif" alt="<phrase 1="$vboptions[bbtitle]">$vbphrase[x_statistics]</phrase>" border="0" /></td>
<td class="alt1">
<div class="smallfont">
<div>$vbphrase[threads]: $totalthreads, $vbphrase[posts]: $totalposts, $vbphrase[members]: $numbermembers</div>
<div><phrase 1="member.php?$session[sessionurl]u=$newuserid" 2="$newusername">$vbphrase[welcome_to_our_newest_member_x]</phrase></div>
</div>
</td>
</tr>
</tbody>
|
Şununla değiştirin;
| Kod: |
<!-- BOOFO'S VB3 FORUMHOME STATS -->
<tbody>
<tr>
<td class="thead" colspan="6">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_stats')"><img id="collapseimg_forumhome_stats" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_stats].gif" alt="" border="0" /></a>
<phrase 1="$vboptions[bbtitle]">$vbphrase[x_statistics]</phrase>
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_stats" style="$vbcollapse[collapseobj_forumhome_stats]">
<tr>
<td class="panelsurround" align="center" colspan="6">
<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">
<if condition="$bbuserinfo[userid]">
<tr>
<td colspan="6" nowrap="nowrap"><span class="smallfont">$vbphrase[threads]: <b>$totalthreads</b><if condition="$statscache[newthreads] >='1'"> (<b>$statscache[newthreads]</b> Today)</if>, $vbphrase[posts]: <b>$totalposts</b><if condition="$statscache[newposts] >='1'"> (<b>$statscache[newposts]</b> Today)</if>, $vbphrase[bf2_thread_views]: <b>$statscache[getthreadviews]</b></span></td>
</tr>
<tr>
<td nowrap="nowrap"><span class="smallfont">$vbphrase[bf2_total_registrations]: <strong>$newuserid</strong>, $vbphrase[bf2_active_members]: <strong>$numbermembers</strong><if condition="$statscache[newusers] >='1'">, $vbphrase[bf2_members_new]: <b>$statscache[newusers]</b>
</if></span></td>
</tr>
<if condition="$newthreadssince OR $newpostssince">
<tr>
<td nowrap="nowrap"><span class="smallfont">
<if condition="$newthreadssince > '1'">
<a href="$vboptions[bburl]/search.php?do=getnew"><b>$newthreadssince</b></a> Adet Yeni Konu Var
<else />
<if condition="$newthreadssince == '1'">
<a href="$vboptions[bburl]/search.php?do=getnew"><b>$newthreadssince</b></a> Adet Yeni Konu Var
</if>
</if>
<if condition="$newthreadssince > '0' AND $newpostssince > '0'">
and
<else />
<if condition="$newthreadssince < '1' AND $newpostssince > '1'">
<else />
<if condition="$newthreadssince < '1' AND $newpostssince == '1'">
</if>
</if>
</if>
<if condition="$newpostssince > '1'">
<a href="$vboptions[bburl]/search.php?do=getnew"><b>$newpostssince</b></a> Adet Yeni Mesaj Var
<else />
<if condition="$newpostssince == '1'">
<a href="$vboptions[bburl]/search.php?do=getnew"><b>$newpostssince</b></a> Adet Yeni Mesaj Var
</if>
</if>
<if condition="$newthreadssince > '0' OR $newpostssince > '0'">
Son Ziyaretinizden Buyana $bbuserinfo[username].
</if></span></td>
</tr>
</if>
<tr>
<td nowrap="nowrap"><span class="smallfont">En Çok Mesaj Atan: <a href="member.php?$session[sessionurl]u=$statscache[topposterid]">$statscache[topposter]</a> (<b>$statscache[toppostercount]</b> Posts = <b>$statscache[topposterpercent]</b>)</span></td>
</tr>
<tr>
<td nowrap="nowrap"><span class="smallfont">En Çok Konu Açan: <a href="member.php?$session[sessionurl]u=$statscache[topstarterid]">$statscache[topstarter]</a> (<b>$statscache[topstartercount]</b> Konular = <b>$statscache[topthreadspercent]</b>)</span></td>
</tr>
<tr>
<td nowrap="nowrap"><span class="smallfont">En Çok Üye Kazandıran: <a href="member.php?$session[sessionurl]u=$statscache[topreferrerid]">$statscache[ref2]</a> (<b>$statscache[ref]</b> Referrals)</span></td>
</tr>
<if condition="$show[reputation]">
<tr>
<td nowrap="nowrap"><span class="smallfont">En Çok Rep Gücü Olan: <a href="member.php?$session[sessionurl]u=$statscache[toprepid]">$statscache[toprepun]</a> (<b>$statscache[topreprep]</b> Rep Puanı)</span></td>
</tr>
</if>
<tr>
<td nowrap="nowrap"><span class="smallfont">En Çok Profili İncelenen: <a href="member.php?$session[sessionurl]u=$statscache[getfileviewsid]">$statscache[getfileviewsun]</a> (<b>$statscache[getfileviews]</b> Görüntülenme)</span></td>
</tr>
<tr>
<td nowrap="nowrap"><span class="smallfont"><phrase 1="member.php?$session[sessionurl]u=$newuserid" 2="$newusername">$vbphrase[bf2_welcome_newest_member]</phrase></span></td>
</tr>
<else />
<tr>
<td nowrap="nowrap"><span class="smallfont">$vbphrase[threads]: <b>$totalthreads</b>, $vbphrase[posts]: <b>$totalposts</b>, $vbphrase[members]: <b>$numbermembers</b></span></td>
</tr>
<tr>
<td nowrap="nowrap"><span class="smallfont"><phrase 1="member.php?$session[sessionurl]u=$newuserid" 2="$newusername">$vbphrase[bf2_welcome_newest_member]</phrase></span></td>
</tr>
</if>
</table>
</fieldset>
</td>
</tr>
</table>
</td>
</tr>
<if condition="$birthdays == '' AND $upcomingevents == ''">
<tr><td class="thead" style="line-height: 0; padding: 0; margin: 0;" colspan="6"><img src="$vboptions[cleargifurl]" alt="" width="1" height="12" /></td></tr>
</if>
</tbody>
<!-- BOOFO'S VB3 FORUMHOME STATS -->
|
- Sözcük grubu düzenleyiciden (Add Phrase) alttakileri ekleyin;
| Kod: |
Phrase Type: GLOBAL
Varname: bf2_active_members
Text: Aktif Üyeler
Phrase Type: GLOBAL
Varname: bf2_members_new
Text: Bugün Üye Olanlar
Phrase Type: GLOBAL
Varname: bf2_thread_views
Text: Görüntülenen Konular
Phrase Type: GLOBAL
Varname: bf2_total_registrations
Text: Toplam Üye Olanlar
Phrase Type: GLOBAL
Varname: bf2_welcome_newest_member
Text: Aramıza hoşgeldiniz, <a href="{1}" target="_blank">{2}</a>.
|
- Debug moduna geçerek Admincp >> vBulletin Seçenekler 'den alttaki verileri girin;
| Kod: |
Add New Setting (Yeni Ayar Grubu Ekle):
Varname: forumhomecachetime
Setting Group: Forums Home Page Options
Title: Forumhome Stats Cache Update Time
Description: This setting allows you to set the interval (in minutes) between the Forumhome Stats Cache updates.
Option Code: leave blank
Default: 10
Display Order: 55
vBulletin Default: No
Kaydedin
|
- Tekrar index.php 'yi açıp şu kısmı bulun;
Şununla değiştirin;
| Kod: |
$updatetime = $vboptions['forumhomecachetime'];
|
Kaydedip upload edin.
- includes/init.php 'yi açıp şu kısmı bulun;
| Kod: |
// add default special templates
if (!CACHE_DATASTORE_FILE OR !defined('CACHE_DATASTORE_FILE'))
{
$specialtemplates = array_merge(array(
'options',
'cron',
'forumcache',
'usergroupcache',
'stylecache'
), $specialtemplates);
|
Şununla değiştirin;
| Kod: |
// add default special templates
if (!CACHE_DATASTORE_FILE OR !defined('CACHE_DATASTORE_FILE'))
{
$specialtemplates = array_merge(array(
'options',
'cron',
'forumcache',
'usergroupcache',
'stylecache',
'statscache'
), $specialtemplates);
|
Kaydedip upload edin.
- PHPINCLUDE_START templatesine şunu ekleyin;
| Kod: |
$statscache = unserialize($datastore['statscache']);
|
Hazırlayan: organik81 | |
|
|
|
|
|
 |
| |
|
|
Bu forumda yeni konular açamazsınız Bu forumdaki mesajlara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız
|
|