View Full Version : Top 'X' Stats
InfiniteWebby
01-02-2004, 10:00 PM
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/showthread.php?p=743846#post743846 !!!
MindTrix
01-03-2004, 10:43 PM
Ohhhhhh this is just what i wanted!! Thanks alot!!!
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.
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
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>
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!
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.
<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>
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
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
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
$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
give us some demo or gifs
Demo or gifs for what?
Nmidia
01-08-2004, 11:09 PM
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
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
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
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:
// ### 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') . '";');
}
And add to the header or footer where you want the stats: <!-- 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.
AshAbed
01-26-2004, 11:32 AM
Nice hack !!
I know someone else asked this - but is there a way to exclude forums from the newest replies ?
I have the same question... my hidden forum's posts are showing up :x
DaPro
01-26-2004, 12:24 PM
Great hack, looks great!
I was wondering, could there be an addon for "Popular Thread" like in the vb2 one. Just a suggestion :)
Codeman05
01-26-2004, 03:34 PM
Thanks AnimeWebby, that worked perfect
InfiniteWebby
01-27-2004, 04:35 AM
I have the same question... my hidden forum's posts are showing up :x
This feature is already built in just fill in this line with the forums you want excluded
$excludedforums = "13"; // forums to be excluded from latest threads. Format "0,5,7"
apokphp
01-30-2004, 04:31 AM
Is there a way to exclude a certain poster or posters for Top Posters?
InfiniteWebby
01-30-2004, 05:43 AM
replace:
SELECT userid, username, posts FROM " . TABLE_PREFIX . "user ORDER BY posts DESC LIMIT 0, $displayrecords
with:
SELECT userid, username, posts FROM " . TABLE_PREFIX . "user WHERE userid NOT IN (1,2,3) ORDER BY posts DESC LIMIT 0, $displayrecords
change 1,2,3 to the userid(s) of the users you wish to exclude.
apokphp
01-31-2004, 02:14 AM
thanks man. ;)
/installed
killervette
02-07-2004, 01:39 AM
anyway to get the latest posts on a non vb page????
mcyates
02-07-2004, 11:01 AM
Can i have it so when i click on the latest thred. it goes to the last post posted rather than the newpost posted?
I R KICK TEH INSTALL BUTTON.
LOL talking like that makes me laugh so hard, I'm sorry lol.
/me shoots the install button
gopherhockey
02-29-2004, 10:52 PM
I'd like to see top five reputations, can that be done?
You mean like this? http://www.morcmtb.org/forums
I found newest members being a rather boring stat....
thakikka
03-02-2004, 05:19 PM
How can I sort the "Who was online today"-Display by Username and not by User-ID?
DaPro
03-20-2004, 10:46 AM
Tested with new vB 3.0 Gold, i think it works, I have had no problems :)
i have problem when i finished hack:
Parse error: parse error in /home/pvbcttc/public_html/forum/index.php on line 523
help me now! because forum can't run now :(
edeab220
03-23-2004, 03:20 AM
um...where is FORUMHOME located? I can't seem to find it in my vB files...
Parse error: parse error in /home/pvbcttc/public_html/forum/index.php on line 523
==> This is my bugs of me. When i finished your hack and my forum error and it can't run.
I don't know why. Help me!
sabret00the
03-23-2004, 09:23 AM
was such an east install, thank you :)
msimplay
03-27-2004, 01:43 PM
i have one problem with this hack
i know theres a way to exclude forums
but i need it to exclude posts that are in moderation ?
X-Sector
03-28-2004, 08:06 PM
I got this error when installed your hack, animewebby..
Parse error: parse error, expecting `')'' in /home/xelation/public_html/forums/index.php on line 54
I'm running on the vBulletin 3 Gold
X-Sector
03-30-2004, 05:58 PM
anybody gonna help me???
sabret00the
04-01-2004, 09:06 AM
what's on line 54 of your index.php?
paste the 10 lines above and below it :)
sabret00the
04-01-2004, 09:07 AM
if ($bbuserinfo[usergroupid] == 6) { // admin so display all threads
$excludedforums = "forumid<>'46' AND forumid<>'47'";
} elseif ($bbuserinfo[usergroupid] == 12 OR 5) { //super mods and site-wide moderators
$excludedforums = "forumid<>'18' AND forumid<>'46' AND forumid<>'47' AND forumid<>'69'";
} elseif ($bbuserinfo[usergroupid] == 7) { //moderators
$excludedforums = "forumid<>'18' AND forumid<>'46' AND forumid<>'47' AND forumid<>'74' AND forumid<>'69'";
} else {//everyone else
$excludedforums = "forumid<>'17' AND forumid<>'18' AND forumid<>'20' AND forumid<>'46' AND forumid<>'47' AND forumid<>'74' AND forumid<>'69' AND forumid<>'95'";
}
i added this code but it don't seem to be working, is there anyway to make it use the access masks set in the mcp/acp ?
datainternet
04-05-2004, 10:51 AM
Hi,
Is it possible to combine this hack with this thread-category hack?:
https://vborg.vbsupport.ru/showthread.php?t=61494
MFG datainternet
akonze
04-06-2004, 08:08 AM
First, I found one small cosmetic bug:
'forumhome_subforumseparator_post',
'forumhome_stats_poster',
'forumhome_stats_member',
'forumhome_stats_thread',
Above will add another empty field to the array. It's better to remove the last comma:
'forumhome_subforumseparator_post',
'forumhome_stats_poster',
'forumhome_stats_member',
'forumhome_stats_thread'
Second, although the top posters template should run fine with 'smallfont' css, it does not. Both other boxes do. Any suggestions?
successguy
04-07-2004, 07:36 AM
Very cool! Thanks AnimeWebby
Dan P.
04-16-2004, 02:29 PM
Nice hack. Thanks.
Dan P.
04-16-2004, 04:56 PM
Posted in error..please delete.
ph03nIX
04-19-2004, 01:21 AM
Sorry if this has been asked or answered before but if a forum is a privet forum or password protected or something will the posts in that forum show up on this mod? If so, is there a way to stop this from happening?
Thank you :)
Liquid1ce
04-22-2004, 05:52 AM
@ph03nIX - Yes you excluse the forum with forum Id in
$excludedforums = "13"; // forums to be excluded from latest threads.
Could someone tell me how to display the latest 5 for forum id XXX ?
as i want to add a box to the bottom of this one
Regards
brianstevz
04-29-2004, 04:01 PM
Would it be possible to show reputation on this? Best and worst?
Sirius Black
05-03-2004, 12:54 AM
Great hack man !! Installed with no problems !!
Pitman
05-04-2004, 07:31 PM
I need this to work with user's permissions, is that possible? :(
I mean I know that you can exclude certain forums, but I want all of the forums to show if the user that is viewing the page has permission to access that forum.
msimplay
05-04-2004, 07:53 PM
I need this to work with user's permissions, is that possible? :(
I mean I know that you can exclude certain forums, but I want all of the forums to show if the user that is viewing the page has permission to access that forum.
yeh good idea and threads / posts awaiting moderation should be excluded
sabret00the
05-04-2004, 07:53 PM
i'll take a look at the code asi want it to work with permissions too, basically it's just a matter of extracting the usergroups and then their permissions and converting that data into something that the script can read, shouldn't be too hard, although it'll probably add a few queries, we'll see though, if anyone more skilled does it before me then yay :)
Pitman
05-04-2004, 09:21 PM
Yeah, this is an awesome hack, it just needs to be tweaked a little :)
InfiniteWebby
05-06-2004, 07:38 AM
This hack in its current form works using forum permission. It also show deleted thread only to those members who can see them as well as being able to exclude forum id's so there should not be problems with members seeing what they shouldnt be able to.
I have finished my next version found here (http://www.infinite-forums.com/forumhome.php) it includes an extra page so users can specify the number of stats to show added admincp settings for post title trunctaing, username truncating, excluded forum ids, most stats to show on forumhome and extra page, default to show on forum home and extra page as well as a prefix setting for new and old posts. It is all ready to go with htl but with the new admin settings i need to create an installer to add those into the dbase.
msimplay
05-06-2004, 07:50 AM
This hack in its current form works using forum permission. It also show deleted thread only to those members who can see them as well as being able to exclude forum id's so there should not be problems with members seeing what they shouldnt be able to.
I have finished my next version found here (http://www.infinite-forums.com/forumhome.php) it includes an extra page so users can specify the number of stats to show added admincp settings for post title trunctaing, username truncating, excluded forum ids, most stats to show on forumhome and extra page, default to show on forum home and extra page as well as a prefix setting for new and old posts. It is all ready to go with htl but with the new admin settings i need to create an installer to add those into the dbase.
but what about moderated posts ?
sabret00the
05-06-2004, 08:13 AM
This hack in its current form works using forum permission. It also show deleted thread only to those members who can see them as well as being able to exclude forum id's so there should not be problems with members seeing what they shouldnt be able to.
I have finished my next version found here (http://www.infinite-forums.com/forumhome.php) it includes an extra page so users can specify the number of stats to show added admincp settings for post title trunctaing, username truncating, excluded forum ids, most stats to show on forumhome and extra page, default to show on forum home and extra page as well as a prefix setting for new and old posts. It is all ready to go with htl but with the new admin settings i need to create an installer to add those into the dbase.
based on my current installation, guests can see threads in the top 5 even in hidden forums? :(
brianstevz
05-06-2004, 01:09 PM
based on my current installation, guests can see threads in the top 5 even in hidden forums? :(
Where is the code for the change? Also could you change this to display reputation instead of new users?
msimplay
05-06-2004, 02:32 PM
based on my current installation, guests can see threads in the top 5 even in hidden forums? :(
yep thats what i mean about permissions
if the permissions were there
we wouldn't have to exclude forums or worry about posts in moderation displaying
Pitman
05-09-2004, 12:05 AM
Anyone going to attempt this working with permissions?
Fluous
05-09-2004, 12:28 AM
Whenever I run forumhome_stats_member with its code it tells me this
The following error occurred when attempting to evaluate this template:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/*/public_html/forum/includes/adminfunctions_template.php(3037) : eval()'d code on line 7
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
On line 7 is....
|| # This file may not be redistributed in whole or significant part. # ||
Please help?
Edit: nvm, in his // ### TOP 5.... i had only put one slash killing the whole thing lol
boiboi
05-10-2004, 03:38 AM
is there a similar hack that would work on a non-forumhome page? also the lastest forum topic looks nice on the xamira site. is there one that i can put on a non-forumhome page as well?
thanks
does this work with VB3.0.1??????????
sorry new to this stuff
Pitman
05-10-2004, 08:28 PM
So there is nobody that will be willing to make this work with permissions? :(
I am disappointed
msimplay
05-10-2004, 08:40 PM
So there is nobody that will be willing to make this work with permissions? :(
I am disappointed
give it some time i'm sure the hack owner or someone else will pick it up
whining gets you nowhere :)
Can somebody PLEASE tell me whether this works on version 3.0.1????????????????????
Evilboy
05-11-2004, 12:16 PM
yes it works :)
vhoang
05-11-2004, 08:20 PM
This hack in its current form works using forum permission. It also show deleted thread only to those members who can see them as well as being able to exclude forum id's so there should not be problems with members seeing what they shouldnt be able to.
I have finished my next version found here (http://www.infinite-forums.com/forumhome.php) it includes an extra page so users can specify the number of stats to show added admincp settings for post title trunctaing, username truncating, excluded forum ids, most stats to show on forumhome and extra page, default to show on forum home and extra page as well as a prefix setting for new and old posts. It is all ready to go with htl but with the new admin settings i need to create an installer to add those into the dbase.
Where can i download this "next version" ?
Thanks.
The new version looks excellent - so when do we get it? :)
neocorteqz
05-11-2004, 11:59 PM
The new version looks excellent - so when do we get it? :)
Quick question.
How many queries does it add? and how is the load on MySQL?? Right now I have on forum Home.
Page generated in 0.32909012 seconds (94.71% PHP - 5.29% MySQL) with 10 queries.
Synicide
05-12-2004, 09:11 PM
Great hack. I actually didn't follow most of the directions because all I needed was the stats that it gave, but I didn't display them in the manner stated in the install file. :D But again great hack. :D
InfiniteWebby
05-14-2004, 11:33 PM
there has been no real change in the mysql some added if then else statements for the username truncation but that bout it so any server load should be minimal
I want to install this hack but after opening my index.php file I cannot find the following text anywhere.
'forumhome_subforumseparator_post'
I've searched through 5 times and pasted the text into MS word so that I could do a search for the text which it didn't find.
I run VB 3.0.1 which I was told earlier in the thread is ok.
PLEASE HELP!!!!
Can anybody please tell me where it is as per above message?????
Synicide
05-16-2004, 03:37 PM
I want to install this hack but after opening my index.php file I cannot find the following text anywhere.
'forumhome_subforumseparator_post'
I've searched through 5 times and pasted the text into MS word so that I could do a search for the text which it didn't find.
I run VB 3.0.1 which I was told earlier in the thread is ok.
PLEASE HELP!!!!
1st, don't use MS Word.
2nd, it's near the top of the document, around line 45, under this section.
// ################### PRE-CACHE TEMPLATES AND DATA ######################
I dont have any section with pre cache templates and data - I know I'm not being dumb and its deffo not there
I'm getting worried now as i seem to have this section missing
Help please
Synicide
05-16-2004, 08:55 PM
I dont have any section with pre cache templates and data - I know I'm not being dumb and its deffo not there
I'm getting worried now as i seem to have this section missing
Help please
Okay... now that's weird. Are you sure you're looking at your index.php file in your forums directory? I know you're not trying to be dumb, but if you don't have those lines, then your page won't even work in the first place.
Can you paste the first few lines of your index.php page?
Here's a section at the start of my index.php file - hope its not too long
Hope you can help
INT));
if (! is_array($foruminfo))
{
$forumid = -1;
}
else
{
// draw nav bar
$navbits = array();
$parentlist = array_reverse(explode(',', substr($foruminfo['parentlist'], 0, -3)));
foreach ($parentlist AS $forumID)
{
$forumTitle = $forumcache["$forumID"]['title'];
$navbits["forumdisplay.php?$session[sessionurl]f=$forumID"] = $forumTitle;
}
// pop the last element off the end of the $nav array so that we can show it without a link
array_pop($navbits);
$navbits[''] = $foruminfo['title'];
$navbits = construct_navbits($navbits);
}
// ### WELCOME MESSAGE #################################################
if ($bbuserinfo['userid'])
{ // registered user
$showmemberwelcome = true;
}
else
{ // guest
$showmemberwelcome = false;
}
$today = vbdate('Y-m-d', TIMENOW, false, false);
// ### TODAY'S BIRTHDAYS #################################################
if ($vboptions['showbirthdays'])
{
$birthdaystore = unserialize($datastore['birthdaycache']);
if (!is_array($birthdaystore) OR ($today != $birthdaystore['day1'] AND $today != $birthdaystore['day2']))
{
// Need to update!
require_once('./includes/functions_databuild.php');
$birthdaystore = build_birthdays();
DEVDEBUG('Updated Birthdays');
}
switch($today)
{
case $birthdaystore['day1']:
$birthdays = $birthdaystore['users1'];
break;
case $birthdaystore['day2'];
$birthdays = $birthdaystore['users2'];
break;
}
// memory saving
unset($birthdaystore);
$show['birthdays'] = iif ($birthdays, true, false);
}
else
{
$show['birthdays'] = false;
}
Synicide
05-16-2004, 09:29 PM
Here's a section at the start of my index.php file - hope its not too long
Hope you can help
INT));
if (! is_array($foruminfo))
{
$forumid = -1;
}
else
{
// draw nav bar
$navbits = array();
$parentlist = array_reverse(explode(',', substr($foruminfo['parentlist'], 0, -3)));
foreach ($parentlist AS $forumID)
{
$forumTitle = $forumcache["$forumID"]['title'];
$navbits["forumdisplay.php?$session[sessionurl]f=$forumID"] = $forumTitle;
}
// pop the last element off the end of the $nav array so that we can show it without a link
array_pop($navbits);
$navbits[''] = $foruminfo['title'];
$navbits = construct_navbits($navbits);
}
// ### WELCOME MESSAGE #################################################
if ($bbuserinfo['userid'])
{ // registered user
$showmemberwelcome = true;
}
else
{ // guest
$showmemberwelcome = false;
}
$today = vbdate('Y-m-d', TIMENOW, false, false);
// ### TODAY'S BIRTHDAYS #################################################
if ($vboptions['showbirthdays'])
{
$birthdaystore = unserialize($datastore['birthdaycache']);
if (!is_array($birthdaystore) OR ($today != $birthdaystore['day1'] AND $today != $birthdaystore['day2']))
{
// Need to update!
require_once('./includes/functions_databuild.php');
$birthdaystore = build_birthdays();
DEVDEBUG('Updated Birthdays');
}
switch($today)
{
case $birthdaystore['day1']:
$birthdays = $birthdaystore['users1'];
break;
case $birthdaystore['day2'];
$birthdays = $birthdaystore['users2'];
break;
}
// memory saving
unset($birthdaystore);
$show['birthdays'] = iif ($birthdays, true, false);
}
else
{
$show['birthdays'] = false;
}
Well... according to my file, the code you've been looking for is right above that, it's line 74 on my index.php file... but then again, I don't know what could be wrong. What version of vB do you have?
Sean S
05-16-2004, 09:40 PM
thanks for the great hack :)
Synicide
05-16-2004, 10:34 PM
i ahve version 3.0.1
Then you should have the same file as all of us. Sorry for taking up all this space, but here is what your code should look like at the top, if it doesn't then you have a problem and should redownload the package.
<?php
/*================================================= =====================*\
|| ################################################## ################## ||
|| # vBulletin 3.0.1 - Licence Number [REMOVED LICENSE #]
|| # ---------------------------------------------------------------- # ||
|| # Copyright ?2000?2004 Jelsoft Enterprises Ltd. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| ################################################## ################## ||
\*================================================ ======================*/
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'index');
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array('holiday');
// get special data templates from the datastore
$specialtemplates = array(
'userstats',
'birthdaycache',
'maxloggedin',
'iconcache',
'eventcache',
'mailqueue'
);
// 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'
);
// pre-cache templates used by specific actions
$actiontemplates = array();
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
require_once('./includes/functions_bigthree.php');
require_once('./includes/functions_forumlist.php');
// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################
vhoang
05-19-2004, 02:07 AM
This hack in its current form works using forum permission. It also show deleted thread only to those members who can see them as well as being able to exclude forum id's so there should not be problems with members seeing what they shouldnt be able to.
I have finished my next version found here (http://www.infinite-forums.com/forumhome.php) it includes an extra page so users can specify the number of stats to show added admincp settings for post title trunctaing, username truncating, excluded forum ids, most stats to show on forumhome and extra page, default to show on forum home and extra page as well as a prefix setting for new and old posts. It is all ready to go with htl but with the new admin settings i need to create an installer to add those into the dbase.
I'm wondering if AnimeWebby has finished the installer and would be releasing the new mod soon?
InfiniteWebby
05-19-2004, 03:20 AM
Haven't even started, ive been working on my own sites for the time being. But it shouldn't be long once I do start.
Just wondering, can you make it into 'Top 10' ?
Thanks
msimplay
05-20-2004, 11:44 PM
that can be easily done by change 5 to 10 on that bit of the code
$displayrecords = "5";
Mystictrunks03
05-30-2004, 01:23 PM
on this one specific forum in my forum the top 5 doesnt count any threads or posts made in it...Whats the problem?
vhoang
06-02-2004, 07:18 PM
This really does not work with usergroup permission as there are replies in group-owned forums are not shown on the stats even when you are logged in and have permission to view such replies.
InfiniteWebby
06-03-2004, 07:57 AM
have have not done any work to this hack lately, I will look into and release a new version asap. Maybe two-three weeks as I am busy with work.
Mamochka
06-03-2004, 10:16 AM
I am wating for this hack.:)
ChrisBaktis
06-08-2004, 11:18 PM
I installed this and it works great...only problem is that we have a forum setup for mods and admins to talk. when we post in that forum those also show up in the Latest Posts section. Although regular members cant read the thread they can see the title. Is there any way around this?
msimplay
06-09-2004, 05:38 AM
I installed this and it works great...only problem is that we have a forum setup for mods and admins to talk. when we post in that forum those also show up in the Latest Posts section. Although regular members cant read the thread they can see the title. Is there any way around this?
in index php look for this 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
and where it says 13 add the id's of the forums you want excluded
bigreefer
06-09-2004, 05:55 AM
sorry, wrong thread
Caiman
06-09-2004, 11:19 PM
Thanks very much, changed the code a little and popped this on my vbAdvanced homepage, works a treat!
Clicked install
ChrisBaktis
06-10-2004, 03:18 PM
Thanks for the help - worked fine
HakkieDEV
06-14-2004, 09:23 PM
Great hack, installed it without problems!
Just a question, is it possible to change the topx-posters into the topx-posters in the same forumids as the newestthreadtopx?
(So it would display the topx posters in 1 (or more) specific forum(s))
Thanks!
Hakkie
Hazzo
06-16-2004, 12:37 AM
Would be neat, is this could turn into to say to see how well usergroups on the site are doing as well.. Maybe see things like, total members in the user group and posts.. Maybe even whose the newest/oldest member of that group based on join dates.. Dunno, could this be some sortof add on??
weitalia
07-14-2004, 01:54 AM
Fantastic!! Amazing!!
;)
bspiller82
08-09-2004, 07:52 PM
Anyway to prevent it from showing Priviate/locked forum posts in the top forum post list?
ChrisBaktis
08-10-2004, 01:36 PM
Anyway to prevent it from showing Priviate/locked forum posts in the top forum post list?
You need to change the line below with the forums ID you want excluded:
$excludedforums = "13"; // forums to be excluded from latest threads. Format "0,5,7"
bspiller82
08-10-2004, 02:52 PM
You need to change the line below with the forums ID you want excluded:
$excludedforums = "13"; // forums to be excluded from latest threads. Format "0,5,7"
Good good, what file or template do I stick this in?
bspiller82
08-10-2004, 02:54 PM
NM.. index.php shoulda looked first :)
jluerken
08-31-2004, 10:55 AM
This hack adds the top 'x' stats (top posters, newest members, newest replies) to your forumhome.
Hi AnimeWebby,
is it possible to remove threads from the newest threads section which are done from a special user?
I am using one user to post news from rss feeds into my board and now this is the only user shown in the list so I will exclude it :D
Is this possible?
InfiniteWebby
09-01-2004, 12:20 AM
Add:
$excludedusers = "0"; // users to be excluded from latest threads. Format "0,5,7"
Under:
$excludedforums = "13"; // forums to be excluded from latest threads. Format "0,5,7"
And change 0 to the id's of the user/s that you use to post rss feeds.
And Add:
AND thread.userid NOT IN ($excludedusers)
Under:
WHERE thread.forumid NOT IN ($excludedforums)
BTW this is untested so backup your index.php file before doing this, as you might need to re use it later.
Oh and terribly sorry for not releasing any new version I have been extremely busy with work and my sites. Hopefully I might get something done soon.
jluerken
09-01-2004, 10:54 AM
Add:
$excludedusers = "0"; // users to be excluded from latest threads. Format "0,5,7"
Under:
$excludedforums = "13"; // forums to be excluded from latest threads. Format "0,5,7"
And change 0 to the id's of the user/s that you use to post rss feeds.
And Add:
AND thread.userid NOT IN ($excludedusers)
Under:
WHERE thread.forumid NOT IN ($excludedforums)
BTW this is untested so backup your index.php file before doing this, as you might need to re use it later.
Oh and terribly sorry for not releasing any new version I have been extremely busy with work and my sites. Hopefully I might get something done soon.
It must be
AND user.userid NOT IN ($excludedusers)
and not
WHERE thread.forumid NOT IN ($excludedforums)
then is your modification working.
You should add this to the downloadable version :D
DeMiNe0
09-01-2004, 12:16 PM
Database error in vBulletin 3.0.3:
Invalid SQL:
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
, NOT ISNULL(deletionlog.primaryid) AS isdeleted, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason
FROM vb3_thread AS thread
LEFT JOIN vb3_user AS user ON (user.username = thread.lastposter)
LEFT JOIN vb3_deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
WHERE thread.forumid NOT IN ()
ORDER BY thread.lastpost DESC LIMIT 0, 5
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')
ORDER BY thread.lastpost DESC LIMIT 0, 5' at line 6
mysql error number: 1064
Date: Wednesday 01st of September 2004 09:15:02 AM
Script: http://www.digitaltoxicity.net/forums/index.php?
Referer: http://www.digitaltoxicity.net/forums/admincp/index.php?do=head
Username: DeMiNe0
jluerken
09-01-2004, 02:05 PM
Database error in vBulletin 3.0.3:
Invalid SQL:
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
, NOT ISNULL(deletionlog.primaryid) AS isdeleted, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason
FROM vb3_thread AS thread
LEFT JOIN vb3_user AS user ON (user.username = thread.lastposter)
LEFT JOIN vb3_deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
WHERE thread.forumid NOT IN ()
ORDER BY thread.lastpost DESC LIMIT 0, 5
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')
ORDER BY thread.lastpost DESC LIMIT 0, 5' at line 6
mysql error number: 1064
Date: Wednesday 01st of September 2004 09:15:02 AM
Script: http://www.digitaltoxicity.net/forums/index.php?
Referer: http://www.digitaltoxicity.net/forums/admincp/index.php?do=head
Username: DeMiNe0
Demineo is this a failure which came up after you installed the hack or my modification?
If this came from the small modification then please read my thread above yours and change the line to fix this.
DeMiNe0
09-02-2004, 01:27 AM
its just from the hack itself.
InfiniteWebby
09-02-2004, 09:27 AM
I don't think you can have a null value for your $excludedforums variable so just stick a 0 in there and tell me what happens.
I.E $excludedforums = "0";
Loki12
09-05-2004, 12:07 PM
I would also like to see "Newest Posters" replaced with "Best Reputation". It works on this forum:
http://www.morcmtb.org/forums/
But no-one has yet given the details of how to change this. :( It would be greatly appreciated.
Nj?rd Eriksson
09-06-2004, 12:31 PM
It's just a minor code change, but in general not recommended for forums on which The Curse of the Cosmo is a member, or he will start his sadsacking again. ;)
Loki12
09-07-2004, 05:03 AM
It's just a minor code change, but in general not recommended for forums on which The Curse of the Cosmo is a member, or he will start his sadsacking again. ;)
LOL!!! One can never escape you mr Eriksson. :D
Loki12
09-07-2004, 06:14 PM
I would also like to see "Newest Posters" replaced with "Best Reputation". It works on this forum:
http://www.morcmtb.org/forums/
But no-one has yet given the details of how to change this. :( It would be greatly appreciated.
Alright, any takers? :ermm:
* jd clicks install *
I have been testing this for a while, it is great just installed it on my live forum.
Only removed the post count for new members from the display (removed from forumhome_stats_poster template) as most usually stay at 0 before passing of the list (sign-up average of about 60 people a day).
Thank you.
JD. :)
Neal-UK
10-04-2004, 12:12 PM
Alright, any takers? :ermm:
I also would like to see Top Posters removed and just replaced with the reputation, if not, I would just like to remove top posters and leave it with Newest Members and Latest Threads, etc.
Any ideas anyone, or do I just delete this bit from the index.php file?
Bloodlust
10-04-2004, 07:20 PM
I'm gonna install this ASAP. Thanks!
Blam Forumz
10-12-2004, 05:36 PM
anyway to stop it grabbing posts from a selected forum?
Blam Forumz
10-12-2004, 05:50 PM
nm got it :)
qwertzu
10-26-2004, 09:10 AM
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)
thanks a lot
lange
10-31-2004, 05:10 AM
Is there nobody, who can say me how to truncate Lastposter so that the username will be trim ?
msimplay
10-31-2004, 07:07 AM
i'd like it if the latest threads also showed the thread icon chosen for it like the latest posts block on vbadvanced
but i'm also wondering how will it affect queries
Metropolitan
11-06-2004, 10:03 PM
*installed*
But i have a small problem.
The statistics are shown up at the bottom of the forum home, but i want the statistics above the "Forum Contain New Posts" Icon and below the small board statistics (welcome to our...)
Can anyone help me?
Great hack .. installed with no problems on 3.0.3
Clicked install
Spencer F.
11-28-2004, 10:22 PM
I got this hack to work on my vB 3.0.3 forum:
http://www.osdiscussion.com/
Installed!
Spyke
11-29-2004, 11:37 PM
hi,
a user of mine has a long user name, becuase of its it drastically distorts my styles when it's listed in any of the top x stats table. Is there anyway to trunicate long user names in within that table? (so that if it's higher then 15 characters or something it will cut the rest off?)
Thanks.
Heo13
12-02-2004, 02:47 PM
How can i make the forums (threads in them) which can only be viewed by moderators, to be viewed in Top 10 Stats at the bottom of the page?
folkish
12-05-2004, 04:20 PM
/me clicks install.
Great hack, and I like the more slimline look that the member on page one of this thread suggested.
Zavsta6911
12-11-2004, 04:59 AM
i installed hack fine and it shows Top 5 Stats bar, but no memebrs under the categories?
Lottis
12-20-2004, 08:57 AM
take the ' from the front and end of the templates you created
Im missed this. Thanx fore the help. This is working great.
Clicks innstall.
kadafi_alive
12-29-2004, 07:27 PM
Nevermind
shuichi_akai
12-30-2004, 12:43 PM
I think it's not perfect,
The posts from invisible forum still be view by everybody,
Can you hide it from 'X' Starts ?
lanc3lot
01-02-2005, 04:03 PM
Just installed this hack...anybody knows if we can exclude certain members from that table(i want to exclude the site stuff members) like we exlude forums for example?
Thanks in advance, great hack:)
I have only found this post (https://vborg.vbsupport.ru/showpost.php?p=548688&postcount=126) but it seems that is only to exclude user that make specific threads...i want to exclude users from the top Posters listing
Thanks:)
lanc3lot
01-18-2005, 12:48 AM
Nevermind the last one, with the kind help of animewebby i solved it:)
Does anyone knows if this is working for 3.0.5?
Rogue Pan
01-20-2005, 05:49 AM
don't know but works in 3.0.6
EZ-Dozet
01-27-2005, 07:16 AM
I read through this whole thread. I see spots where people ask to delete users for the top X posts. I am looking for this. I would like to have a Top X posters for all members, admin, and mods but I would like a separate box for Top X Members. Or any particular choice of user groups.
Any ideas??
TIA
Vizionz
01-28-2005, 12:59 AM
this hack went smooth on 3.06 thanks for doing it up
EZ-Dozet
02-11-2005, 05:05 AM
So no luck with my question then. Darn.
soniceffect
02-17-2005, 09:06 PM
Excellent hack ... *clicks installed*
Hoping someone can help me a little here though .. I know you`ve shown how you can stop threads being shown from a certain user .. But how do I stop a user from showing up in the top 'x' posters?
renee1
02-20-2005, 05:39 PM
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/htdocs/html/index.php on line 50
Help?
renee1
02-20-2005, 06:44 PM
got it, looks great thanks
Solid-Snake
03-05-2005, 03:59 PM
I think I have a problem here. When new posts or topics has been made, the 'Newest Replies' doesn't work. It's like froozen or something. lol Any idea what's the problem?
Solid-Snake
03-07-2005, 01:46 PM
Bump! Any help?
Solid-Snake
03-09-2005, 09:49 AM
Bump #2 lol
jetoncivili
03-12-2005, 09:59 AM
i instelled this wonderfull program but in my program have nothing new all 0
Statistics - Top
Top Posters Newest Members Newest Replies
Member: Posts:
Member: Posts:
Thread: Last Poster: Views: Replies:
jetoncivili
03-12-2005, 03:50 PM
i have instelled this wonderfull program but in my program have nothing new is not active
Statistics - Top
Top Posters Newest Members Newest Replies
Member: Posts:
Member: Posts:
Thread: Last Poster: Views: Replies:
what should i do to get it active????
michael5472
03-12-2005, 05:18 PM
Does this work with 3.0.7 ?
michael5472
03-12-2005, 05:33 PM
Tested and answered yes it does :smoke:
Cheers for the hack :D
jetoncivili
03-12-2005, 09:52 PM
i have instelled this wonderfull program but in my program have nothing new is not active
Statistics - Top
Top Posters Newest Members Newest Replies
Member: Posts:
Member: Posts:
Thread: Last Poster: Views: Replies:
what should i do to get it active????
A repeat question again bruthers
NyC gQ
03-20-2005, 09:19 PM
Can someone help me install this thing..i'm really bad with scripts and don't feel comftorable doing this myself...if you have aol or aim...my sn is xxnycgqxx THANKS
kenji4861
03-22-2005, 03:43 AM
Just got it installed on http://www.spoofee.com - awesome mod!
ChrisBaktis
03-24-2005, 01:48 PM
Need a little help. I installed a new skin and the Top Stats works great on the default but when I add the same Code to the new skin I get 5 extra 'test' lines in the stats. I have no idea why. See the picture. If I go from skin to skin all works fine except the new one (it is setup as a child style). Can anyone help me out?
xtreme-mobile
03-27-2005, 03:43 PM
great hack
clicked install :)
KanyeWest
03-27-2005, 05:35 PM
How do i make it Top 10 stats
WhiteOx2
03-27-2005, 07:29 PM
How do i make it Top 10 statsSee this bit?
Change it.
$displayrecords = "5"; // how many records should we show?
Mark.B
04-01-2005, 10:14 AM
How could I make an additional column in the threads info to show what forum it was from?
The threads table only appears to store the forumid rather than the actual name of the forum, I know how to pull that out and I know how to add the actual column in the template but how do I then convert the forumid into the forum title?
lasto
04-01-2005, 10:38 AM
im amazed this hack never got HOTM status as its one fo the first hacks i put on when i do a test board.Awesome hack anime and i liek the suggestion above from Mark.B about new column to show what forum it is in.
Maybe an update ?
Mark.B
04-01-2005, 10:40 AM
im amazed this hack never got HOTM status as its one fo the first hacks i put on when i do a test board.Awesome hack anime and i liek the suggestion above from Mark.B about new column to show what forum it is in.
Maybe an update ?
If it wasn't for the convoluted way vB handles this, I could write such an addition myself.
Sadly, the thread table only stores the forumid number, not the actual forum name. So I could easily make it display that number, but not the actual name.
lasto
04-01-2005, 11:07 AM
u know something that guy who does the harry potter forums m8 he wrote a hack like this and released it the other day but it needs a cron job to update the stats.Mybe u could ask him how he grabbed the forum ids as its deffo available in his version.
Mark.B
04-01-2005, 12:20 PM
I think I've done it!
http://www.bowlandcentral.com/forum
Mine only has threads, I removed the other two sections as we don't really need them and it saves two queries.
I will post the code later if anyone is interested but I did it using a LEFT JOIN that I nicked from vbindex!
lasto
04-01-2005, 12:21 PM
im interested in the full hack but with the forums listed that the thread is in m8 if u can pull that off :)
Infact it looks quite smart on your forums - anychance of the code :)
Mark.B
04-01-2005, 01:51 PM
im interested in the full hack but with the forums listed that the thread is in m8 if u can pull that off :)
Infact it looks quite smart on your forums - anychance of the code :)
That can be done but there may be an issue of lack of space...an extra column added with the new members/top posters boxes still present may be a bit of a squeeze on low resolutions. With nowrap being used as well this will lead to some odd looking behaviour in some cases.
I'm not about much this weekend but I'll see what I can knock up early next week.
lasto
04-01-2005, 07:23 PM
take off top posters or newest members but i would prefer to take off top posters if it would fit the forum name in there.
and cheers Mark.B
Breathex
04-05-2005, 07:28 AM
very nice hack - installed
but,
at new topics section it writes "[new]" and [old] near the names of the topics. how can i translate them into my language? i changed others words but i can't find both.
thanx for the answers
Snake
04-05-2005, 09:18 AM
Go to the forumhome_stats_thread template and find:
<tr>
<td class="smallfont"><strong>[<i><if condition="$getstats_thread[newpost]">New<else />Old</if></i>] <a href="showthread.php?$session[sessionurl]goto=newpost&t=$getstats_thread[threadid]" title="<phrase 1="$getstats_thread[title]">$vbphrase[go_first_unread_in_thread_x]</phrase>">$getstats_thread[titletrimmed]</a></strong></td>
<if condition="$getstats_thread[isdeleted]">
<td class="smallfont"colspan=3" align="left"><phrase 1="member.php?$session[sessionurl]u=$getstats_thread[del_userid]" 2="$getstats_thread[del_username]">$vbphrase[thread_deleted_by_x]</phrase></td>
<else />
<td class="smallfont"><strong><a href="member.php?$session[sessionurl]u=$getstats_thread[userid]">$getstats_thread[lastposter]</a></strong></td>
<td class="smallfont" align="right"><strong>$getstats_thread[views]</strong></td>
<td class="smallfont" align="right"><strong>$getstats_thread[replycount]</strong></td>
</if>
</tr>
Change the green text to your language. :)
Breathex
04-05-2005, 09:33 AM
thanx alot for your answer Snake :)
Snake
04-05-2005, 10:06 AM
No problem, I'm glad to help. :)
I tried to install this nice hack, but in last step I must modify FORUMHOME template, after do the changes that are in the instruction and click save it shows 'Internal Server Error' The server encountered an internal error or misconfiguration and was unable to complete your request.... Any idea how to fix that?
Snake
04-06-2005, 10:44 AM
Uhh... it has nothing to do with vBulletin or the mod. There might be a problem with your server - I guess. Try to contact your host.
kadafi_alive
04-07-2005, 10:07 AM
Hi,
Does anyone know how to fix the double appearance on the 'Newest Replies'. Everytime I move a thread and leave re-direct link behind, it shows double on the Newest replies.
Anyone know how to fix it?
Regards
kadafi_alive
04-09-2005, 06:06 PM
It happends when I redirect threads. It shows the redirection link and the actual thread twice in 'Newest Replies'
lasto
04-09-2005, 06:45 PM
That can be done but there may be an issue of lack of space...an extra column added with the new members/top posters boxes still present may be a bit of a squeeze on low resolutions. With nowrap being used as well this will lead to some odd looking behaviour in some cases.
I'm not about much this weekend but I'll see what I can knock up early next week.
u managed this as yet m8
kadafi_alive
04-10-2005, 08:39 AM
Anyone? I really need to fix this bug.
Wasim
04-19-2005, 07:50 PM
Can someone show me how you replace Newest Users post count with Top 5 repuations?
gregsbaby64
04-26-2005, 10:36 AM
Great hack, thanks! :)
dimdan
05-03-2005, 08:48 AM
that mod on forumdisplayphp and showthread.php??? how do???
Snake
05-03-2005, 10:21 AM
Are you saying how to install this mod? If so, gimme a PM.
xtreme-mobile
05-07-2005, 08:00 AM
is there a way of stopping members seeing posts that were made in my staff room
as at the moment they are showing up in a last 5 stats :)
cheers
lange
05-09-2005, 03:07 AM
Is there a way to display Date for Threads?
Paul_d_g
05-09-2005, 02:58 PM
Does this work for 3.0.7?
DaPro
05-09-2005, 07:40 PM
yes it does, works fine on my forums
http://www.diteam.org/
lovelyman_x
05-10-2005, 11:16 AM
Can i show newest replies of a box which i want , ex : I want to show the newest replies of forum's ID 3 only , who can help me ?
Sorry because my English is so bad !
DaPro
05-10-2005, 11:48 AM
// ### 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
All you have to do is exclude all other forum id's except for 3. I believe this is what your looking for.
xtreme-mobile
05-10-2005, 04:44 PM
where would we find that code mate :)
index?
DaPro
05-10-2005, 04:47 PM
Yes, located in the root index.php. It is also in the txt attached to this hack. You need to locate those lines in the file and adjust accordingly. Good Luck. Hope that helps :-)
xtreme-mobile
05-10-2005, 05:01 PM
thanks ill try now :)
lovelyman_x
05-11-2005, 02:23 AM
All you have to do is exclude all other forum id's except for 3. I believe this is what your looking for.
thanks 4 sharing . good job !
lovelyman_x
05-11-2005, 02:33 AM
but it don't work !
BOSS 302
05-14-2005, 09:59 AM
I installed this 100% to directions but all stats show up 0, I even tried posting and stuff after, nothing!
Please help, saw this Q asked a few times.. No one responded...
BOSS 302
05-14-2005, 11:36 AM
pretty please?
BOSS 302
05-14-2005, 02:07 PM
Okay it works! but some please help with this problem, for real!
if you go to my site www.mustangmafia.com you will see the stat block just fine
But if you are browsing forums and then click the home link the url is www.mustangmafia.com/forum.php? even though its the homepage still!
Thus what can i do to make it always show on the home page no matter what the url
is!
click the links and see what i mean!
BOSS 302
05-15-2005, 04:07 AM
Pleeeeeeeeeeeeaaaaaaaassssssssseeeeeeee
BOSS 302
05-15-2005, 11:16 AM
PleeeeeeeeeeeeaaaaaaaassssssssseeeeeeeeIm with him...lol :ermm:
Marco van Herwaarden
05-15-2005, 12:02 PM
Boss 302,
Please wait 24 hours before bumping a thread.
BOSS 302
05-15-2005, 02:30 PM
Ogie Dogie, sorry wasn't sure of any rules on it or anything just seeking help and thought some one would have replied by now, I really wanna fix this.
p.s. don't count this as a bump, lol. Just telling you i saw the post and i will wait the 24 if that's the rule.
Next post i make in 24 is gonna have the problem posted in it again cuz it's getting barried.
Thanks,Sean..
Marco van Herwaarden
05-15-2005, 05:15 PM
Ogie Dogie, sorry wasn't sure of any rules on it or anything just seeking help and thought some one would have replied by now, I really wanna fix this.
A quote from the Board rules, you can find a link in hte NavBar.
1.4 No senseless "Bumping": Please do not bump your request/help searching or other threads several times a day. Remember there are people who don't browse this board every hour. So do not bump a thread within 24h or too much even after 24 hours.
BOSS 302
05-15-2005, 05:45 PM
I gotcha, It's all good now anyway i fixed the problem my self. 3 cheers for me! -_-
RapCapital
05-22-2005, 12:10 AM
Will this work with 3.0.7?
*EDIT* nm
MissKalunji
05-22-2005, 09:35 AM
Will this work on vb 3.5.0 ?
SuperFly
05-23-2005, 05:21 PM
http://www.biohazardentertainment.com/forums/index.php?
i might sound like a n00b :D but can anyone tell me how to get my members names smaller in stats block?
Sleepyk
05-24-2005, 09:52 PM
got it but some of the stats arnt right
check out http://thebattledome.com
bottom of front page and sorry uhh wont show less u a member so ude name
name passy = name
Brandon Sheley
05-28-2005, 04:36 AM
thank you for the hack, installed no problems :)
Nuckolsc.com
06-06-2005, 06:44 PM
great hack... thanks alot man!
flee2
06-10-2005, 04:47 AM
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
, NOT ISNULL(deletionlog.primaryid) AS isdeleted, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason
FROM thread AS thread
LEFT JOIN user AS user ON (user.username = thread.lastposter)
LEFT JOIN deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
WHERE thread.forumid NOT IN (13)
ORDER BY thread.lastpost DESC LIMIT 0, 5
mysql error: Column 'views' in field list is ambiguous
mysql error number: 1052
what happened? at vb 3.0.7
conandoyle
06-15-2005, 11:33 PM
AnimeWebby, Can you help me?
I'm using Version 3.0.7 and installed your hack " Top 'X' Stats " careful.
But i have this error:
https://vborg.vbsupport.ru/external/2005/06/2.jpg
Can you fix this error for me, thanks so much!
Sinistra
06-16-2005, 10:32 PM
OK I would like this to show JUST New threads and latest replied to threads. and exclued the hidden forums exept to the people that are ment to see it. Can I do this? and how?
OK maybe I should clarify what Im looking for ^_^
OK
The image below shows what I want to do with it. you see it shows latest new posts with replies but if you notice in the replyes none of them show up. So Thats what Im wanting to do ^_^
mike3k
07-01-2005, 06:52 AM
i've installed this hack but i dotn see any info in the topx stats box on the index
i've made the custom templates
'forumhome_stats_member'
'forumhome_stats_poster'
'forumhome_stats_thread'
updated the index.php with the correct info
uploaded it but dont see any stats in teh box :(
Can somone help please.
Thanks in avance
1nf3rn0
07-01-2005, 04:21 PM
almost sounds like your index.php file wasn't uploaded or edited....i know you said you did, but try once more and let's see what happens
mike3k
07-01-2005, 05:55 PM
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
1nf3rn0
07-01-2005, 06:04 PM
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..
Sleepyk
07-01-2005, 08:14 PM
<a href="http://thebattledome.com" target="_blank">http://thebattledome.com</a>
i havin lil prob with % on top poster thread person, etc
King Kovifor
07-01-2005, 11:56 PM
Is there a way to exclude HIDDEN Forums to the groups that can't see it.
1nf3rn0
07-02-2005, 07:09 AM
yes sir..ask and ye shall receive bud!
look for:
$excludedforums = "13"; // forums to be excluded from latest threads. Format "0,5,7"
and just add the forum id's you want excluded!
1nf3rn0
07-02-2005, 07:11 AM
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
mike3k
07-02-2005, 11:41 AM
ok i have pasted some of the code here
all the code that has been alered.
// ### 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') . '");');
mike3k
07-02-2005, 11:42 AM
oh and templates but as you said this works.
// 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',
1nf3rn0
07-02-2005, 05:56 PM
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
soniceffect
07-02-2005, 08:17 PM
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?
1nf3rn0
07-02-2005, 08:37 PM
replace:
SELECT userid, username, posts FROM " . TABLE_PREFIX . "user ORDER BY posts DESC LIMIT 0, $displayrecords
with:
SELECT userid, username, posts FROM " . TABLE_PREFIX . "user WHERE userid NOT IN (1,2,3) ORDER BY posts DESC LIMIT 0, $displayrecords
change 1,2,3 to the userid(s) of the users you wish to exclude.
mike3k
07-03-2005, 06:36 AM
ok fixed it
Didnt help that in the readme of the mod it shows you the templates with ' on them remove them and your set lmao....Thanks for your help 1nf3rn0 its working fine now
cheers again
Dont know a mod that tells who you has viewed a thread do you>?
Thanks
1nf3rn0
07-03-2005, 08:13 AM
sure do bro!
https://vborg.vbsupport.ru/showthread.php?t=61222
1nf3rn0
07-03-2005, 08:15 AM
ok fixed it
Didnt help that in the readme of the mod it shows you the templates with ' on them remove them and your set lmao....Thanks for your help 1nf3rn0 its working fine now
cheers again
Dont know a mod that tells who you has viewed a thread do you>?
Thanks
oh sh1t..hahaha..yeah i guess that would help....glad you got it going bro!
mike3k
07-03-2005, 04:33 PM
thanks m8 :)
King Kovifor
07-05-2005, 04:00 PM
yes sir..ask and ye shall receive bud!
look for:
$excludedforums = "13"; // forums to be excluded from latest threads. Format "0,5,7"
and just add the forum id's you want excluded!
Where would this code be located at?
Damien2005
07-06-2005, 03:21 PM
Where would this code be located at?
If you search in your index.php you will find it :rolleyes:
Damien2005
07-06-2005, 03:24 PM
I like the Top X stats very much
But is there a way to color the usernames like in the useronline section?
I have see it on a other forum but cant find how to do it.. some how can help?
King Kovifor
07-10-2005, 01:43 PM
If you search in your index.php you will find it :rolleyes:
Thanks... I'll do that soon.
King Kovifor
07-14-2005, 10:50 PM
Small mistake in template: forumhome_stats_poster. You forgot a Td Class in there. So the template SHould be:
<tr>
<td class="smallfont" width="100%"><b><a href="member.php?u=$getstats_poster[userid]">$getstats_poster[username]</a></b></td>
<td class="smallfont" align="right"><b>$getstats_poster[posts]</b></td>
</tr>
It's in red.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.