vb.org Archive

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

Antivirus 12-17-2007 09:56 PM

Abe,
I'm trying to get the postbit template to refresh as well upon thanking a post (in order to update the "Thanked 4 Times in 4 Posts" text...

Within post_thanks.js I have modified function thanks_add_done() by adding an additional fetch_object (to call the respective postbit) as follows:

PHP Code:

function thanks_add_Done()
{
    if (
do_thanks_add.handler.readyState == && do_thanks_add.handler.status == 200)
    {
        
fetch_object('td_post_' do_thanks_add.postid).innerHTML do_thanks_add.handler.responseText;
        
fetch_object('post_thanks_box_' do_thanks_add.postid).innerHTML do_thanks_add.handler.responseText;
    }


Unfortunately, I'm pretty new at JS so it doesn't work. Any ideas what I am doing wrong and how to get it to refresh the respective postbit?

mystic10 12-18-2007 05:58 PM

the thread that you have suggested is for index php not functions.php...i couldnt find the array there please guide again

youradhere4222 12-18-2007 10:27 PM

I plan to install this on 3.7. Thanks!

Noctavia 12-19-2007 08:55 PM

Quote:

Originally Posted by Noctavia (Post 1401201)
I was wondering if there's a way to make the thankyou box only appear after say 2 or 3 separate people have thanked the post? I'm wanting to use the hack to highlight the outstanding posts on my forum, and a couple of people seem the be very thankful for all sorts of things. I'd like it so that if the thank you box doesn't show until multiple people have said thanks for it.

Would anyone have any idea on this? I've been looking over the .php and .xml files, but as I am not sure what to look for exactly, I am getting a bit stumped. Basically I don't want the thank you box to even show unless 3 or more people say thanks.

Jase2 12-19-2007 09:07 PM

I reverted my style and tried to re-install this - however it's not showing now... any help?

Regards Jason :)

Antivirus 12-19-2007 10:47 PM

Quote:

Originally Posted by Noctavia (Post 1404965)
Would anyone have any idea on this? I've been looking over the .php and .xml files, but as I am not sure what to look for exactly, I am getting a bit stumped. Basically I don't want the thank you box to even show unless 3 or more people say thanks.

Just create a simple plugin for hook location: post_thanks_function_post_thanks_off_end

Untested, but something like this:
PHP Code:

$sql $vbulletin->db->query_first("SELECT COUNT(post_thanks_votenum) AS qty FROM " TABLE_PREFIX "post AS post WHERE postid = " $postinfo['postid'] . " AND qty < 3");

if (
$sql['qty'])
{
     return 
true;


Within the query, change the 3 to minimum quantity of times a post should be thanked before displaying, and I think it'll give you what you need.

Abe1 12-20-2007 03:31 AM

VB 3.7 Hack Released hear: https://vborg.vbsupport.ru/showthread.php?t=165673 IT ALSO WORKS vb 3.6

zmmmzz 12-21-2007 05:01 AM

Quote:

Originally Posted by Antivirus (Post 1405039)
Just create a simple plugin for hook location: post_thanks_function_post_thanks_off_end

Untested, but something like this:
PHP Code:

$sql $vbulletin->db->query_first("SELECT COUNT(post_thanks_votenum) AS qty FROM " TABLE_PREFIX "post AS post WHERE postid = " $postinfo['postid'] . " AND qty < 3");

if (
$sql['qty'])
{
     return 
true;


Within the query, change the 3 to minimum quantity of times a post should be thanked before displaying, and I think it'll give you what you need.

thanks so much for this!!! it has been so helpful
have any idea how to make a hit counter for the thread so that everytime someone clicks the thanks button the counter increases??

Seiyaboy 12-21-2007 12:40 PM

Very nice. I currently run version 6.3, and I was wondering what extras were added to the modification and whether an upgrade is worth it or not. Thanks.

Mrdby 12-24-2007 02:35 AM

Anybody?


All times are GMT. The time now is 11:28 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.02438 seconds
  • Memory Usage 1,757KB
  • 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
  • (3)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
  • (4)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