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)

subu1 05-06-2003 05:30 AM

isnt??? what you mean......yes;)

theologyonline 05-07-2003 10:30 PM

I am not sure I understand the "last poster" thing.

My "last poster" rarely seems to be correct.

I read this entire thread and I am not sure if this has been answered specifically or not.

Crazy Pete 05-09-2003 09:48 PM

I have the same problem with the last poster thing. Sometimes it's right, other times it's not. Not sure what to do with it at this point.

Boofo 05-10-2003 12:33 PM

grog6, are you still supporting this hack. There are a few of us that are having problems with the lastposter not being right in a few forums. Any solution for this?

squawell 05-11-2003 03:10 AM

grog6 how to do top x stats of each forum??

do u have any idea? :bunny:

grog6 05-11-2003 09:31 AM

@ Boofo : Yup, I still support this hack, but I had problems such as a lot of other members to access vbulletin.org, it's now 3 days I couldn't access to this site ;)


For the last poster, You're right, a query seems to not be 100% correct ... I'll take a look at it during the evening and will try to fix this bug ;)

grog6 05-11-2003 09:32 AM

@ squawell : Don't understand what you want to do .. ;)

Boofo 05-11-2003 09:39 AM

Quote:

Today at 06:31 AM grog6 said this in Post #86
@ Boofo : Yup, I still support this hack, but I had problems such as a lot of other members to access vbulletin.org, it's now 3 days I couldn't access to this site ;)


For the last poster, You're right, a query seems to not be 100% correct ... I'll take a look at it during the evening and will try to fix this bug ;)

Can you also take a look at the Average Rating query, too? I am still getting 4 stars on a forum that has no thread ratings at all. ;)

grog6 05-11-2003 09:49 AM

@ Boofo : I'll take a loot at it too for you ;) But it seems to me this query is OK

squawell 05-11-2003 10:47 AM

Quote:

Today at 07:32 PM grog6 said this in Post #87
@ squawell : Don't understand what you want to do .. ;)
see attach pic...something like that...any idea? :)

cirisme 05-11-2003 11:27 AM

Installed and running well on 2.2.9! :D

Haven't had any prolems with the average rating, or last poster, but I have been making a few modifications. ;)

Boofo 05-11-2003 11:44 AM

Check the last poster in your Frat House forum. ;)

Boofo 05-11-2003 11:47 AM

Also, check your average rating in the Dean's List. ;)

yxboom 05-11-2003 02:02 PM

Mononoke is a bot but Im sure you already noticed that and I saw the Dean's List rating that is hilarious. This is one of those times where we say......ooops. ;)

Thanks Boofo! :)

Boofo 05-11-2003 02:06 PM

Still the last poster should have been updated right if the query was working ok. ;)

It's nice to see that I am not the only one having the Average Rating problem. ;)

cirisme 05-11-2003 03:23 PM

The Bot doesn't update the forum info, so I'm not all that suprised.(although, now that you bring it up; I think I'll update that :D)

As for the average rating... oops. :D

Boofo 05-11-2003 03:24 PM

Which Bot are you using?

Boofo 05-11-2003 04:12 PM

Ok, here is the fix for the lastposter problem. Thanks goes out to Logician for providing the basis of this code in one of his hacks. ;)

In forumdisplay.php, change the last poster query to:

PHP Code:

$dposteurs=$DB_site->query_first("SELECT post.dateline, thread.threadid, username, userid FROM post,thread WHERE thread.forumid=$forumid AND thread.threadid=post.threadid ORDER BY post.dateline DESC LIMIT 1"); 

and use this for the lastposter code in the template:

Quote:

<td nowrap><smallfont><b>Last Poster:</b> <a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$dposteurs[userid]" target=_blank>$dposteurs[username]</a></smallfont></td>
Let me know if this fixes it for everybody. It did for me. ;)

cirisme 05-11-2003 04:13 PM

It's the TomBot. There is a way to make it appear as the last poster, but it got overwritten(IIRC think it was by another hack) it and I have been too lazy to put it back. :)

BTW, the query that runs the average rating is:

Code:

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

....and I ran it manually in PHPMyAdmin, and the average rating is 4.5. Weird eh? I'm looking for a fix for this so I can pry my foot out of my mouth. ;)

Boofo 05-11-2003 04:15 PM

I'm working on that one now. I just posted the fix for the last poster above. Try it and let me know if it fixes it for you. ;)

cirisme 05-11-2003 05:08 PM

Okay thanks.

FYI: There is nothing wrong with the average rating. Something must be wrong with in the vote section for each thread in forumdisplay, because there are several threads in the Dean's List that ARE rated 4~5.

It's pretty weird. :nervous:

Reverend 05-11-2003 05:47 PM

Installed seems to working OK.

One question though.
Would it not be better for the Average Rating to use the formula;
(total stars divided by total threads in the forum),rather than only including threads that have been rated.

