Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Top 'X' Stats Details »»
Top 'X' Stats
Version: 1.00, by InfiniteWebby InfiniteWebby is offline
Developer Last Online: Aug 2007 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-02-2004 Last Update: Never Installs: 213
 
No support by the author.

This hack adds the top 'x' stats (top posters, newest members, newest replies) to your forumhome.

The original idea was nanoentities but he will not be releasing his hack for vB3. Basically this is the same idea, all new coding, all new templates.

This hack also shows a 'New' or 'Old' text if the thread was posted after your lastvisit or marking all forums as read. Also it posts the deleted message for those who can see it and can be set to exclude forums.

I am currently working on a seperate page where the user can set the number of stats he wishes to show.

Live demo at: *removed* (dow the bottom)

vB 3.5 version available at https://vborg.vbsupport.ru/showthrea...846#post743846 !!!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 01-11-2004, 09:21 AM
codemonkey codemonkey is offline
 
Join Date: Jan 2004
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by codemonkey
Hi, no i meant in the template with the name 'header' so that the stats box will be shown on every site of the forums!
can anybody help me?
Reply With Quote
  #33  
Old 01-11-2004, 04:37 PM
Codeman05 Codeman05 is offline
 
Join Date: Oct 2002
Location: Tx
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great Mod!!
I got the stats box/table to display, but the stats are not displaying in it. Any ideas?

BTW...This is probably the issue but I'm not sure:
This line: forumhome_subforumseparator_post'
was not in my index.php

so I added the following anyway

'forumhome_subforumseparator_post',
'forumhome_stats_poster',
'forumhome_stats_member',
'forumhome_stats_thread',

Like in the instructions, but no go


EDIT:
NM I'm an idiot, forgot my "index" is no longer index.php
Reply With Quote
  #34  
Old 01-12-2004, 03:17 PM
codemonkey codemonkey is offline
 
Join Date: Jan 2004
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there nobody, who can say me how to edit my php files so that the Stats Box will work in my header template?

please help me!
Reply With Quote
  #35  
Old 01-16-2004, 12:53 AM
anabolicedge anabolicedge is offline
 
Join Date: Sep 2003
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

why does it say [old] by my newest replies??

http://www.anabolicedge.net/forum/
Reply With Quote
  #36  
Old 01-16-2004, 01:14 AM
bspiller82's Avatar
bspiller82 bspiller82 is offline
 
Join Date: Jul 2002
Location: McHenry, Illinois
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by codemonkey
Is there nobody, who can say me how to edit my php files so that the Stats Box will work in my header template?

please help me!
What you need help with exactly?
Reply With Quote
  #37  
Old 01-16-2004, 01:38 AM
rinkrat's Avatar
rinkrat rinkrat is offline
 
Join Date: Jan 2002
Location: Long Beach
Posts: 530
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd like to see top five reputations, can that be done?
Reply With Quote
  #38  
Old 01-16-2004, 04:53 AM
trinitym's Avatar
trinitym trinitym is offline
 
Join Date: Jan 2004
Location: between hell & insanity
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I too have a similar request to codemonkey's. I'd love to be able to get this to work in another template other than FORUMHOME. Ideally, I want to have the stats show up in the sidebar template of Dark_Wizard's left sidebar hack.

Can some one point me in the right direction if this is possible?
Reply With Quote
  #39  
Old 01-20-2004, 07:28 PM
alzibub alzibub is offline
 
Join Date: Mar 2003
Location: UK
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack !!
Simple to install and works fine as far as I can see !!

I know someone else asked this - but is there a way to exclude forums from the newest replies ?

Like it
*clicks install*
Reply With Quote
  #40  
Old 01-21-2004, 04:31 PM
Codeman05 Codeman05 is offline
 
Join Date: Oct 2002
Location: Tx
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was wondering if anyone had gotten this hack to work correctly in the "Showthread" template.

Basically I'd like the stats to show up on the thread listing pages...I can get the table to show up, but none of the stats work. Has anyone been able to do this, or is it even possible?
Reply With Quote
  #41  
Old 01-25-2004, 04:37 AM
InfiniteWebby InfiniteWebby is offline
 
Join Date: Nov 2001
Location: Downunda.
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

to get this to work in the header or footer templates

Add to the phpinclude_start template:
PHP Code:
// ### TOP 5 STATS BY ANIMEWEBBY ###########################################
$displayrecords "5"// how many records should we show?
$excludedforums "13"// forums to be excluded from latest threads. Format "0,5,7"
$threadchars "30"// number of characters in thread title before '...' is added

$getstats_posters $DB_site->query("SELECT userid, username, posts FROM " TABLE_PREFIX "user ORDER BY posts DESC LIMIT 0, $displayrecords");
while (
$getstats_poster $DB_site->fetch_array($getstats_posters))
{
        eval(
'$stats_posters .= "' fetch_template('forumhome_stats_poster') . '";');
}

