Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
Recent Thanks for [AJAX] Post Thank You Hack Details »»
Recent Thanks for [AJAX] Post Thank You Hack
Version: 2.6.2, by Scandal Scandal is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.x.x Rating:
Released: 03-14-2012 Last Update: 03-20-2012 Installs: 289
DB Changes Uses Plugins Auto-Templates
Additional Files  
No support by the author.

Info:
  • This mod works with the hack "[AJAX] Post Thank You Hack" as an addon and a) provides a page with the latest X (default: 25) "Thank You" the user has received b) notify the user via vbulletin notification menu (on navbar)
  • Very useful for users who want to keep up with the "Thank You" votes on their posts.
System Requirements:
  • [AJAX] Post Thank You Hack - for vB4
  • vBulletin 4.x
Installation information on hack:
  • Files edited: 0
  • Templates edited: 0
  • Files to upload: 1
  • Time to install: 1 minute max
How to install:
  1. Upload the file "recent_thanks.php" to your forum directory.
  2. Import XML file (as product): AdminCP > Plugin System > Manage Products > [Add/Import Product]
  3. (Optional if you enable the notifications) Add the link "http://www.yourforum.com/recent_thanks.php" where you want (for example to navbar).
Notice (not a bug): The system doesn't decrease the notifications' count for new "Thank you" when the admin push the "Remove all" of a post (rare but ok). So the user will notified but he will not see the removed votes on the page.

How to upgrade:
  1. Upload the new file recent_thanks.php
  2. Import XML file (as product): AdminCP > Plugin System > Manage Products > [Add/Import Product] with set of "Allow Overwrite" to YES


How to upgrade from vB3 version:
This hack developed from zero for vB4, so if you upgrade your forum from vB3 to vB4 with the vB3 version of this hack on it, you must uninstall first this older version and to do a clean install of this hack (product install and new file upload).

Changelog:
  • v2.5 - First release for vB4
  • v2.6 - updated file, linkable usernames, admincp phrase changed, 1 bug fix
  • V2.6.2 - add: who's online location (thanks to Hippy), 1 css fix

Tested on: vBulletin 4.1.11 - Post Thank You Hack 7.83

-> Don't forget to click INSTALL!

Download Now

File Type: zip Recent_Thanks_v2.6.2_vB4.zip (139.4 KB, 2642 views)

Screenshots

File Type: jpg screen_notifications.JPG (11.9 KB, 0 views)
File Type: jpg screen_page.JPG (117.7 KB, 0 views)
File Type: jpg screen_usercp.JPG (9.9 KB, 0 views)
File Type: jpg screen_admincp.jpg (38.4 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
9 благодарности(ей) от:
AURFSCAN, djbaxter, dlewisr, elsa23, eTiKeT?, gerryvz, john7911, Popa Andrei, Teascu Dorin

Comments
  #122  
Old 10-16-2013, 11:15 PM
stevieb stevieb is offline
 
Join Date: Apr 2005
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lol yea I know but can we make an option in user cp that is individual choice and not forum wide?
Reply With Quote
  #123  
Old 10-16-2013, 11:30 PM
Hippy's Avatar
Hippy Hippy is offline
 
Join Date: Dec 2001
Location: USA, New Jersey
Posts: 2,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #124  
Old 10-16-2013, 11:40 PM
stevieb stevieb is offline
 
Join Date: Apr 2005
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fair enough. Thanks mate
Reply With Quote
  #125  
Old 11-27-2013, 12:56 PM
Zoul Zoul is offline
 
Join Date: Nov 2012
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:



it several times I got the xml file without success.
Do you have an idea please?
Reply With Quote
  #126  
Old 11-29-2013, 07:34 PM
evelynpriscilla evelynpriscilla is offline
 
Join Date: Sep 2013
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 View Post
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.
Reply With Quote
  #127  
Old 12-06-2013, 03:43 PM
jimnyc jimnyc is offline
 
Join Date: Aug 2003
Location: New York
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.*.*
Reply With Quote
  #128  
Old 12-06-2013, 03:53 PM
jimnyc jimnyc is offline
 
Join Date: Aug 2003
Location: New York
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^^ 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.
Reply With Quote
  #129  
Old 12-06-2013, 04:42 PM
Hippy's Avatar
Hippy Hippy is offline
 
Join Date: Dec 2001
Location: USA, New Jersey
Posts: 2,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #130  
Old 12-06-2013, 04:56 PM
jimnyc jimnyc is offline
 
Join Date: Aug 2003
Location: New York
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hippy View Post
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!!
Reply With Quote
  #131  
Old 12-06-2013, 04:59 PM
jimnyc jimnyc is offline
 
Join Date: Aug 2003
Location: New York
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found it, doing the recounter now...
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:15 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.08679 seconds
  • Memory Usage 2,362KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (9)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (5)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete