vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   [AJAX] Post Thank You Hack (https://vborg.vbsupport.ru/showthread.php?t=92410)

D.Ilyin 02-11-2006 03:16 PM

and i have the same error when click THANKS:
Quote:

Database error in vBulletin 3.5.3:

Invalid SQL:

UPDATE user
SET post_thanks_thanked_times = 1 + post_thanks_thanked_times, post_thanks_thanked_posts = 1 + post_thanks_thanked_posts, reputation = $vboptions[post_thanks_reputation] + reputation
WHERE userid = 38210;

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 '[post_thanks_reputation] + reputation
WHERE userid = 38210' at line 2

Abe1 02-11-2006 10:06 PM

Version 3.1 (2/11/06):
  • [FIXED] Fixed bug with reputation.

AnhTuanCool 02-12-2006 02:16 AM

Hey Abe1,

Although the showthread page uses only ONE query, the load seems yet to loose.

I've attached the query exp of one normal thread on my forum. One post got thanked 13 times and it took almost 10 sec to query!
https://vborg.vbsupport.ru/

Abe1 02-12-2006 02:30 AM

Quote:

Originally Posted by AnhTuanCool
Hey Abe1,

Although the showthread page uses only ONE query, the load seems yet to loose.

I've attached the query exp of one normal thread on my forum. One post got thanked 13 times and it took almost 10 sec to query!
http://img147.imageshack.us/img147/889/qhev6tk.th.jpg

This is what I got on my forum:

Time Before: 0.13631 seconds
Time After: 0.13647 seconds
Time Taken: 0.00016 seconds

AnhTuanCool 02-12-2006 02:53 AM

Ahhhhh, I think I've made a terrible mistake here.

I figured out what the problem is that the mixing query I suggested awhile ago actually makes the hack's query time worse. When using multiple WHERE's in query, it queries ALL the entries out of the table and the filter it through the second WHERE. If there are a lot of thanks entries like mine, it tremendously stresses the server. Look at the image I attached above, at column Row and you'll understand why.

So I strongly recommend switch back to the old time query.
Code:

$post_thanks_querys = $db->query("SELECT postid FROM ". TABLE_PREFIX ."post WHERE threadid = '$post[threadid]'");
    $post_thanks_postids = 0;
   
    while ($post_thanks_query = $db->fetch_array($post_thanks_querys))
    {
      $post_thanks_postids .= ",$post_thanks_query[postid]";
    }

    $post_thanks_cashe = $db->query("SELECT * FROM " .TABLE_PREFIX. "post_thanks WHERE postid IN ($post_thanks_postids) ORDER BY username ASC");

Lastly, I terribly sorry for suggesting such a flawful mod...

dai-kun 02-12-2006 06:06 AM

For some reason, as soon as I enable this product, my server load spike up to 10-20... why is that?
I have a lot of members online (around 200 at the same time) and a lot of thanked posts.
I'm using the latest version.

As soon as I disable this, server load goes back to normal (1-3).

NeutralizeR 02-12-2006 12:43 PM

Can't remove thanks.

Quote:

Database error in vBulletin 3.5.3:

Invalid SQL:
DELETE FROM msx_reputation WHERE postid = 62668 AND AND whoadded = 1 reason = 'Teşekk?r Mesajı';

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 'AND whoadded = 1 reason = 'Teşekk?r Mesajı'' at line 1
Error Number : 1064
Quote:

Database error in vBulletin 3.5.3:

Invalid SQL:

UPDATE msx_user
SET post_thanks_user_amount = post_thanks_user_amount - 1
WHERE userid IN ();

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 ')' at line 3 Error Number : 1064

dai-kun 02-12-2006 04:59 PM

Quote:

Originally Posted by AnhTuanCool
Ahhhhh, I think I've made a terrible mistake here.

I figured out what the problem is that the mixing query I suggested awhile ago actually makes the hack's query time worse. When using multiple WHERE's in query, it queries ALL the entries out of the table and the filter it through the second WHERE. If there are a lot of thanks entries like mine, it tremendously stresses the server. Look at the image I attached above, at column Row and you'll understand why.

So I strongly recommend switch back to the old time query.
Code:

$post_thanks_querys = $db->query("SELECT postid FROM ". TABLE_PREFIX ."post WHERE threadid = '$post[threadid]'");
    $post_thanks_postids = 0;
   
    while ($post_thanks_query = $db->fetch_array($post_thanks_querys))
    {
      $post_thanks_postids .= ",$post_thanks_query[postid]";
    }

    $post_thanks_cashe = $db->query("SELECT * FROM " .TABLE_PREFIX. "post_thanks WHERE postid IN ($post_thanks_postids) ORDER BY username ASC");

Lastly, I terribly sorry for suggesting such a flawful mod...


Thanks, I've revert it back toversion 2.5 and the server load seems to be less than 3-4 now :D
Before it was 20-30

edit:

nvm.. it's fluctuating now.. going around 6-15

AnhTuanCool 02-12-2006 07:14 PM

@dai-kun - Did you delete this line in the hook?
Code:

    $post_thanks_cashe = $db->query("SELECT " . TABLE_PREFIX . "post_thanks.* FROM " . TABLE_PREFIX . "post_thanks, " . TABLE_PREFIX . "post WHERE " . TABLE_PREFIX . "post.postid = " . TABLE_PREFIX . "post_thanks.postid AND " . TABLE_PREFIX . "post.threadid = '$post[threadid]' ORDER BY " . TABLE_PREFIX . "post_thanks.username ASC");
If you didn't, please do so. It's the main problem source.

dai-kun 02-12-2006 11:54 PM

Ok so how would I do this? Do I edit out that code in the 3.0 version? I tried that and it giving me errors.

Cam on.

PHP Code:

global $post_thanks_cash$post_thanks_done$db;

if (empty(
$post_thanks_done))
{

    
$act 1;

    while (
$thanks $db->fetch_array($post_thanks_cashe))
    {
        
$post_thanks_cash[$act][userid] = "$thanks[userid]";
        
$post_thanks_cash[$act][username] = "$thanks[username]";
        
$post_thanks_cash[$act][date] = "$thanks[date]";
        
$post_thanks_cash[$act][postid] = "$thanks[postid]";
        
$act ++;
    } 


AnhTuanCool 02-13-2006 02:03 AM

Add the patch in my #485 post BEFORE:

Code:

$act = 1;
and that should be it!

dai-kun 02-13-2006 03:11 AM

i did that

Code:

global $post_thanks_cash, $post_thanks_done, $db;

if (empty($post_thanks_done))
{
$post_thanks_querys = $db->query("SELECT postid FROM ". TABLE_PREFIX ."post WHERE threadid = '$post[threadid]'");
    $post_thanks_postids = 0;
   
    while ($post_thanks_query = $db->fetch_array($post_thanks_querys))
    {
      $post_thanks_postids .= ",$post_thanks_query[postid]";
    }

    $post_thanks_cashe = $db->query("SELECT * FROM " .TABLE_PREFIX. "post_thanks WHERE postid IN ($post_thanks_postids) ORDER BY username ASC");

    $act = 1;

and when i go to thank, i get this error

Code:

Database error in vBulletin 3.5.1:

Invalid SQL:

                    UPDATE vb3_user
                    SET post_thanks_thanked_times = 1 + post_thanks_thanked_times, post_thanks_thanked_posts = 1 + post_thanks_thanked_posts, reputation = $vboptions[post_thanks_reputation] + reputation
                    WHERE userid = 741;

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 '[post_thanks_reputation] + reputation
                    WHERE userid = 741' at line 2


C_P 02-13-2006 04:12 AM

Quote:

Originally Posted by NeutralizeR
Can't remove thanks.

Ditto! I get same error:
Code:

Database error in vBulletin 3.5.2:
Invalid SQL:
DELETE FROM reputation WHERE postid = 12795 AND AND whoadded = 1 reason = 'Thanked Post';
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 'AND whoadded = 1 reason = 'Thanked Post'' at line 1
Error Number : 1064
Date : Monday, February 13th 2006 @ 06:08:34 AM
Script : http://www.cpfools.com/forum/showthr...e_user&p=12795
Referrer : http://www.cpfools.com/forum/showthr...2795#post12795
IP Address : xxxxxx
Username : CP
Classname : xxxxxxxxxx

Also at top of my page it shows this:
Code:

Warning: Invalid argument supplied for foreach() in /includes/class_postbit.php(251) : eval()'d code on line 131

Warning: Invalid argument supplied for foreach() in /includes/class_postbit.php(251) : eval()'d code on line 141
/*+--------------------------------------------------------------------------|  Cascading Style Sheet for MKportal "Forum" Portal Template|  ========================================|  by Meo aka Luponero [Amedeo de longis]|      visiblesoul [Don K. Colburn]|  (c) 2004-2005 mkportal.it|  http://www.mkportal.it|  Email: luponero@mclink.it+--------------------------------------------------------------------------|  > MKPortal|  > Written By Amedeo de longis|  > Date started: 9.2.2004+--------------------------------------------------------------------------*//*=============================MK  global stylesP=============================*//* IMPORT body */body,body{        background: #FFFFFF;        color: #000000;        font: 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;                padding: 0px;}body {        font-size: 10px;        margin:0px;        padding:0px; /* Opera 0 margin */                text-align: center; /* center in IE */ }/* IMPORT body background (used for SMF) */.importbgbody {        font-size: 10px;}/* portal wrapper */#mkwrapper {        text-align:left; /* left-align text in IE */                margin: 0px auto 0px auto;}/* IMPORT logostrip */#mklogostrip,.page{        background: #FFFFFF;        color: #000000;}/* logostrip */#mklogostrip {        text-align: left;}/* IMPORT global font formatting */table,tr,td,.tdglobal,td, th, p, li{        font: 10pt 'trebuchet ms', verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;}/* global font formatting */table,tr,td,.tdglobal {        font-size: 10px;        }/* IMPORT main portal table bg (if different than body bg) */.tabmain,.page{        background: #FFFFFF;        color: #000000;}/* main portal table */.tabmain {        margin:0px;        padding:0px;        }/* image link border */img {                        border: 0px;}/*=============================MK IMPORT LIGHT BACKGROUNDP=============================*/.modulecell,.urlo2,.tabnews,.trattini,.trattini3,.tablemenu,.taburlo,.alt1, .alt1Active{        background: #DFE6EE;        color: #000000;}/*=============================MK IMPORT MEDIUM BACKGROUNDP=============================*/.navigatore,.tdblock,.moduleborder,.modulex,.mkpagecurrent,.alt2, .alt2Active{        background: #DFE6EE;        color: #000000;}/*=============================MK IMPORT DARK BACKGROUNDP=============================*/.urlo,.sottotitolo,.tcat{        background: #397DD0 url(../forum/images_pb/gradients/gradient_tcat.gif) repeat-x top left;        color: #FFFFFF;        font: bold 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;}/*=============================MK  border and divider stylesP=============================*//* vertical spacer image used in portal skin *//* .vspacer {        background-image: url(../forum/../mkportal/templates/CPstyle/images/punto_vert.gif);        background-repeat: repeat-y;        background-color: transparent;        } *//* IMPORT border-color */.tabmain,.tablemenu, /* block wrapper, chat button strip */.taburlo,.urlo2,.tabnews,.trattini,.trattini2,.trattini3,.mkpagelink,.mkpagelinklast,.mkpagecurrent,.titadmin,.tborder{                color: #000000;        border: 1px solid #072A68;}        .trattini {        border-width: 1px 0 0 0;        border-style: dashed;}/* blocks admin */.trattini2 {        border-width: 0 1px 0 0;        border-style: dashed;}/* Quotes, Shoutbox */.trattini3 {        border-width: 0 0 1px 0;        border-style: dashed;}/*=============================MK  hyperlink stylesP=============================*//* IMPORT global links */a:link,a:active,a.uno:link,a:link{        color: #000000;}a:visited,a.uno:visited,a:visited{        color: #000000;}a:hover,a.uno:hover,a:hover, a:active{        color: #465584;}/* a:active {        font-family: Verdana, Arial, Helvetica, sans-serif;        color: #496c9f;                text-decoration: none;        } *//* bold navbar, block, module links */a.uno:link {        font-size: 10px;        font-weight: bold;        text-decoration: none}a.uno:visited {                font-size: 10px;        font-weight: bold;        text-decoration: none}a.uno:hover {        font-size: 10px;        font-weight: bold;        text-decoration: underline;}/* block text links *//* .tablemenu a:link, a:visited {        font-family: Verdana, Arial, Helvetica, sans-serif;        color: #496c9f;                text-decoration: none;        }.tablemenu a:hover {        text-decoration: underline;}.tablemenu a:active {        text-decoration: none;        } *//* global contrasting text and hyperlink color */.mktxtcontr,a.mktxtcontr:link, a.mktxtcontr:visited {                color: #ff0000;        font-weight: bold;        text-decoration: none;}a.mktxtcontr:hover {        font-weight: bold;        text-decoration: underline;}/* contrasting text and hyperlink color 2 (admin) */.mktxtcontr2,a.mktxtcontr2:link, a.mktxtcontr2:visited {        color: #0000ff;        font-weight: bold;        text-decoration: none;}a.mktxtcontr2:hover {        font-weight: bold;        text-decoration: underline;}/*=============================MK  form stylesP=============================*//* IMPORT form styles */input,textarea,select,.bgselect, /* input fields */.mkbutton, /* global submit buttons */.mkblkinput, /* block input */.mkradio, .bginput{        background: #FFFFFF;        color: #000000;        font: 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;}/* set form padding and margin *//*.mkbutton,*/ /* global submit buttons *//* textarea,*/input,select,.bgselect, /* input fields */.mkblkinput /* block input */{        margin: 0px;        padding: 0px;        font-size: 9px;        font-weight: normal; /* needed for Mozilla */        }/* radio/checkbox buttons - remove background color and border in IE */ /* .mkradio {        background-color: transparent;        border-width: 0px;} *//* configure blog textarea */textarea.mkwrap1 {        overflow: auto;        /* width: 230px; */        width: 100%;}/* edit blog textarea */textarea.mkwrap2 {        overflow: auto;        width: 500px ;}/*=============================MK  navstrip stylesP=============================*//* top navstrip */.navigatore {                vertical-align: bottom;        text-align: center;        font-family: Verdana, Arial, Helvetica, sans-serif;        font-weight: 300;        font-size: 9px;        border: 0;}/*=============================MK  block stylesP=============================*//* used in functions.php (function main_page) */.blocks {        padding: 0px;}/* block td cell */.tdblock {        font-family: Verdana, Arial, Helvetica, sans-serif;        font-size: 10px;        font-weight: bold;        border: 0;        margin: 2px;        }/* block title bar */.sottotitolo {        vertical-align: bottom;                text-align: left;        font-size: 11px;        font-weight: bold;        }/* horizontal spacer between blocks */.tdspacer {        line-height: 3px;}/*=============================MK  module global stylesP=============================*//* IMPORT module table headings */th.modulex,.thead{        background: #BCCFEA url(../forum/images_pb/gradients/gradient_thead.gif) repeat-x top left;        color: #3A4F6D;        font: bold 11px tahoma, verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;}.modulex {                border-width: 0 0 0 0;        white-space: nowrap;        /* font-weight: normal;*/}/* Reviews description text */.modulelite {        font-size: 8pt;        /* color:#a6bbcd;*/}/* block padding (news, admin) */.contents {        padding: 10px;        }/* module pagination links */.mkpagelink {        padding:1px 3px 1px 3px;        font-weight: normal;}.mkpagelinklast {        padding:1px 3px 1px 3px;        font-weight:normal;}.mkpagecurrent {        padding:1px 3px 1px 3px;        font-weight:normal;}/*=============================MK  shoutbox module stylesP=============================*/td.taburlo{                margin:5px;        padding:5px;        border: 0;        }        /* shouter and date cell */.urlo {        line-height: 18px;        vertical-align: bottom;        text-align: left;                font-size: 11px;        font-weight: bold;        padding: 4px;                }/* shout cell */.urlo2 {        padding: 4px;        border-width: 0 0 1px 0;        border-style: solid;        text-align: left;        font-size: 11px;        font-weight: bold;}/* white shouter text *//* .urlocontrast {                color: #ffffff;} *//*=============================MK  news module stylesP=============================*//* news table with border */.tabnews {        border-width: 1px;        border-style: dashed;        margin:0px;        padding:0px;        font-size: 10px;        }/*=============================MK  admin cp stylesP=============================*//* admin cp titles with top border */.titadmin {        margin: 0px;        font-size: 11px;        font-weight: bold;        border-width: 1px 0 0 0;        border-style: dashed;}/*=============================MK  font stylesP=============================*//* red error page text */.mkerror {                font-size: 12pt;        color: #ff0000;        font-weight:bold;}/* MKPQuote quotation text *//* .mkquote {                        color: #0000ff;        } *//* MKPGallery module ecard */.ecardtitle {        font-size: 10pt;        font-weight: bold;        text-align: center;}/* MKPGallery slideshow caption text (modules/gallery/index.php function slide_update) *//* .mkslidecap {                font-family: Verdana, Arial, Helvetica, sans-serif;        font-size: 12pt;        font-weight: bold;        color: #ffffff;} *//*=============================MK  BBcode quote stylesP=============================*/.mkquoteball {        font-size: 9px;        color: #666666;        font-family: Verdana, Arial, Helvetica, sans-serif;        font-weight: normal;        background-color: #ffffff;                padding: 0;        }.mkquotetext {        font-size: 10px;        color: #666666;        font-family: Verdana, Arial, Helvetica, sans-serif;        font-weight: normal;        background-color: #ffffff;        margin: 0;        padding: 0;        }table .mkquotetable{                                        width: auto; /* IE */                text-align: left;}

The only way I could get rid of it was to thank the post again!

NeutralizeR 02-13-2006 08:40 AM

Waiting for a fix again...

Abe1 02-13-2006 12:38 PM

Version 3.2 (2/13/06):
  • [FIXED] Fixed another bug with reputation.
  • [FIXED] Sped up the one query used to retrieve the thanks.

Abe1 02-13-2006 12:39 PM

Quote:

Originally Posted by AnhTuanCool
Ahhhhh, I think I've made a terrible mistake here.

I figured out what the problem is that the mixing query I suggested awhile ago actually makes the hack's query time worse. When using multiple WHERE's in query, it queries ALL the entries out of the table and the filter it through the second WHERE. If there are a lot of thanks entries like mine, it tremendously stresses the server. Look at the image I attached above, at column Row and you'll understand why.

So I strongly recommend switch back to the old time query.
Code:

$post_thanks_querys = $db->query("SELECT postid FROM ". TABLE_PREFIX ."post WHERE threadid = '$post[threadid]'");
    $post_thanks_postids = 0;
   
    while ($post_thanks_query = $db->fetch_array($post_thanks_querys))
    {
      $post_thanks_postids .= ",$post_thanks_query[postid]";
    }

    $post_thanks_cashe = $db->query("SELECT * FROM " .TABLE_PREFIX. "post_thanks WHERE postid IN ($post_thanks_postids) ORDER BY username ASC");

Lastly, I terribly sorry for suggesting such a flawful mod...

I went back to this BUT, I did not use a query to get the postids. I used the one that vb made already. You should see improvement in the speed.

Abe1 02-13-2006 12:40 PM

Quote:

Originally Posted by NeutralizeR
Waiting for a fix again...

This update fixes this.

optrex 02-13-2006 12:47 PM

I've got 2.6 - what is the most reliable upgrade proceedure

The Realist 02-13-2006 12:50 PM

Getting this database error when thanks is clicked?

Code:

Database error in vBulletin 3.5.3:

Invalid SQL:

                    UPDATE user
                    SET post_thanks_thanked_times = 1 + post_thanks_thanked_times, post_thanks_thanked_posts = 1 + post_thanks_thanked_posts, reputation = $vboptions[post_thanks_reputation] + reputation
                    WHERE userid = 26;

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 '[post_thanks_reputation] + reputation
                    WHERE userid = 26' at line 2
Error Number : 1064
Date        : Monday, February 13th 2006 @ 02:48:06 PM
Script      : http://www.tech-tronix.com/showthread.php?do=post_thanks&p=3718
Referrer    :
IP Address  : xx.xx.xx.xxx
Username    : Realist
Classname    : xxxxxxxx

Any ideas?

Laters

Abe1 02-13-2006 01:35 PM

Quote:

Originally Posted by The Realist
Getting this database error when thanks is clicked?

Code:

Database error in vBulletin 3.5.3:

Invalid SQL:

                    UPDATE user
                    SET post_thanks_thanked_times = 1 + post_thanks_thanked_times, post_thanks_thanked_posts = 1 + post_thanks_thanked_posts, reputation = $vboptions[post_thanks_reputation] + reputation
                    WHERE userid = 26;

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 '[post_thanks_reputation] + reputation
                    WHERE userid = 26' at line 2
Error Number : 1064
Date        : Monday, February 13th 2006 @ 02:48:06 PM
Script      : http://www.tech-tronix.com/showthread.php?do=post_thanks&p=3718
Referrer    :
IP Address  : xx.xx.xx.xxx
Username    : Realist
Classname    : vb_database

Any ideas?

Laters

Do you have the latest version installed?

C_P 02-13-2006 10:58 PM

Quote:

Originally Posted by C_P
Ditto! I get same error:
Code:

Database error in vBulletin 3.5.2:
Invalid SQL:
DELETE FROM reputation WHERE postid = 12795 AND AND whoadded = 1 reason = 'Thanked Post';
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 'AND whoadded = 1 reason = 'Thanked Post'' at line 1
Error Number : 1064
Date : Monday, February 13th 2006 @ 06:08:34 AM
Script : http://www.cpfools.com/forum/showthr...e_user&p=12795
Referrer : http://www.cpfools.com/forum/showthr...2795#post12795
IP Address : xxxxxx
Username : CP
Classname : xxxxxxxxxx

Also at top of my page it shows this:
Code:

Warning: Invalid argument supplied for foreach() in /includes/class_postbit.php(251) : eval()'d code on line 131
 
Warning: Invalid argument supplied for foreach() in /includes/class_postbit.php(251) : eval()'d code on line 141
/*+--------------------------------------------------------------------------| Cascading Style Sheet for MKportal "Forum" Portal Template| ========================================| by Meo aka Luponero [Amedeo de longis]| visiblesoul [Don K. Colburn]| (c) 2004-2005 mkportal.it| http://www.mkportal.it| Email: luponero@mclink.it+--------------------------------------------------------------------------| > MKPortal| > Written By Amedeo de longis| > Date started: 9.2.2004+--------------------------------------------------------------------------*//*=============================MK global stylesP=============================*//* IMPORT body */body,body{        background: #FFFFFF;        color: #000000;        font: 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;                padding: 0px;}body {        font-size: 10px;        margin:0px;        padding:0px; /* Opera 0 margin */                text-align: center; /* center in IE */ }/* IMPORT body background (used for SMF) */.importbgbody {        font-size: 10px;}/* portal wrapper */#mkwrapper {        text-align:left; /* left-align text in IE */                margin: 0px auto 0px auto;}/* IMPORT logostrip */#mklogostrip,.page{        background: #FFFFFF;        color: #000000;}/* logostrip */#mklogostrip {        text-align: left;}/* IMPORT global font formatting */table,tr,td,.tdglobal,td, th, p, li{        font: 10pt 'trebuchet ms', verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;}/* global font formatting */table,tr,td,.tdglobal {        font-size: 10px;        }/* IMPORT main portal table bg (if different than body bg) */.tabmain,.page{        background: #FFFFFF;        color: #000000;}/* main portal table */.tabmain {        margin:0px;        padding:0px;        }/* image link border */img {                        border: 0px;}/*=============================MK IMPORT LIGHT BACKGROUNDP=============================*/.modulecell,.urlo2,.tabnews,.trattini,.trattini3,.tablemenu,.taburlo,.alt1, .alt1Active{        background: #DFE6EE;        color: #000000;}/*=============================MK IMPORT MEDIUM BACKGROUNDP=============================*/.navigatore,.tdblock,.moduleborder,.modulex,.mkpagecurrent,.alt2, .alt2Active{        background: #DFE6EE;        color: #000000;}/*=============================MK IMPORT DARK BACKGROUNDP=============================*/.urlo,.sottotitolo,.tcat{        background: #397DD0 url(../forum/images_pb/gradients/gradient_tcat.gif) repeat-x top left;        color: #FFFFFF;        font: bold 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;}/*=============================MK border and divider stylesP=============================*//* vertical spacer image used in portal skin *//* .vspacer {        background-image: url(../forum/../mkportal/templates/CPstyle/images/punto_vert.gif);        background-repeat: repeat-y;        background-color: transparent;        } *//* IMPORT border-color */.tabmain,.tablemenu, /* block wrapper, chat button strip */.taburlo,.urlo2,.tabnews,.trattini,.trattini2,.trattini3,.mkpagelink,.mkpagelinklast,.mkpagecurrent,.titadmin,.tborder{                color: #000000;        border: 1px solid #072A68;}        .trattini {        border-width: 1px 0 0 0;        border-style: dashed;}/* blocks admin */.trattini2 {        border-width: 0 1px 0 0;        border-style: dashed;}/* Quotes, Shoutbox */.trattini3 {        border-width: 0 0 1px 0;        border-style: dashed;}/*=============================MK hyperlink stylesP=============================*//* IMPORT global links */a:link,a:active,a.uno:link,a:link{        color: #000000;}a:visited,a.uno:visited,a:visited{        color: #000000;}a:hover,a.uno:hover,a:hover, a:active{        color: #465584;}/* a:active {        font-family: Verdana, Arial, Helvetica, sans-serif;        color: #496c9f;                text-decoration: none;        } *//* bold navbar, block, module links */a.uno:link {        font-size: 10px;        font-weight: bold;        text-decoration: none}a.uno:visited {                font-size: 10px;        font-weight: bold;        text-decoration: none}a.uno:hover {        font-size: 10px;        font-weight: bold;        text-decoration: underline;}/* block text links *//* .tablemenu a:link, a:visited {        font-family: Verdana, Arial, Helvetica, sans-serif;        color: #496c9f;                text-decoration: none;        }.tablemenu a:hover {        text-decoration: underline;}.tablemenu a:active {        text-decoration: none;        } *//* global contrasting text and hyperlink color */.mktxtcontr,a.mktxtcontr:link, a.mktxtcontr:visited {                color: #ff0000;        font-weight: bold;        text-decoration: none;}a.mktxtcontr:hover {        font-weight: bold;        text-decoration: underline;}/* contrasting text and hyperlink color 2 (admin) */.mktxtcontr2,a.mktxtcontr2:link, a.mktxtcontr2:visited {        color: #0000ff;        font-weight: bold;        text-decoration: none;}a.mktxtcontr2:hover {        font-weight: bold;        text-decoration: underline;}/*=============================MK form stylesP=============================*//* IMPORT form styles */input,textarea,select,.bgselect, /* input fields */.mkbutton, /* global submit buttons */.mkblkinput, /* block input */.mkradio, .bginput{        background: #FFFFFF;        color: #000000;        font: 10pt verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;}/* set form padding and margin *//*.mkbutton,*/ /* global submit buttons *//* textarea,*/input,select,.bgselect, /* input fields */.mkblkinput /* block input */{        margin: 0px;        padding: 0px;        font-size: 9px;        font-weight: normal; /* needed for Mozilla */        }/* radio/checkbox buttons - remove background color and border in IE */ /* .mkradio {        background-color: transparent;        border-width: 0px;} *//* configure blog textarea */textarea.mkwrap1 {        overflow: auto;        /* width: 230px; */        width: 100%;}/* edit blog textarea */textarea.mkwrap2 {        overflow: auto;        width: 500px ;}/*=============================MK navstrip stylesP=============================*//* top navstrip */.navigatore {                vertical-align: bottom;        text-align: center;        font-family: Verdana, Arial, Helvetica, sans-serif;        font-weight: 300;        font-size: 9px;        border: 0;}/*=============================MK block stylesP=============================*//* used in functions.php (function main_page) */.blocks {        padding: 0px;}/* block td cell */.tdblock {        font-family: Verdana, Arial, Helvetica, sans-serif;        font-size: 10px;        font-weight: bold;        border: 0;        margin: 2px;        }/* block title bar */.sottotitolo {        vertical-align: bottom;                text-align: left;        font-size: 11px;        font-weight: bold;        }/* horizontal spacer between blocks */.tdspacer {        line-height: 3px;}/*=============================MK module global stylesP=============================*//* IMPORT module table headings */th.modulex,.thead{        background: #BCCFEA url(../forum/images_pb/gradients/gradient_thead.gif) repeat-x top left;        color: #3A4F6D;        font: bold 11px tahoma, verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;}.modulex {                border-width: 0 0 0 0;        white-space: nowrap;        /* font-weight: normal;*/}/* Reviews description text */.modulelite {        font-size: 8pt;        /* color:#a6bbcd;*/}/* block padding (news, admin) */.contents {        padding: 10px;        }/* module pagination links */.mkpagelink {        padding:1px 3px 1px 3px;        font-weight: normal;}.mkpagelinklast {        padding:1px 3px 1px 3px;        font-weight:normal;}.mkpagecurrent {        padding:1px 3px 1px 3px;        font-weight:normal;}/*=============================MK shoutbox module stylesP=============================*/td.taburlo{                margin:5px;        padding:5px;        border: 0;        }        /* shouter and date cell */.urlo {        line-height: 18px;        vertical-align: bottom;        text-align: left;                font-size: 11px;        font-weight: bold;        padding: 4px;                }/* shout cell */.urlo2 {        padding: 4px;        border-width: 0 0 1px 0;        border-style: solid;        text-align: left;        font-size: 11px;        font-weight: bold;}/* white shouter text *//* .urlocontrast {                color: #ffffff;} *//*=============================MK news module stylesP=============================*//* news table with border */.tabnews {        border-width: 1px;        border-style: dashed;        margin:0px;        padding:0px;        font-size: 10px;        }/*=============================MK admin cp stylesP=============================*//* admin cp titles with top border */.titadmin {        margin: 0px;        font-size: 11px;        font-weight: bold;        border-width: 1px 0 0 0;        border-style: dashed;}/*=============================MK font stylesP=============================*//* red error page text */.mkerror {                font-size: 12pt;        color: #ff0000;        font-weight:bold;}/* MKPQuote quotation text *//* .mkquote {                        color: #0000ff;        } *//* MKPGallery module ecard */.ecardtitle {        font-size: 10pt;        font-weight: bold;        text-align: center;}/* MKPGallery slideshow caption text (modules/gallery/index.php function slide_update) *//* .mkslidecap {                font-family: Verdana, Arial, Helvetica, sans-serif;        font-size: 12pt;        font-weight: bold;        color: #ffffff;} *//*=============================MK BBcode quote stylesP=============================*/.mkquoteball {        font-size: 9px;        color: #666666;        font-family: Verdana, Arial, Helvetica, sans-serif;        font-weight: normal;        background-color: #ffffff;                padding: 0;        }.mkquotetext {        font-size: 10px;        color: #666666;        font-family: Verdana, Arial, Helvetica, sans-serif;        font-weight: normal;        background-color: #ffffff;        margin: 0;        padding: 0;        }table .mkquotetable{                                        width: auto; /* IE */                text-align: left;}

The only way I could get rid of it was to thank the post again!

Latest Fix today corrects this. Great job and great product Abe1.

D.Ilyin 02-14-2006 10:44 AM

3.2 BUG:
When use option "Delete Own Thanks" all thank's for post will be delete, when some of user clicked "Remove Your Thanks". But count of post thanks decrease only 1.
Just disable that future for a little, i think Abe1 updated it.

Abe1 02-14-2006 11:57 AM

Version 3.3 (2/14/06):
  • [FIXED] Fixed bug with removing own thanks.

I recommend everyone run the "Update Post Thanks Post Amount" counter. You can find it in you ACP under "Maintenance -> Update Counters -> Update Post Thanks Post Amount". This bug was resetting the count to zero when a user removed his own thanks.

The Realist 02-14-2006 01:11 PM

Yes just installed 3.3 version.

When I try and remove a thanks, I get this DB error:

Code:

Database error in vBulletin 3.5.3:

Invalid SQL:
DELETE FROM reputation WHERE postid = 2192 AND AND whoadded = 1 reason='Thanked Post';

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 'AND whoadded = 1 reason='Thanked Post'' at line 1
Error Number : 1064
Date        : Tuesday, February 14th 2006 @ 03:09:48 PM
Script      : http://www.tech-tronix.com/showthread.php?do=post_thanks_remove_user&p=2192
Referrer    : http://www.tech-tronix.com/signature-post-test-forum/test-1799.html
IP Address  : xx.xx.xx.xxx
Username    : Realist
Classname    : xxxxxx

At the top of the error page I get this as well:
Code:

Warning: implode(): Bad arguments. in /showthread.php on line 235
Line 235 reads:
Code:

$set_user_got = "post_thanks_thanked_times = post_thanks_thanked_times - $nb, post_thanks_thanked_posts = post_thanks_thanked_posts - 1";
Any ideas?


Quote:

Originally Posted by Abe1
Do you have the latest version installed?


Abe1 02-14-2006 01:16 PM

Quote:

Originally Posted by The Realist
Yes just installed 3.3 version.

When I try and remove a thanks, I get this DB error:

Code:

Database error in vBulletin 3.5.3:

Invalid SQL:
DELETE FROM reputation WHERE postid = 2192 AND AND whoadded = 1 reason='Thanked Post';

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 'AND whoadded = 1 reason='Thanked Post'' at line 1
Error Number : 1064
Date        : Tuesday, February 14th 2006 @ 03:09:48 PM
Script      : http://www.tech-tronix.com/showthread.php?do=post_thanks_remove_user&p=2192
Referrer    : http://www.tech-tronix.com/signature-post-test-forum/test-1799.html
IP Address  : xx.xx.xx.xxx
Username    : Realist
Classname    : xxxxxx

At the top of the error page I get this as well:
Code:

Warning: implode(): Bad arguments. in /showthread.php on line 235
Line 235 reads:
Code:

$set_user_got = "post_thanks_thanked_times = post_thanks_thanked_times - $nb, post_thanks_thanked_posts = post_thanks_thanked_posts - 1";
Any ideas?

It looks like you dont have the latest version. The query was fixed. I just checked again.

The Realist 02-14-2006 01:18 PM

I just downloaded post thanks 3 3.zip and ran the product-post_thanks.xml file?

So I presume this is the latest version?

The Realist 02-14-2006 01:25 PM

I removed the product from my forum and re installed it, looks like its working now, not getting any DB errors but:

Im getting this error:

Could not find phrase 'post_thanks'.

C_P 02-14-2006 05:45 PM

Well, I just added this latest 3.3 version fix and now this error is back when you try to delete your own thanks:
Quote:

Database error in vBulletin 3.5.2:

Invalid SQL:

UPDATE post
SET post_thanks_amount - 1
WHERE postid = 12796;

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 '- 1
WHERE postid = 12796' at line 2 Error Number : 1064
Date : Tuesday, February 14th 2006 @ 07:43:37 PM
Script : http://www.cpfools.com/forum/showthr...e_user&p=12796
Referrer : http://www.cpfools.com/forum/showthr...2796#post12796
IP Address : 71.104.209.88
Username : CP
Classname : vb_database

and this at top of page:

Warning: Invalid argument supplied for foreach() in /includes/class_postbit.php(251) : eval()'d code on line 131

Warning: Invalid argument supplied for foreach() in /includes/class_postbit.php(251) : eval()'d code on line 141

Abe1 02-14-2006 05:51 PM

Quote:

Originally Posted by C_P
Well, I just added this latest 3.3 version fix and now this error is back when you try to delete your own thanks:

I just updated the zip to fix the bug.

C_P 02-14-2006 05:57 PM

Quote:

Originally Posted by Abe1
I just updated the zip to fix the bug.

Awesome! Works like a charm Abe1

The Realist 02-14-2006 06:38 PM

Dont solve my problem with phrases? this new update.

But I now ger this DB error?

Code:

Database error in vBulletin 3.5.3:

Invalid SQL:

            UPDATE post
            SET post_thanks_amount - 1
            WHERE postid = 171;

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 '- 1
            WHERE postid = 171' at line 2
Error Number : 1064
Date        : Tuesday, February 14th 2006 @ 08:38:46 PM
Script      : http://www.tech-tronix.com/showthread.php?do=post_thanks_remove_user&p=171
Referrer    : http://www.tech-tronix.com/signature-post-test-forum/test-107.html#post171
IP Address  :
Username    : Realist
Classname    :

Might remove this hack, to mant errors.

Abe1 02-14-2006 06:41 PM

Quote:

Originally Posted by The Realist
Dont solve my problem with phrases? this new update.

But I now ger this DB error?

Code:

Database error in vBulletin 3.5.3:

Invalid SQL:

            UPDATE post
            SET post_thanks_amount - 1
            WHERE postid = 171;

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 '- 1
            WHERE postid = 171' at line 2
Error Number : 1064
Date        : Tuesday, February 14th 2006 @ 08:38:46 PM
Script      : http://www.tech-tronix.com/showthread.php?do=post_thanks_remove_user&p=171
Referrer    : http://www.tech-tronix.com/signature-post-test-forum/test-107.html#post171
IP Address  :
Username    : Realist
Classname    :

Might remove this hack, to mant errors.

I just fixed this a few min ago. Download the latest zip.

The Realist 02-15-2006 01:38 AM

Naaa dont work M8.

Removed xml and reinstalled the new one again, Im still getting this DB error:

Code:

Database error in vBulletin 3.5.3:

Invalid SQL:

            UPDATE post
            SET post_thanks_amount - 1
            WHERE postid = 171;

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 '- 1
            WHERE postid = 171' at line 2
Error Number : 1064
Date        : Wednesday, February 15th 2006 @ 03:35:56 AM
Script      : http://www.tech-tronix.com/showthread.php?do=post_thanks_remove_user&p=171
Referrer    : http://www.tech-tronix.com/signature-post-test-forum/test-107.html#post171
IP Address  :
Username    : Realist
Classname    :

Laters

PS.

uninstalled as well and Im getting a DB error on my forums, so I had to reinstall it again, can you check that the uninstall works as wel M8.

Laters

Abe1 02-15-2006 02:27 AM

Quote:

Originally Posted by The Realist
Naaa dont work M8.

Removed xml and reinstalled the new one again, Im still getting this DB error:

Code:

Database error in vBulletin 3.5.3:

Invalid SQL:

            UPDATE post
            SET post_thanks_amount - 1
            WHERE postid = 171;

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 '- 1
            WHERE postid = 171' at line 2
Error Number : 1064
Date        : Wednesday, February 15th 2006 @ 03:35:56 AM
Script      : http://www.tech-tronix.com/showthread.php?do=post_thanks_remove_user&p=171
Referrer    : http://www.tech-tronix.com/signature-post-test-forum/test-107.html#post171
IP Address  :
Username    : Realist
Classname    :

Laters

PS.

uninstalled as well and Im getting a DB error on my forums, so I had to reinstall it again, can you check that the uninstall works as wel M8.

Laters

I am unsure how you get this error. This error is not possible in the latest version. I would need access to your ACP to fix it. It seems like it has not deleted some plugins.

NeutralizeR 02-19-2006 05:41 PM

Still having problems while removing thanks. Is this because of vBSEO?

Quote:

Database error in vBulletin 3.5.3:

Invalid SQL:

UPDATE msx_post
SET post_thanks_amount - 1
WHERE postid = 69399;

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 '- 1
WHERE postid = 69399' at line 2
Error Number : 1064
Date : Sunday, February 19th 2006 @ 09:38:34 PM
Script : http://www.msxlabs.com/forum/showthr...e_user&p=69399
Referrer : http://www.msxlabs.com/forum/tam-sur...eyenler-2.html

Abe1 02-19-2006 05:51 PM

Quote:

Originally Posted by NeutralizeR
Still having problems while removing thanks. Is this because of vBSEO?

Yes. I think it doesn't refresh plugins and it it using an old plug-in.

NeutralizeR 02-19-2006 06:03 PM

Any suggestions?

Abe1 02-19-2006 06:24 PM

Quote:

Originally Posted by NeutralizeR
Any suggestions?

Try disabling it then re-enable it. I have no idea how it works.

NeutralizeR 02-19-2006 06:37 PM

Negative - Remove own thanks DISABLED...

It was great till you make the first update about queries...

The Realist 02-19-2006 07:05 PM

The very same problem here M8.

Author had a look at my forums for me and said he did not have a clue but to disable VBSEO.

Also, I cannot remove the hack as well as it gives a database error.

So Im stuck with it as it is, errors and all.


All times are GMT. The time now is 04:32 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.02304 seconds
  • Memory Usage 2,005KB
  • 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
  • (23)bbcode_code_printable
  • (1)bbcode_php_printable
  • (20)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
  • (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