Just a thought. ;)

Boofo 05-11-2003 06:17 PM

I think that would be better. How do we go about doing that?

Boofo 05-11-2003 06:27 PM

Ok, I was told that the query I posted earlier for the last poster fix, might give false information at a point in the future. Here is the updated one. This one works, I've tested it.

PHP Code:

$dposteurs=$DB_site->query_first("SELECT post.dateline, thread.threadid, user.username
FROM post, thread
LEFT JOIN user ON user.userid = post.userid
WHERE thread.forumid = 
$forumid AND thread.threadid = post.threadid
ORDER BY post.dateline DESC
LIMIT 1"
); 

Just use $dposteurs[username] for the username. I'm not sure what tio use to pull the userid out of this query, though. Can someone lend a hand?

cirisme 05-11-2003 06:43 PM

Code:

$dposteurs=$DB_site->query_first("SELECT post.dateline AS lastpostminute, thread.threadid, user.username, user.userid
FROM post, thread
LEFT JOIN user ON user.userid = post.userid
WHERE thread.forumid = $forumid AND thread.threadid = post.threadid
ORDER BY post.dateline DESC
LIMIT 1");

SHOULD do it(hopefully). And then use $dposteurs[userid]. But let me go test it. :D

Edit:

Okay, looks good. Thanks! :banana:

cirisme 05-11-2003 07:17 PM

Umm, it is user.userid not post.userid.

:nervous:

Boofo 05-11-2003 07:39 PM

You're right. I just got verification on the userid. The code is good at this:

PHP Code:

$dposteurs=$DB_site->query_first("SELECT post.dateline, thread.threadid, user.username, user.userid
FROM post, thread
LEFT JOIN user ON user.userid = post.userid
WHERE thread.forumid = 
$forumid AND thread.threadid = post.threadid
ORDER BY post.dateline DESC 
LIMIT 1
"
); 

Now, all we have to do is get the Average rating to work right on my site. ;)

cirisme 05-12-2003 12:55 PM

What forums is it not working on?

Boofo 05-12-2003 01:01 PM

One of my Total Commander Forums.

grog6 05-12-2003 01:54 PM

Sorry, I haven't a lot of time for the moment, sorry for not having helped you ...

Really big thanks to Boofo for the support
I'll add these modifications to the archive as soon as I could

Thx to Boofo and other members to fix this hack :)

Boofo 05-15-2003 12:26 AM

grog6, any more fixes or updates for this hack?

Boofo 05-16-2003 08:06 AM

Well, since no one else seems to be supporting this hack now, I have an update that will knock 2 queries off of the stats.

Find these 3 queries and delete them:

PHP Code:

$nbeposts=$DB_site->query_first("SELECT SUM(replycount) AS reply FROM `thread` WHERE forumid=$forumid");
$nbepost=number_format($nbeposts['reply']);

$nbemesss=$DB_site->query_first("SELECT COUNT(*) AS nbe FROM thread WHERE forumid=$forumid");
$nbemess=$nbemesss['nbe'];
$numthreads number_format($nbemess);

$vues=$DB_site->query_first("SELECT SUM(views) AS vu FROM thread WHERE forumid='$forumid'");
$vue=number_format($vues['vu']); 

Use this single query instead:

PHP Code:

$nbeposts=$DB_site->query_first("SELECT COUNT(*) AS nbe, SUM(replycount) AS reply, SUM(views) AS vu FROM `thread` WHERE forumid=$forumid");
$nbepost=number_format($nbeposts['reply']);
$numthreads number_format($nbeposts['nbe']);
$vue=number_format($nbeposts['vu']); 

You will also need to find:

PHP Code:

$avgposteur=(($avgposteuri/$nbemess)*100); 

and change it to:

PHP Code:

$avgposteur=(($avgposteuri/$nbeposts['nbe'])*100); 

for the average poster stat to work with the new query.

Crazy Pete 05-16-2003 11:58 AM

Thanks for the update, Boofo! Any way to save a few queries, I'm all over it. :)

Boofo 05-16-2003 03:52 PM

You're very welcome. ;)

grog6 05-16-2003 08:26 PM

Sorry :(

I really have too work for the moment, and can't provide any support for this hack.

As soon as possible, I'll look, udpate the hack with your work Boofo, and try to help for support here.
Sorry but I can't now :(

Boofo 05-19-2003 08:07 PM

Since Grog6 has not had time to support this hack, an updated (with his permission) and expanded version of this has been released in this thread:

https://vborg.vbsupport.ru/showthrea...threadid=53138

CRego3D 05-20-2003 01:20 AM

excellent .. :)


All times are GMT. The time now is 06:34 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.02764 seconds
  • Memory Usage 1,824KB
  • 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
  • (7)bbcode_php_printable
  • (3)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
  • (37)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