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)

grog6 04-26-2003 09:00 PM

Forum statisctics at the top of each forum
 
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

grog6 04-27-2003 10:52 AM

VOICI LA VERSION FRANCAISE
Voici la version francaise

grog6 04-27-2003 10:54 AM

Screenshot in English :cool:

grog6 04-27-2003 10:55 AM

Capture en francais

iggy123 04-27-2003 11:11 AM

Nice hack, will try it out later thnx

Dean C 04-27-2003 11:34 AM

Very good idea ;)

In english we would say "Total Views" not "Total see's" :)

Regards

- miSt

MindTrix 04-27-2003 12:04 PM

Wow thats brilliant!! Thanks **whacks install**

grog6 04-27-2003 12:12 PM

@ Mist : Oupsss ;)

just correct it in the template ;)

Xenon 04-27-2003 12:18 PM

looks really nice :)

hayl 04-27-2003 01:17 PM

install

wolfe 04-27-2003 06:32 PM

i have made a revamp and i have redone the template and made it a seperate template check it out.

wolfe 04-27-2003 06:35 PM

SCREEN:

Disturbed 04-27-2003 07:29 PM

wats the difference between both hacks?

eh nevermind, figured it out :P

nice hack grog, thanks for sharing

wolfe 04-27-2003 07:31 PM

well there both the same hack made by grog6 but i have cleaned up the template and bit and made it so it has its own template for the stats. :D much easier to edit because no matter what you add to the forumdisplay_stats templateyou know its only for this hack. you can't go wrong

Boofo 04-27-2003 08:02 PM

Quote:

Today at 04:31 PM wolfe said this in Post #14
well there both the same hack made by grog6 but i have cleaned up the template and bit and made it so it has its own template for the stats. :D much easier to edit because no matter what you add to the forumdisplay_stats templateyou know its only for this hack. you can't go wrong
You forgot to tell them to put $forumdisplaystats in the forumdisplay template and also to add forumdisplay_stats to the templatesused line in the forumdisplay.php (to save an extra query).

How do you link the last poster so it will bring up their profile when you click on it?

Logik 04-27-2003 08:19 PM

nice hack. thanks.

Boofo 04-27-2003 08:53 PM

I'm getting this to show up on a few forums:

Number Of Threads In This Forum: 2 Number Of Replys: 5
Top Poster In This Forum: (0%) Last Poster In This Forum: Boofo
Average Rating In This Forum: Total Views of threads in this forum: 117

It doesn't name the top poster on some forums. Any ideas what could be causing this?

subu1 04-27-2003 09:28 PM

fine Hack *click install* but can you change % with a Number???

greetz subu1

Snapperhaed 04-28-2003 03:06 AM

Installed with little effort, thanks!

One problem I do have, is that the english version is shown at the bottom of the page, and not the top in v2.3 #3. Maybe I just inserted somewhere incorrectly? Could Be!?! :D ... Smacks install.

grog6 04-28-2003 03:20 AM

@Boofo : I've the same problem in some forums too :-/
I'll look for it during the evening and try to correct it

@Snapperhaed : I don't understand ;) (I'm a small frenhcy ... :D)

@Subu1 : replace $avgposteur by $avgposteuri in the template modification ;)

Boofo 04-28-2003 04:44 AM

Quote:

Today at 12:06 AM Snapperhaed said this in Post #19
Installed with little effort, thanks!

One problem I do have, is that the english version is shown at the bottom of the page, and not the top in v2.3 #3. Maybe I just inserted somewhere incorrectly? Could Be!?! :D ... Smacks install.

Just put the code above $forumdisplay[threadslist].

Boofo 04-28-2003 04:47 AM

Quote:

Today at 12:20 AM grog6 said this in Post #20
@Boofo : I've the same problem in some forums too :-/
I'll look for it during the evening and try to correct it


Thank you, sir. ;)

Also, can you make the lastposter a link to the user's profile (like the Best poster is)?

And you might want to include the posts that are threads in the best poster. I have a forum where I have posted mostly threads and someone else is picked as the top poster when they have only posted 3 or 4 times. The Best poster count is way off for some of my forums, too. ;)

grog6 04-28-2003 06:02 AM

@Boofo : No pb for the link ;) But I think a query will have to be modified for it ;)

I'll modify it to count user's thread too ;) and look for the reason of non-working in some forums

Boofo 04-28-2003 07:59 AM

Quote:

Today at 03:02 AM grog6 said this in Post #23
@Boofo : No pb for the link ;) But I think a query will have to be modified for it ;)

