vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vB3 Forum Quick Stats Cache Serialize Hack v1.1 (https://vborg.vbsupport.ru/showthread.php?t=61581)

FleaBag 02-26-2004 03:24 AM

Uh oh...

Quote:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /www/dragonninja/forumdisplay.php on line 300

Parse error: parse error in /www/dragonninja/forumdisplay.php on line 300
Any ideas Boofo?

Boofo 02-26-2004 03:33 AM

What is on line 300?

FleaBag 02-26-2004 03:39 AM

LOL I'm a fool, I pasted...

Quote:

/////////////////////////////////////////////////////////////////
\ TEMPLATES MODIFICATIONS \
/////////////////////////////////////////////////////////////////
...into forumdisplay.php. Sorry to trouble you Bob.

Boofo 02-26-2004 03:53 AM

No trouble at all. Glad it was something simple. ;)

Mr. HillBilly 02-27-2004 07:50 PM

Nice hack but,


Wrong SQL Code ;)


Correct code:

Code:


INSERT INTO datastore ( title, data ) VALUES (
'forumstatscache' ,'a:15:{
s:10:"numthreads";s:1:"0";
s:10:"numreplies";s:1:"0";
s:8:"numviews";s:1:"0";
s:15:"topthreadscount";s:1:"0";
s:12:"topthreadsid";s:1:"0";
s:12:"topthreadsun";s:0:"";
s:17:"topthreadspercent";s:1:"0";
s:14:"toppostercount";s:1:"0";
s:11:"topposterid";s:1:"0";
s:11:"topposterun";s:0:"";
s:16:"topposterpercent";s:1:"0";
s:12:"attachscount";s:1:"0";
s:12:"attachsbytes";s:1:"0";
s:9:"avgrating";s:1:"0";
s:10:"lastupdate";s:1:"0";
}' )


Boofo 02-27-2004 11:11 PM

First of all, you don't really need to even run this query, if you don't want to. When the stats get inserted into the datastore, it will be made up then. And second of all, if someone uses a table prefix, they would need that part of it if they did use this query. So, actually, the query is right. Yours would be wrong, if they had a table prefix. I had the query as you have it before I changed it to add the table prefix, by the way. Other than that, there is no difference in the 2 queries. ;)

SpeedStreet 03-11-2004 12:57 AM

Can you set this up so that it is only displayed in certain forums?

I don't want this in my off-topic, but my user support forum...this would be great.

Boofo 03-11-2004 02:12 AM

Sure. You could use a condition in the forumdisplay for that real easy.

SpeedStreet 03-11-2004 02:16 AM

Quote:

Originally Posted by Boofo
Sure. You could use a condition in the forumdisplay for that real easy.

How so?

Boofo 03-11-2004 02:25 AM

HTML Code:

<if condition="$forumid == '30'">
$forumdisplayquickstats
</if>

Just make the 30 above the ID of the forum you want to show it in. I just tested it and it works fine. ;)


All times are GMT. The time now is 07: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.01165 seconds
  • Memory Usage 1,736KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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