vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Forum Home Enhancements - Haggis Top Posters (https://vborg.vbsupport.ru/showthread.php?t=125336)

Eric 08-31-2006 01:40 AM

Nice, although you should be using vBulletin's database class ;)

Zachery 08-31-2006 09:46 PM

Quote:

Originally Posted by CrossBones
But it works really well. *shrug*

It works really well untill you have several hundered thousands users online and you need to scan the user table every time someone access the forumhome.

harmor19 08-31-2006 10:42 PM

This should be flagged for poor programming.

harmor19 08-31-2006 10:56 PM

I'm trying to help ktp with his code but after writing additional code to it I thought "what the hell am I going to do with this?".
I thought I could limit it so it would only check once a week but don't know how to go about caching the data until the query ran again.

PHP Code:

if(date("d") % == 1)
{
  
$gettopusers $db->query_read("SELECT userid,username,posts FROM " TABLE_PREFIX ."user ORDER BY posts DESC LIMIT 10");
   while(
$topuser $db->fetch_array($gettopusers))
  {
    
$disptopuser .= "<a href='member.php?u=$topuser[userid]'>".$topuser['username']."</a> ($topuser[posts]), ";
  }



Zachery 09-01-2006 02:28 AM

Use a vB cron and have it run once an hour, day, whatever, and have it update another row possibly in the datastore so it can be pulled on demand.

CrossBones 09-01-2006 02:02 PM

Quote:

Originally Posted by Zachery
It works really well untill you have several hundered thousands users online and you need to scan the user table every time someone access the forumhome.

I wish I had that problem. :cross-eyed:

CrossBones 09-01-2006 02:07 PM

Quote:

Originally Posted by Zachery
It works really well untill you have several hundered thousands users online and you need to scan the user table every time someone access the forumhome.

So is this one coded equally as bad? : https://vborg.vbsupport.ru/showthread.php?t=105546

harmor19 09-01-2006 05:51 PM

Quote:

Originally Posted by CrossBones
So is this one coded equally as bad? : https://vborg.vbsupport.ru/showthread.php?t=105546

They're the exact same thing. So to answer oyur question, yes, it is equally bad if not worse.

CrossBones 09-01-2006 10:16 PM

Quote:

Originally Posted by harmor19
They're the exact same thing. So to answer oyur question, yes, it is equally bad if not worse.

D'oh. http://wildpitchforums.com/images/smilies/banghead.gif

harmor19 09-02-2006 04:39 PM

I informed Princeton and told him that the hack on this thread and the hack on another thread are coded exactly the same way. The only difference between these two is that this one fetches 5 rows and the other gets 10.

As people already stated, This hack is horribly coded which means the other one is equally if not worse. I say it's worse because it has to get 10 rows as opposed to 5.
You may also experience conflict if you installed the two hacks or had another other plugin in "forum_start" hook where you use $test as your output variable.
What I mean by that is that you use $test on the "forumhome" template.

I tried to privately deal with this to lessen the chances of hurting someone's creditably but I guess I'm not important enough for someone to read my private message.


All times are GMT. The time now is 06:52 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.01138 seconds
  • Memory Usage 1,739KB
  • 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_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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