vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Forum Home Enhancements - vbTrends 1.1.2 - An Enhanced Statistics Box on Forum Home (https://vborg.vbsupport.ru/showthread.php?t=113390)

hambil 04-18-2006 10:00 PM

vbTrends 1.1.2 - An Enhanced Statistics Box on Forum Home
 
Keywords: Statistics, New members, joins, trends, Forum Home, threads, posts

Description:
Enhances the "YourBBS" Statistics box on the forum home to show trends of posts, threads and new users vs. the overall history of the board. Also allows you to display more than one "newest member".

Version 1.1.2:
  1. Added admincp menu to reset cached counters.
  2. Fixed a couple of divide by zero errors that occurred when your board had no history (was less than a month old).
  3. Fixed so templates are now cached.
Version 1.1.1:
  1. Fixed calculation of statistics - should definately be correct now :)
Version 1.1.0:
  1. Fully phrased.
  2. Uses templates now so look and feel can be customized
  3. Fixed bug so output is valid xhtml 1.0.
Version 1.0.0:
  1. Turn on/off in admincp
  2. Offers the option to auto replace in templates, or to manually edit templates.
  3. Allows more than one 'newest user' to be display.
  4. Shows trends for posts, threads and new users - this month vs. the boards average.
Install
  1. Download the vbTrends_1.0.0.zip.
  2. Unzip and follow instructions in install.html.

steven s 04-18-2006 10:32 PM

Am I missing a table?
HTML Code:

Database error in vBulletin 3.5.4:

Invalid SQL:

                        SELECT AVG(MonthlyPostCount) AS 'PostCountAvg'
                        FROM
                        (
                                SELECT count(*) AS 'MonthlyPostCount'
                                FROM post
                                WHERE dateline < UNIX_TIMESTAMP(NOW()) - DAYOFMONTH(NOW()) * 86400
                                GROUP BY YEAR(FROM_UNIXTIME(dateline)), MONTH(FROM_UNIXTIME(dateline))
                        )
                        AS posts;

MySQL Error  : You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT count(*) AS 'MonthlyPostCount'
                                FROM post
                                WHE
Error Number : 1064


hambil 04-18-2006 10:36 PM

Quote:

Originally Posted by 1996 328ti
Am I missing a table?
HTML Code:

Database error in vBulletin 3.5.4:

Invalid SQL:

            SELECT AVG(MonthlyPostCount) AS 'PostCountAvg'
            FROM
            (
                SELECT count(*) AS 'MonthlyPostCount'
                FROM post
                WHERE dateline < UNIX_TIMESTAMP(NOW()) - DAYOFMONTH(NOW()) * 86400
                GROUP BY YEAR(FROM_UNIXTIME(dateline)), MONTH(FROM_UNIXTIME(dateline))
            )
            AS posts;

MySQL Error  : You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT count(*) AS 'MonthlyPostCount'
                FROM post
                WHE
Error Number : 1064


Ummm.. what version of SQL server?

MThornback 04-18-2006 10:40 PM

Same error here:

Quote:

Invalid SQL:

SELECT AVG(MonthlyPostCount) AS 'PostCountAvg'
FROM
(
SELECT count(*) AS 'MonthlyPostCount'
FROM vb3_post
WHERE dateline < UNIX_TIMESTAMP(NOW()) - DAYOFMONTH(NOW()) * 86400
GROUP BY YEAR(FROM_UNIXTIME(dateline)), MONTH(FROM_UNIXTIME(dateline))
)
AS posts;

MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT count(*) AS 'MonthlyPostCount'
FROM vb3_post

Error Number : 1064
SQL VEr #: 4.0.16

steven s 04-18-2006 10:43 PM

Guess I'll wait for 1.0.1. :)
I do like the concept.

MThornback 04-18-2006 10:55 PM

I fixed it up so that there is an error on line 60...thats as far as I can get it fixed so far....i'll keep picking...and see if I can help :)

steven s 04-18-2006 11:29 PM

Quote:

Originally Posted by hambil
Ummm.. what version of SQL server?

