vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Show Thread Enhancements - Usernote in Postbit v.1.2 (https://vborg.vbsupport.ru/showthread.php?t=73599)

Polo 01-26-2005 08:24 PM

I like this one but like I said... it uses too many queires... :ermm:

wynode 01-26-2005 10:52 PM

Quote:

Originally Posted by Polo
I like this one but like I said... it uses too many queires... :ermm:

More than the other one? (Because I preffer this one which shows the number of usernotes!)

Polo 01-27-2005 12:06 PM

Yeah I think so... I like this one too better but seems like I will wait to install it until somone make it less query intensive

Ig@r 03-18-2005 03:48 PM

Quote:

Originally Posted by Polo
Yeah I think so... I like this one too better but seems like I will wait to install it until somone make it less query intensive

Eah.... one extra querry for each post. :(

Polo 03-18-2005 03:56 PM

I was using this one for a while but had to take it down.. i wondering if there is even a way to make it less query intenssive... maybe there is not way at all...

wynode 03-19-2005 12:29 AM

Quote:

Originally Posted by Polo
I was using this one for a while but had to take it down.. i wondering if there is even a way to make it less query intenssive... maybe there is not way at all...


How come you took it down?

Polo 03-19-2005 12:39 AM

because the hack is query intensive...

tnguy3n 03-23-2005 01:40 PM

okie, I've just did a minor fix to it. I use query_first() instead of query(), and besides, it only shows if the users have a note.
*update hack*

To update, look for:
PHP Code:

        // show usernote in postbit
        
$usernote $DB_site->query("
        SELECT COUNT(*) AS usernoteid FROM " 
TABLE_PREFIX "usernote
        WHERE userid = 
$post[userid]");
        
$totalnotes mysql_result($usernote0'usernoteid'); 

REPLACE WITH:
PHP Code:

        // show usernote in postbit
        
$usernote $DB_site->query_first("
        SELECT COUNT(*) AS usernote FROM " 
TABLE_PREFIX "usernote
        WHERE userid = 
$post[userid]");
        
$totalnotes $usernote['usernote']; 


Polo 03-23-2005 03:08 PM

it still uses one query per post?

tnguy3n 03-30-2005 03:27 PM

it's per thread.


All times are GMT. The time now is 02:38 PM.

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.01446 seconds
  • Memory Usage 1,738KB
  • 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_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
  • (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