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)
-   -   Mini Mods - Recent Thanks for [AJAX] Post Thank You Hack (https://vborg.vbsupport.ru/showthread.php?t=280109)

stevieb 10-16-2013 11:15 PM

Lol yea I know but can we make an option in user cp that is individual choice and not forum wide?

Hippy 10-16-2013 11:30 PM

I'm sure you can be but there was no demand for it it was never done.
Sorry if scandal likes the idea he may.

stevieb 10-16-2013 11:40 PM

Fair enough. Thanks mate :)

Zoul 11-27-2013 12:56 PM

Hello
a little help please

I am running vb 4.2.1
and I use Post Thank You Hack 7.82 (I did not find the 7.83 version marked test above)

I have no Recent_Thanks that appears in the party while I made two actions.
Yet the addon is enabled

My navbar is completely created and I introduced them the link to the page: recent_thanks.php

I let you look:

https://vborg.vbsupport.ru/external/2013/11/10.png

it several times I got the xml file without success.
Do you have an idea please?

evelynpriscilla 11-29-2013 07:34 PM

Quote:

if ($vbulletin->options['recent_thanks_notif'] AND $vbulletin->options['recent_thanks_on_off']){
$quer = "SELECT recent_thankact FROM " . TABLE_PREFIX . "user WHERE userid = ".$vbulletin->userinfo['userid']." AND recent_thankact=1";
$temp = $db->query_read($quer) or die("Error: ". mysql_error(). " with query ". $quer);
$isthere = mysql_num_rows($temp);
if($isthere){
$recent_thankact_checked = 'checked="checked"';
}
else {$recent_thankact_checked='';
}

$templater = vB_Template::create('recent_thanks_ufield');
$templater->register('recent_thankact_checked', $recent_thankact_checked);
$templater->register_page_templates();
$template_hook[usercp_options_messaging] .= $templater->render();

}
Getting this error message in vb4.2.1

Warning: mysql_num_rows() expects parameter 1 to be resource, object given in [path]/profile.php(2083) : eval()'d code on line 4


Quote:

Originally Posted by Scandal (Post 2318688)
Try another one replace to the plugin with:
PHP Code:

if ($vbulletin->options['recent_thanks_notif'] AND $vbulletin->options['recent_thanks_on_off']){
    
$isthere $db->num_rows($db->query_read("SELECT recent_thankact FROM " TABLE_PREFIX "user WHERE userid = ".$vbulletin->userinfo['userid']." AND recent_thankact=1"));
    if(
$isthere){
    
$recent_thankact_checked 'checked="checked"';
    }
    else {
$recent_thankact_checked='';
    }

       
$templater vB_Template::create('recent_thanks_ufield');    
   
$templater->register('recent_thankact_checked'$recent_thankact_checked);
$templater->register_page_templates();  
   
$template_hook[usercp_options_messaging] .= $templater->render();



Hope it will fix the problem.

Parse error: syntax error, unexpected '<' in /home1/******************/profile.php(2083) : eval()'d code on line 15

Thanks for the mod and support.

jimnyc 12-06-2013 03:43 PM

I am running version 4.2.0 and am using this with version 7.83 of the thank you hack, with all the updates through the thread. All was fine until a few days ago, of course with 0 changes to my site or this hack.

Anyway, when someone clicks on "recent_thanks", much of the time it hangs or takes forever. Then while it's hanging, I get a SQL database error emailed to me that the "server has gone away". Nothing else on my site causes this to happen.

I assume when someone click on this, it does a query for the last 25 thanks received and displays them. Somehow this script is causing the SQL server to hang. I did recently move between providers.

Could this be a database problem? Or maybe something with a file? This is the email I receive, with personal stuff redacted. Thanks to anyone that can point me in right direction!!

Code:

Database error in vBulletin 4.2.0:

Invalid SQL:

      SELECT post_thanks.postid, post_thanks.date, post_thanks.username, post_thanks.userid, thread.title
      FROM post_thanks AS post_thanks
      LEFT JOIN post AS post
      ON post_thanks.postid = post.postid
      LEFT JOIN thread AS thread
      ON thread.threadid = post.threadid     
      WHERE post.userid = '23'
      ORDER BY post_thanks.id DESC
      LIMIT 25;

MySQL Error  : MySQL server has gone away
Error Number  : 2006
Request Date  : Friday, December 6th 2013 @ 09:15:16 AM
Error Date    : Friday, December 6th 2013 @ 09:16:18 AM
Script        : http://www.***.com/recent_thanks.php
Referrer      : http://www.***.com/forum.php
IP Address    : 208.102.*.*


jimnyc 12-06-2013 03:53 PM

^^ In addition to the above, I just uninstalled this hack, re-uploaded all of the PHP files and re-installed the XML. I also changed the results page from 25 thanks to 15. The results are the same, very, very slow. Everything else on my site loads quickly.

Hippy 12-06-2013 04:42 PM

Changing host is definitely the cause.

Did you try optimizing the database from phpmyadmin?

Did you try the recounter in the admincp for post thanks?

Something is screwy with the count causing the errors and slowing sql (database) searching.

Install post thanks xml from the admincp. Overwriting.
Don't uninstall, you'll lose at data

jimnyc 12-06-2013 04:56 PM

Quote:

Originally Posted by Hippy (Post 2466295)
Changing host is definitely the cause.

Did you try optimizing the database from phpmyadmin?

Did you try the recounter in the admincp for post thanks?

Something is screwy with the count causing the errors and slowing sql (database) searching.

Install post thanks xml from the admincp. Overwriting.
Don't uninstall, you'll lose at data

I did the optimize earlier, and I did the overwrites. Where in the admincp will I find the option to recounter the post thanks? I looked under maintenance so far and can't locate it.

Thanks!!

jimnyc 12-06-2013 04:59 PM

I found it, doing the recounter now...


All times are GMT. The time now is 05:40 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.01836 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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