I'll modify it to count user's thread too ;) and look for the reason of non-working in some forums

Thank you, again, sir. I'll be looking forward to the fixes. ;)

I did notice that in some forums, it does count the thread posts and in others it doesn't.

wolfe 04-28-2003 10:47 AM

Quote:

Yesterday at 11:02 PM Boofo said this in Post #15
You forgot to tell them to put $forumdisplaystats in the forumdisplay template and also to add forumdisplay_stats to the templatesused line in the forumdisplay.php (to save an extra query).

soz d00d i forgot to do that on my site lol thanx for the info d00d

wolfe 04-28-2003 10:52 AM

Quote:

Today at 06:06 AM Snapperhaed said this in Post #19
Installed with little effort, thanks!

One problem I do have, is that the english version is shown at the bottom of the page, and not the top in v2.3 #3. Maybe I just inserted somewhere incorrectly? Could Be!?! :D ... Smacks install.



d00d if you used my edited version then in the forumdisplay template

above

$forumdisplay[threadlist]

add

PHP Code:

<br>
<
center>
<
table cellpadding="0" cellspacing="0" border="0" bgcolor="{ tablebordercolor}"  width="50%" align="center"><tr><td>
<
table cellpadding="4" cellspacing="1" border="0"  width="100%">
<
tr id="cat">
    <
td bgcolor="{ tableheadbgcolor}" align="center" nowrap colspan="3"><normalfont><b>Statistics Of Forum: <i>$foruminfo[title]</i></b></normalfont></td>
</
tr>
<
tr>
    <
td bgcolor="{ firstaltcolor}" align="center" colspan="3" nowrap>
    <
table cellpadding="4" cellspacing="0" border="0" width="100%">
<
tr>
    <
td nowrap><smallfont><b>Number Of Threads In This Forum:</b$nbemess</smallfont></td>
    <
td nowrap><smallfont><b>Number Of Replys:</b$nbepost</smallfont></td>
</
tr>
<
tr
    <
td nowrap><smallfont><b>Best Poster In This Forum:</b> <A HREF="member.php?s=$session[sessionhash]&action=getinfo&userid=$liste[postuserid]target="_blank">$mposteur</a> (<b>$avgposteur%</b>)</td>
    <
td nowrap><smallfont><b>Last Poster In This Forum:</b$dposteur</smallfont></td>
</
tr>
<
tr
    <
td nowrap><smallfont><b>Average Rating In This Forum:</b$moyenne</smallfont></td>
    <
td nowrap><smallfont><b>Total Views of threads in this forum:</b$vue</smallfont></td>
</
tr
</
table>
    </
td>
</
tr>
</
table>
</
td></tr></table

for the original or add

$forumdisplaystats above it.


remember in the code above delete the spaces after the {'s

subu1 04-28-2003 10:57 AM

@grog6 , thnky you,

but i have a question. The best Poster ist not correkt in a forum.

The best Poster in a Forum ist not display there, but another Poster ???

What can i do, please help, thank you;)

Boofo 04-28-2003 11:32 AM

grog6, found another problem. I have a forum that it says has an average threads rating of 4 stars and there have been no ratings at all in that forum. ;)

subu1 04-28-2003 11:43 AM

sorry but i have found another bug, i thing so. I have a lot of subforums but it is not shows on display.

its my german board, sorry for my eng. :surprised:

look my att.

flup 04-28-2003 01:32 PM

Really nice done! wont install though

grog6 04-28-2003 02:07 PM

@ 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 04-28-2003 02:11 PM

Quote:

Today at 11:07 AM grog6 said this in Post #31

@ 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 04-28-2003 03:38 PM

ups, i am verry stupid , sorryyyyyyyy.:-))

but why this here, Takeda is not the Best Poster, it is Keek :confused:

grog6 04-28-2003 05:20 PM

@ 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 ... :ogre:

I'll find, I'll find, I'll find a solutionnnnnnnnn :bunny:

wolfe 04-28-2003 09:41 PM

lol hope you do d00d its a great hack :D

Jadelit 04-29-2003 04:21 AM

could you please update the attachment.

Thanks

irn-bru 04-29-2003 06:14 AM

Is this able to go in to the subforums like forumdisplay forumbit level1_post ect.

sabret00the 04-29-2003 12:17 PM

'best poster' seems to give out the wrong information is there anyway to fix this at all?

grog6 04-29-2003 12:41 PM

@ 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 ...

amykhar 04-29-2003 01:04 PM

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


All times are GMT. The time now is 08:00 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.02694 seconds
  • Memory Usage 1,842KB
  • 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
  • (3)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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