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)

cashcash 04-10-2012 01:17 PM

Quote:

Originally Posted by Scandal (Post 2318673)
Go to admincp > Plugins & Products > Plugin Manager, open the plugin "Recent Thanks - UserCP Field Part2" and replace its contents with:
PHP Code:

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();



.. and post here the message you receive now on the usercp.

the message i get :

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in [path]/profile.php(2087) : eval()'d code on line 5

Emeralda 04-10-2012 01:44 PM

=^.^=

http://img198.imageshack.us/img198/2...78da7ca366.png

Scandal 04-10-2012 02:15 PM

Quote:

Originally Posted by cashcash (Post 2318045)
the message i get :

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in [path]/profile.php(2087) : eval()'d code on line 5

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.

cashcash 04-10-2012 02:27 PM

Yes, it did.

Thank you.

CouponWCents 04-10-2012 11:53 PM

Thanks soooooooooo much!! Been waiting for this!

DontWannaName 04-12-2012 10:59 PM

Is it just me or is the recent like page really slow?

jimnyc 04-17-2012 03:50 PM

Excellent, I love it and it works perfectly on 4.1.12!

When a notification appears, you click on it and it brings you to the page with the last 25 thanks. Can someone tell me how to place a link on the lower portion of the navbar, the one that has "new posts" and "private messages" - so members can click on the link at anytime and see the most recent thanks? It seems that once you wander away from viewing the thanks, there is no way to get back to that page, but I can't figure out how to post a permanent link on the navbar.

Thanks!

-Jim

Scandal 04-17-2012 04:09 PM

1 Attachment(s)
Quote:

Originally Posted by jimnyc (Post 2320924)
Excellent, I love it and it works perfectly on 4.1.12!

When a notification appears, you click on it and it brings you to the page with the last 25 thanks. Can someone tell me how to place a link on the lower portion of the navbar, the one that has "new posts" and "private messages" - so members can click on the link at anytime and see the most recent thanks? It seems that once you wander away from viewing the thanks, there is no way to get back to that page, but I can't figure out how to post a permanent link on the navbar.

Thanks!

-Jim

Go to admincp > Styles & Templates > Search in templates >
... find and open the template "navbar"

find
Code:

{vb:raw template_hook.navbar_after_pm}
add below
Code:

<li><a href="recent_thanks.php" rel="nofollow">Recent Thanks</a></li>
The result:
Attachment 137840

:up:

jimnyc 04-17-2012 04:43 PM

Worked perfectly, thanks much for the code and such a quick response!

-Jim

ywwz 04-22-2012 04:21 AM

I am running 4.1.11, and I cannot install Post Thank You Hack, so this one is not a option for me:( I need a thank you hack...


All times are GMT. The time now is 08:01 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.01258 seconds
  • Memory Usage 1,758KB
  • 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
  • (2)bbcode_code_printable
  • (2)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