PHP 4.4.2
MySQL Version 4.0.25-standard

hambil 04-18-2006 11:32 PM

Subqueries aren't supported until version 4.1.
I'll see what I can do, but dudes you're MySQL is really showing it's age.

MThornback 04-18-2006 11:36 PM

Well...hopefully we're turfing this host soon...cause believe me...its age is showing in more ways than 1 :p

I got the first install too :) go team :p


Edit:
Fatal error: Call to a member function on a non-object in /forum/index.php(485) : eval()'d code on line 60

thats where I am....

Omranic 04-18-2006 11:46 PM

its a nice hack

but has a very bad issue
it consmes over 30 query :(

try to improve this hack by reduce database queries

hambil 04-18-2006 11:58 PM

Okay, I changed it to support older versions of MySQL now.

hambil 04-18-2006 11:58 PM

Quote:

Originally Posted by SolidSnake@GTI
its a nice hack

but has a very bad issue
it consmes over 30 query :(

try to improve this hack by reduce database queries

30 queries? What are you drinking?

DJ XtAzY 04-19-2006 12:05 AM

im gonna test it out and see if i have the same query results

hambil 04-19-2006 12:06 AM

Keep in mind it runs a number of querys ONCE a day, the first time someone hits it, and stores the results in the datastore. I really don't think those count ;)

wizardan 04-19-2006 12:07 AM

Installed flawlessly.
MySQL 4.1.15.

Very cool hack, Hambil.
Thank you.

DJ XtAzY 04-19-2006 12:16 AM

heres my statistic

if i didnt enable vbtrend, the total amount of queries is 22
if i enabled vbtrend, the total amount of queries is 27
so i guess it boost just 5 queries... but i still love this hack =]

but how to those percentage works?

Threads: 9,788, This Month: 699 (175%)
Posts: 216,372, This Month: 14125 (1177%)
Members: 18,914, This Month: 1209 (134%)

arnt those percentage a bit huge?

hambil 04-19-2006 12:19 AM

Quote:

Originally Posted by XtAzY
heres my statistic

if i didnt enable vbtrend, the total amount of queries is 22
if i enabled vbtrend, the total amount of queries is 27
so i guess it boost just 5 queries... but i still love this hack =]

but how to those percentage works?

Threads: 9,788, This Month: 699 (175%)
Posts: 216,372, This Month: 14125 (1177%)
Members: 18,914, This Month: 1209 (134%)

arnt those percentage a bit huge?

Sould be 4 queries, but the implementation of the datastore is flawed, and mostly useless for hooks. I've started a thread on vb.com about it.

hambil 04-19-2006 12:20 AM

Quote:

Originally Posted by XtAzY
Threads: 9,788, This Month: 699 (175%)
Posts: 216,372, This Month: 14125 (1177%)
Members: 18,914, This Month: 1209 (134%)

arnt those percentage a bit huge?

Maybe, let me check my math.

MThornback 04-19-2006 12:47 AM

Quote:

Originally Posted by hambil
Okay, I changed it to support older versions of MySQL now.

Your a gentleman and a scholar :) thank you from me and my users!

hambil 04-19-2006 12:49 AM

Okay, I think I got it this time. Changing the queries through me off for a bit, but the numbers look right again. Updated.

steven s 04-19-2006 12:52 AM

Quote:

Originally Posted by hambil
Okay, I changed it to support older versions of MySQL now.

Cool. :banana:

Edit: What if I wanted
Threads: 7,500, This Month: 286 Up (286%), Posts: 64,365, This Month: 2724 Up (2724%), Members: 2,787, This Month: 74 Up (0%)
to be one one line?

DementedMindz 04-19-2006 01:34 AM

any plans to make this html complaint?

hambil 04-19-2006 01:42 AM

Quote:

Originally Posted by DementedMindz
any plans to make this html complaint?

I don't understand the question...

hambil 04-19-2006 01:43 AM

Quote:

Originally Posted by 1996 328ti
Cool. :banana:

Edit: What if I wanted
Threads: 7,500, This Month: 286 Up (286%), Posts: 64,365, This Month: 2724 Up (2724%), Members: 2,787, This Month: 74 Up (0%)
to be one one line?

