Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

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
  #232  
Old 07-01-2005, 05:55 PM
mike3k mike3k is offline
 
Join Date: Jun 2005
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

here is a pic of the templates can you see if there in the rite place plz

i've checked everything 10 times to be sure it wasnt me

uploaded and redone the index.php loads of times to be sure also

thanks for your reply mate
Reply With Quote
  #233  
Old 07-01-2005, 06:04 PM
1nf3rn0 1nf3rn0 is offline
 
Join Date: Jan 2005
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well if you can see the top x stats on your forum home, then the templates should be right...the dispalying of the actual stats has to do with the index.php...maybe copy and paste your index.php so we can take alook at it may help us help you more..
Reply With Quote
  #234  
Old 07-01-2005, 08:14 PM
Sleepyk Sleepyk is offline
 
Join Date: Dec 2004
Location: CT
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="http://thebattledome.com" target="_blank">http://thebattledome.com</a>

i havin lil prob with % on top poster thread person, etc
Reply With Quote
  #235  
Old 07-01-2005, 11:56 PM
King Kovifor's Avatar
King Kovifor King Kovifor is offline
 
Join Date: Nov 2004
Location: PA
Posts: 3,872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to exclude HIDDEN Forums to the groups that can't see it.
Reply With Quote
  #236  
Old 07-02-2005, 07:09 AM
1nf3rn0 1nf3rn0 is offline
 
Join Date: Jan 2005
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes sir..ask and ye shall receive bud!

look for:

PHP Code:
$excludedforums "13"// forums to be excluded from latest threads. Format "0,5,7" 
and just add the forum id's you want excluded!
Reply With Quote
  #237  
Old 07-02-2005, 07:11 AM
1nf3rn0 1nf3rn0 is offline
 
Join Date: Jan 2005
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sleepyk
http://thebattledome.com

i havin lil prob with % on top poster thread person, etc
shoot us a screen shot...dont know if we need a login to view it at your site bud
Reply With Quote
  #238  
Old 07-02-2005, 11:41 AM
mike3k mike3k is offline
 
Join Date: Jun 2005
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok i have pasted some of the code here

all the code that has been alered.
Code:
// ### BOARD STATISTICS #################################################

// get total threads & posts from the forumcache
$totalthreads = 0;
$totalposts = 0;
if (is_array($forumcache))
{
	foreach ($forumcache AS $forum)
	{
		$totalthreads += $forum['threadcount'];
		$totalposts += $forum['replycount'];
	}
}
$totalthreads = vb_number_format($totalthreads);
$totalposts = vb_number_format($totalposts);

// get total members and newest member from template
$userstats = unserialize($datastore['userstats']);
$numbermembers = vb_number_format($userstats['numbermembers']);
$newusername = $userstats['newusername'];
$newuserid = $userstats['newuserid'];

// ### 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], 0, strrpos(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') . '";');
}

// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTA HERE... ###

eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('FORUMHOME') . '");');
Reply With Quote
  #239  
Old 07-02-2005, 11:42 AM
mike3k mike3k is offline
 
Join Date: Jun 2005
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh and templates but as you said this works.
Code:
// pre-cache templates used by all actions
$globaltemplates = array(
	'FORUMHOME',
	'forumhome_event',
	'forumhome_forumbit_level1_nopost',
	'forumhome_forumbit_level1_post',
	'forumhome_forumbit_level2_nopost',
	'forumhome_forumbit_level2_post',
	'forumhome_lastpostby',
	'forumhome_loggedinuser',
	'forumhome_moderator',
	'forumhome_pmloggedin',
	'forumhome_subforumbit_nopost',
	'forumhome_subforumbit_post',
	'forumhome_subforumseparator_nopost',
	'forumhome_subforumseparator_post',
	'forumhome_stats_poster',
	'forumhome_stats_member',
	'forumhome_stats_thread',
Reply With Quote
  #240  
Old 07-02-2005, 05:56 PM
1nf3rn0 1nf3rn0 is offline
 
Join Date: Jan 2005
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes, but did you add the templates in your admincp?...the index.php calls to the templates to give you your stats therefore you need to ad templates in your admincp witht the content stated in the instructions

forumhome_stats_member
forumhome_stats_poster
forumhome_stats_thread
Reply With Quote
  #241  
Old 07-02-2005, 08:17 PM
soniceffect's Avatar
soniceffect soniceffect is offline
 
Join Date: Feb 2005
Location: UK
Posts: 453
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK .. lookin like a few have asked this question but can`t seem to see a reply ... I have the RSS feed hack installed, and although I can exclude the feeds forum, I dunno how to excude the user that I`m using as the bot from my top 5 posters

Anyone?
Reply With Quote
Reply

Thread Tools

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 02:04 PM.


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.04606 seconds
  • Memory Usage 2,309KB
  • 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
  • (2)bbcode_code
  • (1)bbcode_php
  • (1)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