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

Reply
 
Thread Tools
Forum statisctics at the top of each forum Details »»
Forum statisctics at the top of each forum
Version: 1.00, by grog6 grog6 is offline
Developer Last Online: Dec 2008 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 04-26-2003 Last Update: Never Installs: 41
 
No support by the author.

Ce hack affiche en haut de vos forums un petit tableau vous permettant de savoir quelques petites infos sur le forum dans lequel vous vous trouvez tels que :
- Nbe de sujets
- Nbe de reponses
- Meilleur posteur du forum
- Dernier posteur
- Note moyenne
- Vues totales des sujets du forum

Fichiers a modifier : 1
Templates a modifier : 1

Temps d'installation : 2 min



:banana:


This hack displays at the top of each forum, a table where many statistics are displayed such as :
- Number of threads created
- Number of relplys
- Best post creator
- last poster
- Average mark
- Total of sees of the forum

Files to modify : 1
Templates to modify : 1

installation time : 2 min






Voici la version anglaise


HERE IS THE ENGLISH VERSION

Show Your Support

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

Comments
  #62  
Old 04-30-2003, 09:26 PM
grog6's Avatar
grog6 grog6 is offline
 
Join Date: Apr 2002
Location: France
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So, to add link to lastposter'sprofile, replace in admin/functions.php :

PHP Code:
$dposteurs=$DB_site->query_first("SELECT lastposter FROM thread WHERE forumid='$forumid' ORDER BY threadid DESC");
$dposteur=$dposteurs['lastposter']; 
with

PHP Code:
$dposteurs=$DB_site->query_first("SELECT lastposter, userid FROM thread,user WHERE (thread.forumid='$forumid' AND 

user.username=thread.lastposter) ORDER BY threadid DESC LIMIT 0,1"
);
$dposteurnom=$dposteurs['lastposter'];
$dposteurid=$dposteurs['userid']; 
and in the template forumdisplay_stats, replace $dposteur with

PHP Code:
<a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$dposteurid
target=_blank>$dposteurnom</a
Reply With Quote
  #63  
Old 04-30-2003, 10:38 PM
subu1 subu1 is offline
 
Join Date: Sep 2002
Location: Germany
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i cant find this in admin/functions.php
Reply With Quote
  #64  
Old 04-30-2003, 11:29 PM
grog6's Avatar
grog6 grog6 is offline
 
Join Date: Apr 2002
Location: France
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Haven't you it at the end of the modification there is to do for my hack :

PHP Code:
$dposteurs=$DB_site->query_first("SELECT lastposter FROM thread WHERE forumid='$forumid' ORDER BY threadid DESC");
$dposteur=$dposteurs['lastposter'];
eval(
"\$forumdisplaystats = \"".gettemplate('forumdisplay_stats')."\";"); 
??
Reply With Quote
  #65  
Old 04-30-2003, 11:58 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 06:38 PM subu1 said this in Post #62
i cant find this in admin/functions.php
grog6 meant to say the forumdisplay.php file, not functions.php.
Reply With Quote
  #66  
Old 05-01-2003, 12:04 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

grog6, the lastposter link code works like a charm. Thanks.

bitg is right about the Top Thread Starter bug. If you have a forum with only one thread in it, it will also give the error where it will show 100 % but no Top Thread Starter username. If you also have a forum where every thread is started by a different user, it will not show the username, because it doesn't know which one to pick. You must have threads started by the same username for it to show the name. I hope that makes sense.

Amy, is there a way to fix the Average rating like you posted? It is still showing in one of my forums as a thread rating of 4 stars for an average and there are no thread ratings whatsoever in that forum.
Reply With Quote
  #67  
Old 05-01-2003, 09:41 AM
grog6's Avatar
grog6 grog6 is offline
 
Join Date: Apr 2002
Location: France
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@ Boofo : strange for the vote :-/

Run this query on your DB, just replace the $forumid with your forumid, and say us which result, you have

PHP Code:
SELECT AVG(vote) AS moythread FROM thread,threadrate WHERE (thread.forumid='$forumid' AND 
threadrate.threadid=thread.threadid 
It may show you sthg between 3.5 and 4.5, if it is not, there really might be a problem, but take a look at it before
Reply With Quote
  #68  
Old 05-01-2003, 11:20 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I ran this query because the one you gave me gave a db error.

SELECT AVG(vote) AS moythread FROM thread,threadrate WHERE thread.forumid='13' AND threadrate.threadid=thread.threadid;

and here is what it returned:

vote)ASmoythread
Reply With Quote
  #69  
Old 05-01-2003, 06:11 PM
Holidazed's Avatar
Holidazed Holidazed is offline
 
Join Date: May 2002
Location: Van Nuys, CA
Posts: 713
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

grog, thanks for the update. The Last Poster link works awesome. Now for the bug that shows no user name when more than one user has the same amount of posts.
Reply With Quote
  #70  
Old 05-04-2003, 04:57 PM
Edgar Edgar is offline
 
Join Date: Dec 2001
Location: Belgium
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sweet hack, works perfect on my forum.
I do have a few questions though. Will there be a similar hack in the future to display the same stats but then for all forums together on the forums home page?

I hope you know what I mean.
Reply With Quote
  #71  
Old 05-04-2003, 11:38 PM
RetroDreams RetroDreams is offline
 
Join Date: Nov 2002
Posts: 238
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a reason that the total views doesn't use the proper comma format like the total threads and replys?
Reply With Quote
Reply


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

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

Forum Jump


All times are GMT. The time now is 07:45 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.08036 seconds
  • Memory Usage 2,320KB
  • 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
  • (5)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
  • (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