vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Forum statisctics at the top of each forum (https://vborg.vbsupport.ru/showthread.php?t=52215)

amykhar 04-29-2003 08:38 PM

Regarding the thread rating problem, I am not sure about this, but you might want to take the average of the totalvote column in the thread table instead. This value appears to be the average rating for each thread and taking an average of that column would be a more accurate representation of what you want.

Amy

amykhar 04-29-2003 11:10 PM

There's another bug. In forums with large numbers of threads, the average is coming out wrong. I am finding averages of 26600 % in one forum.

The fix is to change:

Code:

$nbemess=number_format($nbemesss['nbe']);
to

Code:

$nbemess=$nbemesss['nbe'];
If you want the comma displayed in the forumdisplay, just create a new variable such as $numthreads = number_format($nbemess); and put $numthreads in the template instead of $nbemess.



Amy

Boofo 04-29-2003 11:38 PM

It seems the last poster is still not coming up quite right. I think it must be going by server time because in 1 forum I have a lastposter at 3:58 pm today and it still shows the one from yesterday. Any way to put it from the forum itself?

subu1 04-30-2003 04:50 AM

Quote:

Yesterday at 04:04 PM amykhar said this in Post #40
Bug fix for the incorrect Best Poster:

Find:
PHP Code:

$j=1;
while (
$j<$i) {
   if (
$counts[$j]>$counts[$j-1]) {
     
$mposteur=$nom[$j];
     
$liste[postuserid]=$userid[$j];
 }
     
$j=$j+1;  


Replace With:

PHP Code:

$j=1;
$max 0;
while (
$j<$i) {
   if (
$counts[$j]>$max) {
     
$max $counts[$j];
     
$mposteur=$nom[$j];
     
$liste[postuserid]=$userid[$j];
 }
     
$j=$j+1;  


The original code put all the posters in an array. Then, it said if poster x had more posts than poster x-1, it was the best poster. This was wrong. A max value had to be set and held. So, The max started out at 0. If poster x had more posts than max, poster x became the best poster and max became the number of posts X had made. It seems to work fine on my forums.

Amy

thxx it works, on 2.2.8 :bunny:

subu1 04-30-2003 07:09 AM

ok, I has however still another question of a Member with us in the forum. One can adjust it in such a way that the box is not indicated if no topics is there. That is the case if one into the overview forums goes and there only Subforen.

i hope my eng. is ok :rolleyes:

Boofo 04-30-2003 07:19 AM

If you have Xenon's "More Functions in Edit Post if you are an Admin" hack installed and you edit the time on a message, it will not pick it up as the Last Poster. It will pick the one before it. Also, I am still get the Average rating to show start for some forums that there has been no rating in at all. The Top thread starter seems to work now but it does not include announcement threads. Any way to pick that up?

Boofo 04-30-2003 07:22 AM

Quote:

Yesterday at 12:36 PM grog6 said this in Post #48
@ amykhar : I agree with you, that's why I selected Best threads creator ;). In the VBulletin's database, forumid is not shown in the post's table, and seen the number of posts per forum, it would be really hard for the server :-/

You should be able to do a LEFT JOIN on the query for the last poster and pull the forumid, shouldn't you? ;)

Holidazed 04-30-2003 06:21 PM

hmm, maybe a BUG. When I view a sub-forum that has a total of six threads (each started by a different person, this hack displays "Most Threads Started by: (17 %)". In other words, no name at all is displayed, but % is there anyway. Granted, the % is correct, but should not say "6-way tie) or something like that?

Holidazed 04-30-2003 06:22 PM

boofo still has not had a question answered and I need the answer too. How do we link the "Last Poster" to the profile like the "Most Threads Started by" is?

grog6 04-30-2003 08:17 PM

@ Boofo : You can use this query to get back the userid of the lastposter in a specific forum with this query :

PHP Code:

SELECT lastposteruserid FROM thread,user WHERE (thread.forumid='$forumid' AND user.username=thread.lastposterORDER BY threadid DESC LIMIT 0,

@ bitg : For your first post (bug), it's strang, all works now perfectly for me with amy's modification

Concerning your second question, I've answered here ;) and modify it now to add a link to the lastposter's profile


All times are GMT. The time now is 05:06 PM.

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.02064 seconds
  • Memory Usage 1,752KB
  • 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
  • (2)bbcode_code_printable
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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