Hmmm... I'll build a template for version 1.1.0, might get it out later tonight or early tomorrow.

DementedMindz 04-19-2006 01:43 AM

any plans to make it 100% html complaint (XHTML 1.0 Transitional) it gives Failed validation, 26 errors check on http://validator.w3.org/ it will show the errors i was 100% complaint before it..

DementedMindz 04-19-2006 01:46 AM

also just wondering if it should say Welcome our newest 5 members instead of Welcome to our newest 5 members

hambil 04-19-2006 01:52 AM

Quote:

Originally Posted by DementedMindz
also just wondering if it should say Welcome our newest 5 members instead of Welcome to our newest 5 members

It's fully phrased, you can change that.

DementedMindz 04-19-2006 02:00 AM

what about the 100% html complaint (XHTML 1.0 Transitional) issues? will they be fixed in the next one or no?

hambil 04-19-2006 02:00 AM

Quote:

Originally Posted by DementedMindz
what about the 100% html complaint (XHTML 1.0 Transitional) issues? will they be fixed in the next one or no?

Yes. Thank for the validation link.

DementedMindz 04-19-2006 02:03 AM

no problem... this would be great if they were fixed.... good job on the work

yinyang 04-19-2006 03:06 AM

Quote:

Originally Posted by DementedMindz
also just wondering if it should say Welcome our newest 5 members instead of Welcome to our newest 5 members

both are correct.

1) Welcome our newest 5 members. - this is a suggestion... meaning you should go and welcome them... i.e, send them a PM or post and say hi... Welcome them!

2) Welcome to our newest 5 members. - this just basically means, "Hi 5 new members courtesy of the forum."

hambil 04-19-2006 05:56 AM

Fixed the calculation of the statistics - I truly believe it is correct now. Let me know if you find anything suspicious.

MThornback 04-19-2006 06:03 AM

Looks more accurate to me....but now that its not lying to me its depressing :p

hambil 04-19-2006 06:04 AM

Quote:

Originally Posted by MThornback
Looks more accurate to me....but now that its not lying to me its depressing :p

Think of it as more... motivating ;)

dirtycrow 04-19-2006 06:24 AM

Quote:

Originally Posted by hambil
Fixed the calculation of the statistics - I truly believe it is correct now. Let me know if you find anything suspicious.

hmmm. . .i just upgraded from 1.1.0 to 1.1.1 and now the stats read as

Quote:

Threads: 24,713, This Month: 821 (3058%)
Posts: 425,195, This Month: 10808 (8832%)
Members: 1,004, This Month: 25 (2400%)
looks a little suspicious to me. adivce? thank you very much :)

hambil 04-19-2006 06:45 AM

Quote:

Originally Posted by dirtycrow
hmmm. . .i just upgraded from 1.1.0 to 1.1.1 and now the stats read as



looks a little suspicious to me. adivce? thank you very much :)

Clear the datastore vbtrends variable. Erm... maybe I should provide a button for that.

DJ XtAzY 04-19-2006 08:44 AM

Quote:

Originally Posted by hambil
Clear the datastore vbtrends variable. Erm... maybe I should provide a button for that.

how do u do that?

ryancooper 04-19-2006 09:50 AM

Quote:

Originally Posted by hambil
30 queries? What are you drinking?


How do you get to see the querys?

steven s 04-19-2006 10:45 AM

Quote:

Originally Posted by hambil
Clear the datastore vbtrends variable. Erm... maybe I should provide a button for that.

Using v1.1.1
Active Members: 322
Threads: 7,508, This Month: 295 (29400%)
Posts: 64,424, This Month: 2784 (278300%)
Members: 2,787, This Month: 74 (-84%)

Guess I'll wait to find how to clear the variable too.
Or do I just need to wait 24 hours?

PabloAM 04-19-2006 11:09 AM

INstalled perfect ;)


All times are GMT. The time now is 03:08 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.01409 seconds
  • Memory Usage 1,832KB
  • 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_html_printable
  • (20)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