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.
@ subu1 : I'll make modifications to show 0 if there is no post or don't show it at all if you prefer
@ Boofo : Are you sure there is no rate at all ? even in the DB ? because in the forumdisplay, the rate is only shown if there is more than 1 vote in the same post I think
@ Boofo : Are you sure there is no rate at all ? even in the DB ? because in the forumdisplay, the rate is only shown if there is more than 1 vote in the same post I think
I double checked it. There are no rating votes in that forum.
@ subu1 : not stupid at all, I try correct it now, but it's really strange, I've some forums where all seems (and is) to be OK, and in an other, I've exactly the same thing as you, my code is correct, queries too ... gre:
I'll find, I'll find, I'll find a solutionnnnnnnnn :bunny:
@ sabret00the : I've created a post yesterday in the PHP/MYSQL section here, have no answer for the moment, I've looked for this problem yesterday evening during more than 1 hour, don't have find where the problem is :-/
The stranger thing is that it displays the correct username in some forums , but in some others, it doesn't show the reality :5 I don't desesperate to find a solution for this problem ...
$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.