$getstats_members $DB_site->query("SELECT userid, username, posts, joindate FROM " TABLE_PREFIX "user ORDER BY joindate DESC LIMIT 0, $displayrecords");
while (
$getstats_member $DB_site->fetch_array($getstats_members))
{
        eval(
'$stats_members .= "' fetch_template('forumhome_stats_member') . '";');
}

// filter out deletion notices if can't be seen
$forumperms fetch_permissions($forumid);
if (!(
$permissions['forumpermissions'] & CANSEEDELNOTICE))
{
    
$delquery ", NOT ISNULL(deletionlog.primaryid) AS isdeleted, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason";
    
$delthreadlimit "AND deletionlog.primaryid IS NULL";
    
$deljoin "LEFT JOIN " TABLE_PREFIX "deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')";
}
else
{
    
$delquery ", NOT ISNULL(deletionlog.primaryid) AS isdeleted, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason";
    
$delthreadlimit "";
    
$deljoin "LEFT JOIN " TABLE_PREFIX "deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')";
}

$getstats_threads $DB_site->query("
SELECT thread.threadid, thread.title, thread.lastpost, thread.forumid, thread.replycount, thread.lastposter, thread.dateline, IF(views<=replycount, replycount+1, views) AS views, thread.visible, user.username, user.userid 
$delquery
        FROM " 
TABLE_PREFIX "thread AS thread
        LEFT JOIN  " 
TABLE_PREFIX "user AS user ON (user.username = thread.lastposter)
$deljoin
WHERE thread.forumid NOT IN (
$excludedforums)
$delthreadlimit
ORDER BY thread.lastpost DESC LIMIT 0, 
$displayrecords");

while (
$getstats_thread $DB_site->fetch_array($getstats_threads))
{
    
$getstats_thread[title] = unhtmlspecialchars($getstats_thread[title]);
    if (
strlen($getstats_thread[title]) > $threadchars)
    {        
        
$getstats_thread[titletrimmed] = substr($getstats_thread[title], 0strrpos(substr($getstats_thread[title], 0$threadchars), ' ')) . '...';
    }
    else
    {
        
$getstats_thread[titletrimmed] = $getstats_thread[title];
    }
    if (
$getstats_thread[lastpost] > $bbuserinfo[lastvisit])
    {
        
$getstats_thread[newpost] = true;
    }
    if (
$getstats_thread[isdeleted])
    {
        
$getstats_thread[isdeleted] = true;
    }
    eval(
'$stats_threads .= "' fetch_template('forumhome_stats_thread') . '";');

And add to the header or footer where you want the stats:
HTML Code:
<!-- top statistics box -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
	<tr>
		<td class="tcat" colspan="3">
			<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_statistics')"><img id="collapseimg_forumhome_statistics" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_statistics].gif" alt="" border="0" /></a>
			Statistics - Top $displayrecords</td>
	</tr>
</thead>
<tbody id="collapseobj_forumhome_statistics" style="$vbcollapse[collapseobj_forumhome_statistics]">
	<tr>
		<td class="thead" width="23%" align="$stylevar[left]" nowrap>Top Posters</td>
		<td class="thead" width="22%" align="$stylevar[left]" nowrap>Newest Members</td>
		<td class="thead" width="55%" nowrap>Newest Replies
		</td>
	</tr>
	<tr>
		<td class="alt2" width="23%" valign="top">
		<table>
			<tr>
				<td class="smallfont" width="100%">Member:</td>
				<td class="smallfont" align="right" nowrap>Posts:</td>
			</tr>
			$stats_posters
		</table>
		</td>
		<td class="alt1" width="22%" valign="top">
		<table>
			<tr>
				<td class="smallfont" width="100%" nowrap>Member:</td>
				<td class="smallfont" align="right" nowrap>Posts:</td>
			</tr>
			$stats_members
		</table>
		</td>
		<td class="alt2" width="55%" valign="top">
		<table>
			<tr>
				<td class="smallfont" width="70%" nowrap>Thread:</td>
				<td class="smallfont" width="30%" nowrap>Last Poster:</td>
				<td class="smallfont" align="right" nowrap>Views:</td>
				<td class="smallfont" align="right" nowrap>Replies:</td>


			</tr>
			$stats_threads
		</table>
		</td>
	</tr>
</tbody>
</table>
<br />
<br />
<!-- end top statistics box -->
then add all the extra templates as instructed.

THIS HAS NOT BEEN TESTED BUT SHOULD WORK NICELY.

As for showthread instead of adding the above codes to phpinclude and the head or footer add them to showthread.php and the showthread template where you want them. i am not completely sure as to where but trial and error is always the best way to learn.

DO THESE AT YOUR OWN RISK AS I WILL BE PROVIDING LIMITED SUPPORT.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:23 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04756 seconds
  • Memory Usage 2,355KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_html
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete