vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - [AJAX] Post Thank You Hack (https://vborg.vbsupport.ru/showthread.php?t=231666)

TheGorf 04-05-2010 09:52 PM

I am repeatedly getting this error in my forums:

Code:

Database error in vBulletin 4.0.2:

Invalid SQL:

                      REPLACE INTO vb_search (userid, ipaddress, personal, searchuser, forumchoice, sortby, sortorder, searchtime, showposts, orderedids, dateline, displayterms, searchhash)
                      VALUES (0, '173.160.151.225', 1, 'Hugs & Hisses', '', 'post.dateline', 'DESC', 0.00521, 1, '82076,81918,80565,80397,79291,78669,78659,78334,77976,77744,77266,76845,76782,76717,76494,76449,76445,76304,75850,75787,75386,75385,74770,74633,73678,73162,73035,72371,72230,71802,71394,70338,69937,68475,67925,66787,66205,66188,66098,64710,64644,64296,64069,63850,63826,63627,63545,63493,63487,63411,63202,62754,62329,61424,60658,60652,59645', 1270507241, 'a:6:{s:5:\"words\";a:0:{}s:9:\"highlight\";a:0:{}s:6:\"common\";a:0:{}s:5:\"users\";a:1:{i:813;s:17:\"Hugs & Hisses\";}s:6:\"forums\";i:0;s:7:\"options\";a:3:{s:11:\"starteronly\";i:0;s:11:\"childforums\";i:1;s:6:\"action\";s:7:\"process\";}}', 'ba678b6b15c81aac30e8c7c52ddb73a8');

MySQL Error  : Table 'pnwhs_forums.vb_search' doesn't exist
Error Number  : 1146
Request Date  : Monday, April 5th 2010 @ 03:40:41 PM
Error Date    : Monday, April 5th 2010 @ 03:40:41 PM
Script        : http://forums.pnwhs.org/post_thanks.php?do=findthanks&u=813
Referrer      :
IP Address    : 173.160.151.225
Username      : Unregistered
Classname    : vB_Database_MySQLi
MySQL Version :

I see quite clearly where it is coming from. Line 278 of post_thanks.php is the file that has that SQL query and is part of the IF block that has the do=findthanks. However this script also generates the error for do=findthanks_user_gave as well. If I go look in the vB database there is no "search" table. Anyone have any idea why this is?

*edit*
Ok I see that this is a common error in this hack and that the best solution appears to be this:
https://vborg.vbsupport.ru/showpost....&postcount=396

However, why am I commenting out dozens of lines of code? Is this actually broken then? Abe1 would you care to comment on this?

War.Frog 04-06-2010 01:57 AM

Quote:

Originally Posted by TheGorf (Post 2016471)
However, why am I commenting out dozens of lines of code? Is this actually broken then? Abe1 would you care to comment on this?

Abe1 has gone MIA I'm afraid.

djbaxter 04-06-2010 02:06 AM

Quote:

Originally Posted by TheGorf (Post 2016471)
However, why am I commenting out dozens of lines of code? Is this actually broken then? Abe1 would you care to comment on this?

You are commenting out the lines that are involved in the search function, which has never worked for 4.02.

See https://vborg.vbsupport.ru/showpost....&postcount=760

Vaira 04-06-2010 09:13 AM

Quote:

Originally Posted by grc (Post 2016368)
When I made the edits I described it also changed the font size of the users who are listed on my forum. Are you perhaps talking about the horizontal screen real estate taken up by the usernames plus the dates? You might consider just turning off the dates. So far as our forum users are concerned I don't think the date is all that important. In fact, I doubt they even know that that option is available since I've never activated it.

Thanks. I have turned off the date. Anyway I would like to know how to make the font size of the listed user smaller......your 'hack' affects definetively the headline, not what's listed in the box!

grc 04-06-2010 12:57 PM

Quote:

Originally Posted by Vaira (Post 2016709)
Thanks. I have turned off the date. Anyway I would like to know how to make the font size of the listed user smaller......your 'hack' affects definetively the headline, not what's listed in the box!

I guess I changed the font of the user's name elsewhere, possibly not related to this hack of the thanks mod. I was thinking the usernames were changed when I did the hack. I reversed it on my forum and I see that the usernames stayed the same, smaller size.

Frankly, I can't remember how I did it but I think its somewhere in the Style Variable Editor. Sorry for the misdirection.

TheGorf 04-06-2010 05:13 PM

So now I find that with this mod, a user deleting their own thanks gets a permission denied error, but the thanks still gets deleted.

The block of code is on about line 116 and starts:

PHP Code:

if ($_REQUEST['do'] == 'post_thanks_remove_user')
{
    (
$hook vBulletinHook::fetch_hook('post_thanks_main_remove_user_thanks_start')) ? eval($hook) : false;

    if (!(
delete_thanks($postinfo$vbulletin->userinfo['userid'])))
    {
        
$using_ajax ? exit : print_no_permission();
    } 

So I altered the logic in that block and removed the bang from infront of delete_thanks() and it works fine now. Another bug in this hack... *sigh*

Oh and while we are on the subject, is anyone else having problems with this hack using AJAX? No matter what options I select adding or removing a Thanks causes a full page refresh.

Kolbi 04-06-2010 06:56 PM

CanĀ“t reproduce these issues..

Antonio Pereira 04-07-2010 06:25 AM

Inside a Thread if a try Inline Mod (Select All) only select a first post.

Anyone can reproduce this bug?

Best Regards

mad@Max 04-07-2010 11:26 PM

1 Attachment(s)
Mostly for developer.
Some improvements with js for OOP: one namespace, autoset events, less size.
Would be even better if the hack work with xml :)

Antonio Pereira 04-08-2010 07:15 AM

Quote:

Originally Posted by mad@Max (Post 2017699)
Mostly for developer.
Some improvements with js for OOP: one namespace, autoset events, less size.
Would be even better if the hack work with xml :)

This fix that bug?
Quote:

Inside a Thread if a try Inline Mod (Select All) only select a first post.

Anyone can reproduce this bug?

Best Regards

Best Regards


All times are GMT. The time now is 12:02 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.02743 seconds
  • Memory Usage 1,756KB
  • 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_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)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