Version: 1.00, by grog6
Developer Last Online: Dec 2008
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.
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.
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.
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?
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.
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.
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?
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?
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?
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?