vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Top 'X' Stats (https://vborg.vbsupport.ru/showthread.php?t=59609)

InfiniteWebby 01-02-2004 10:00 PM

Top 'X' Stats
 
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 !!!

MindTrix 01-03-2004 10:43 PM

Ohhhhhh this is just what i wanted!! Thanks alot!!!

Dan 01-03-2004 10:50 PM

Thanks for the mod but can I get a screenshot of it in action?

MaDCaT75 01-03-2004 11:03 PM

go to www.xamira.net they got it there

btw is there a hack like this for vb2?!?

SnowBot 01-03-2004 11:17 PM

Great hack :) just what i needed :)

Gio Takahashi 01-04-2004 04:14 AM

I've had this hack for VB2, and I've been waiting for this. Thankx.

Kwak 01-04-2004 04:18 AM

Help.
Just finished but I am getting a Parse error: parse error in /home/user/public_html/index.php on line 14
Oh no~

MaDCaT75 01-04-2004 04:21 AM

Quote:

Originally Posted by Gio Takahashi
I've had this hack for VB2, and I've been waiting for this. Thankx.

can you please tell me where to get it here at vb.org I cant find it anywhere

Gio Takahashi 01-04-2004 04:55 AM

<a href="https://vborg.vbsupport.ru/showthread.php?t=47428" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=47428</a>

Kwak 01-04-2004 05:05 AM

I've redid the hack and seemed fine. Except, no information is showing under the categories. :confused: http://www.calpolyforums.com

Ryan Ashbrook 01-04-2004 04:29 PM

Thanks for this hack. :)

Dark_Wizard 01-04-2004 09:29 PM

Nice hack...any chance of making this so the variables excludedforums, displayrecords & threadchars can be done through the admincp rather than having to edit the index.php file when there are changes ie. adding a new forum and having it excluded? If not I can do it rather quickly. Thx!

Rids 01-04-2004 10:22 PM

Neat hack - Installed :)

bspiller82 01-04-2004 10:50 PM

I used this as well back in 2.xx. Been waiting for it to use in vb 3.x. Thanks.

Cassidy 01-05-2004 12:14 AM

Uh a quick modification to your hack that makes it look more slimline.

// Change the Whole of Template: forumhome_stats_poster
// To the following.

PHP Code:

            <tr>
                <
td width="100%" class="smallfont"><strong><a href="member.php?u=$getstats_poster[userid]">$getstats_poster[username]</a></strong></td>
                <
td class="smallfont" align="right"><b>$getstats_poster[posts]</b></td>
            </
tr


Kwak 01-05-2004 01:13 AM

Bump for the mod hacker. The new Stats category is showing up but not the information.
I've rechecked but I'll do it again.

codemonkey 01-07-2004 05:06 PM

i want to have the stats in the header template.
can you say me how to edit the code for that?

bspiller82 01-07-2004 09:56 PM

In the header like this? http://forums.clancsf.com

GFXUnlimited 01-07-2004 11:44 PM

very nice I will install this tommorrow.

codemonkey 01-08-2004 11:03 AM

Quote:

Originally Posted by bspiller82
In the header like this? http://forums.clancsf.com

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!

???`S?LV?R???` 01-08-2004 11:38 AM

Hay... how would I move the Top 5 Stats up to where http://forums.clancsf.com did? by the way.. nice job on the release for this.

bspiller82 01-08-2004 03:20 PM

Quote:

Originally Posted by ???`S?LV?R???`
Hay... how would I move the Top 5 Stats up to where http://forums.clancsf.com did? by the way.. nice job on the release for this.

Add the script in the FORUMHOME under the following code

Code:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
        <!-- no cache headers -->
        <meta http-equiv="Pragma" content="no-cache" />
        <meta http-equiv="Expires" content="-1" />
        <meta http-equiv="Cache-Control" content="no-cache" />
        <!-- end no cache headers -->
        <title><phrase 1="$vboptions[bbtitle]">$vbphrase[x_powered_by_vbulletin]</phrase></title>
        $headinclude
</head>
<body>
$header
$navbar


???`S?LV?R???` 01-08-2004 06:01 PM

Thanks, That Worked Out Good.

gmarik 01-08-2004 06:28 PM

give us some demo or gifs

bspiller82 01-08-2004 09:53 PM

Quote:

Originally Posted by gmarik
give us some demo or gifs


Demo or gifs for what?

Nmidia 01-08-2004 11:09 PM

Quote:

Originally Posted by iKwak
Bump for the mod hacker. The new Stats category is showing up but not the information.
I've rechecked but I'll do it again.


take the ' from the front and end of the templates you created

sabret00the 01-09-2004 04:42 PM

oooooh truncating thread titles gotta love that :D

gmarik 01-09-2004 05:14 PM

Demos of hack installed.
Warez ir really bad, stop doing it!

bspiller82 01-09-2004 09:08 PM

Quote:

Originally Posted by gmarik
Demos of hack installed.
Warez ir really bad, stop doing it!

Death to warez :-p
You gun dun it n0w

PranK 01-10-2004 11:20 AM

nice work - thanks!

/me clicks install.

Christian

codemonkey 01-11-2004 09:21 AM

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?

Codeman05 01-11-2004 04:37 PM

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

codemonkey 01-12-2004 03:17 PM

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!

anabolicedge 01-16-2004 12:53 AM

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

http://www.anabolicedge.net/forum/

bspiller82 01-16-2004 01:14 AM

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?

rinkrat 01-16-2004 01:38 AM

I'd like to see top five reputations, can that be done?

trinitym 01-16-2004 04:53 AM

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?

alzibub 01-20-2004 07:28 PM

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*

Codeman05 01-21-2004 04:31 PM

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?

InfiniteWebby 01-25-2004 04:37 AM

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.


All times are GMT. The time now is 09:32 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05395 seconds
  • Memory Usage 1,874KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete