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)
-   -   Post Thank You Hack 1.10 (https://vborg.vbsupport.ru/showthread.php?t=73410)

Abe1 05-09-2005 02:03 PM

The biggest thing about this update is that when you now view a page that has posts, this hack no longer makes one or two queries per post it shows for this hack. Now, there is only ONE query for time you access a ‘showthread’ page. To explain better, if you go to a page that has 30 posts showing, you would be executing about 45 queries. Now you just execute about 15 queries!

Because of this, I have added one more column to the post_thanks table. The last step of the update process will update the table so it can be compatible with this update. It may take a few minutes for that process.

Also, I added a file edit that will cash the templates used so 1 query gets saved.

If anyone had problems with the settings, it should all be fixed now. Either run an uninstall and then install or just run the update.

I also added options to give reputation to users who got thanked or give a post count to users who give thanks.

I’ll try to gate some better pictures in a day or two.

Also, I’m going to try to release an add-on to CMPS portal that gives stats.

nexialys 05-09-2005 02:08 PM

hum.. would be better to have a list of forumid where the hack is activated, instead of the opposite... a site with 100 forums and only one or two to activate the tool will have pain to make the list...

Abe1 05-09-2005 02:14 PM

Quote:

Originally Posted by nexialys
hum.. would be better to have a list of forumid where the hack is activated, instead of the opposite... a site with 100 forums and only one or two to activate the tool will have pain to make the list...

I'll see what i can do for next version.

-=Sniper=- 05-09-2005 02:43 PM

I get this

PHP Code:

WarningInvalid argument supplied for foreach() in /includes/functions_showthread.php on line 209 


Paul M 05-09-2005 02:56 PM

Why is this a whole new thread - it's only an upgrade from 1.03 to 1.10 ?

Abe1 05-09-2005 03:01 PM

Quote:

Originally Posted by -=Sniper=-
I get this

PHP Code:

WarningInvalid argument supplied for foreach() in /includes/functions_showthread.php on line 209 


What happend if you find:
PHP Code:

foreach ($post_thanks_cash AS $thanks

and replace with
PHP Code:

@foreach ($post_thanks_cash AS $thanks


Abe1 05-09-2005 03:05 PM

Quote:

Originally Posted by Abe1
What happend if you find:
PHP Code:

foreach ($post_thanks_cash AS $thanks

and replace with
PHP Code:

@foreach ($post_thanks_cash AS $thanks


forget trying this. I'm going to give you some thing else to do.

-=Sniper=- 05-09-2005 03:06 PM

I get this

PHP Code:

parse errorunexpected T_FOREACH in /includes/functions_showthread.php on line 209 


Abe1 05-09-2005 03:08 PM

Find:
PHP Code:

    foreach ($post_thanks_cash AS $thanks)
    {
        if (
$thanks[userid] == $bbuserinfo[userid] AND $thanks[postid] == $post[postid])
        {
            
$post_thanks_already ++;
        }
    } 

and replace with this:
PHP Code:

    if ($post_thanks_cash)
    {
        foreach (
$post_thanks_cash AS $thanks)
        {
            if (
$thanks[userid] == $bbuserinfo[userid] AND $thanks[postid] == $post[postid])
            {
                
$post_thanks_already ++;
            }
        }
    } 

Let me know if you get the error in a later place and if you only get the error on pages that dont have any thanks.

-=Sniper=- 05-09-2005 03:16 PM

ok its working :) thanks

also during the upgrade process all my settings were reset :( had to redo them, could you avoide the problem in the future updates?

demo: http://www.hardwareforums.com/showthread.php?t=5319

thanks for the excellent hack.


All times are GMT. The time now is 03:41 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.01574 seconds
  • Memory Usage 1,757KB
  • 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
  • (9)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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