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)

SCRIPT3R 01-26-2007 03:10 PM

Quote:

Originally Posted by BuyHostCheap (Post 1166169)
hey bro,
i downloaded this hack and installed but even after i uploaded post_thanks.gif its nt working. i mean i can c search for thank posts link but nt button. y?

Quote:

Originally Posted by BuyHostCheap
can u help me regarding thanks mod? i wanna help in editing my template

you PM'd me but...
Quote:

BuyHostCheap has chosen not to receive private messages or may not be allowed to receive private messages. Therefore you may not send your message to him/her.

Heir Jordan 01-27-2007 10:05 AM

Just out of curiosity, is there a way to change default things such as "Thanks" and "....has thanked...."?

i.e.; say I'd like to change it to "Thank You" and "**** has said Thank You to **** for this post" --- is that possible? Let me know if I need to clarify this.

ddr 01-28-2007 04:05 AM

i've installed this hack, but... can you optimize code to use 1 predefined js function depending on the post id, instead of using
Code:

<script type="text/javascript">
<!--
function post_thanks_give_57255()
{
        fetch_object('post_thanks_button_57255').style.display = 'none'
       
       
       
        do_thanks_add = new vB_AJAX_Handler(true)
        do_thanks_add.onreadystatechange(thanks_add_Done_57255)
        do_thanks_add.send('showthread.php?do=post_thanks_add_ajax&p=57255')
}
function thanks_add_Done_57255()
{
        if (do_thanks_add.handler.readyState == 4 && do_thanks_add.handler.status == 200)
        {
                fetch_object('post_thanks_box_57255').innerHTML = do_thanks_add.handler.responseText
        }
}
function post_thanks_remove_all_57255()
{
        do_thanks_remove_all = new vB_AJAX_Handler(true)
        do_thanks_remove_all.onreadystatechange(thanks_remove_all_Done_57255)
        do_thanks_remove_all.send('showthread.php?do=post_thanks_remove_all_ajax&p=57255')

        fetch_object('post_thanks_button_57255').style.display = ''
       
       
}
function thanks_remove_all_Done_57255()
{
        if (do_thanks_remove_all.handler.readyState == 4 && do_thanks_remove_all.handler.status == 200)
        {
                fetch_object('post_thanks_box_57255').innerHTML = do_thanks_remove_all.handler.responseText
        }
}
function post_thanks_remove_user_57255()
{
        do_thanks_remove_user = new vB_AJAX_Handler(true)
        do_thanks_remove_user.onreadystatechange(thanks_remove_user_Done_57255)
        do_thanks_remove_user.send('showthread.php?do=post_thanks_remove_user_ajax&p=57255')

        fetch_object('post_thanks_button_57255').style.display = ''
       
       
}
function thanks_remove_user_Done_57255()
{
        if (do_thanks_remove_user.handler.readyState == 4 && do_thanks_remove_user.handler.status == 200)
        {
                fetch_object('post_thanks_box_57255').innerHTML = do_thanks_remove_user.handler.responseText
        }
}
//-->
</script>

for EVERY post?

jawinn 01-28-2007 10:51 AM

I've had this mod installed for a while now. It has worked fine until a few days ago. I noticed that two of my users have "thanks" counts that are way too high. One of the two has over 5000 thanks in his postbit. He assures me that he didn't go and hit thanks 5000 times and I believe him.

I have two questions.
Has anyone else experienced this?
Is there any way to remove all the thanks from one user?

Abe1 01-28-2007 11:55 AM

Quote:

Originally Posted by BuyHostCheap (Post 1166169)
hey bro,
i downloaded this hack and installed but even after i uploaded post_thanks.gif its nt working. i mean i can c search for thank posts link but nt button. y?

Do you have more then on style. You would have to put the button into the button folder of all styles.

Abe1 01-28-2007 11:56 AM

Quote:

Originally Posted by 2meplie (Post 1167018)
First I want to say I really like this hack. I prefer it to the reputation system.

I was wondering, and sorry if this has already been discuss, but is it possible to hide the thanks from the posts and just leave it in the member's section, but with all the details there? Or even better would be for each member to only see the thanks they received and not all of them. It take a lot of space when peoples are thanked at every post of it 10-15 peoples thank another one for one post.

Thanks :

You can edit the template so the thanks_bit doesn't show up.

Abe1 01-28-2007 11:57 AM

Quote:

Originally Posted by Soliloquy (Post 1167476)
I've installed this hack (works perfectly, thanks!) and will install the Groan one as well. However... I need another just like this for Laughs. Any chance you'll release one, or tell me how to modify it? I know I could change phrases but I'd really like all three working together.:)

Before uploading the thanks hack again, you would have to edit a LOT in the template. It's a lot of work. Not sure you would get everthing right.

Abe1 01-28-2007 12:17 PM

Quote:

Originally Posted by ddr (Post 1168765)
i've installed this hack, but... can you optimize code to use 1 predefined js function depending on the post id, instead of using
Code:

<script type="text/javascript">
<!--
function post_thanks_give_57255()
{
        fetch_object('post_thanks_button_57255').style.display = 'none'
       
       
       
        do_thanks_add = new vB_AJAX_Handler(true)
        do_thanks_add.onreadystatechange(thanks_add_Done_57255)
        do_thanks_add.send('showthread.php?do=post_thanks_add_ajax&p=57255')
}
function thanks_add_Done_57255()
{
        if (do_thanks_add.handler.readyState == 4 && do_thanks_add.handler.status == 200)
        {
                fetch_object('post_thanks_box_57255').innerHTML = do_thanks_add.handler.responseText
        }
}
function post_thanks_remove_all_57255()
{
        do_thanks_remove_all = new vB_AJAX_Handler(true)
        do_thanks_remove_all.onreadystatechange(thanks_remove_all_Done_57255)
        do_thanks_remove_all.send('showthread.php?do=post_thanks_remove_all_ajax&p=57255')

        fetch_object('post_thanks_button_57255').style.display = ''
       
       
}
function thanks_remove_all_Done_57255()
{
        if (do_thanks_remove_all.handler.readyState == 4 && do_thanks_remove_all.handler.status == 200)
        {
                fetch_object('post_thanks_box_57255').innerHTML = do_thanks_remove_all.handler.responseText
        }
}
function post_thanks_remove_user_57255()
{
        do_thanks_remove_user = new vB_AJAX_Handler(true)
        do_thanks_remove_user.onreadystatechange(thanks_remove_user_Done_57255)
        do_thanks_remove_user.send('showthread.php?do=post_thanks_remove_user_ajax&p=57255')

        fetch_object('post_thanks_button_57255').style.display = ''
       
       
}
function thanks_remove_user_Done_57255()
{
        if (do_thanks_remove_user.handler.readyState == 4 && do_thanks_remove_user.handler.status == 200)
        {
                fetch_object('post_thanks_box_57255').innerHTML = do_thanks_remove_user.handler.responseText
        }
}
//-->
</script>

for EVERY post?

I need to learn how to use prototype first. I've tried but failed so far.

Abe1 01-28-2007 12:18 PM

Quote:

Originally Posted by jawinn (Post 1168907)
I've had this mod installed for a while now. It has worked fine until a few days ago. I noticed that two of my users have "thanks" counts that are way too high. One of the two has over 5000 thanks in his postbit. He assures me that he didn't go and hit thanks 5000 times and I believe him.

I have two questions.
Has anyone else experienced this?
Is there any way to remove all the thanks from one user?

In the ACP under maintenance, there is an option to re-count the users thanks amount.

ddr 01-28-2007 06:28 PM

Quote:

Originally Posted by Abe1 (Post 1168947)
I need to learn how to use prototype first. I've tried but failed so far.

i've tried to do so:
Code:

function post_thanks_give_(pid)
{
        fetch_object('post_thanks_button_'+pid).style.display = 'none'
        do_thanks_add = new vB_AJAX_Handler(true)
        do_thanks_add.onreadystatechange(thanks_add_Done)
        do_thanks_add.send('showthread.php?do=post_thanks_add_ajax&p='+pid)
}
function thanks_add_Done() {
        if (do_thanks_add.handler.readyState == 4 && do_thanks_add.handler.status == 200) {
          fetch_object('post_thanks_box_'+manualinsertedpostid).innerHTML = do_thanks_add.handler.responseText+pid
          }
}

i've moved this code to showthread template and cleaned post_thanks_box template. I've also modified all links in hack's templates to use post_thanks_give_('$postid') function, but i couldn't get postid in function thanks_add_Done.
if
Code:

function post_thanks_give_(pid)
{
        fetch_object('post_thanks_button_'+pid).style.display = 'none'
        do_thanks_add = new vB_AJAX_Handler(true)
        do_thanks_add.onreadystatechange(thanks_add_Done(pid))
        do_thanks_add.send('showthread.php?do=post_thanks_add_ajax&p='+pid)
}

function thanks_add_Done(pid) {
        if (do_thanks_add.handler.readyState == 4 && do_thanks_add.handler.status == 200) {
          fetch_object('post_thanks_box_'+pid).innerHTML = do_thanks_add.handler.responseText+pid
          }

}

there is an error
do_thanks_add.handler.readyState is null or non-object


All times are GMT. The time now is 10:14 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.04248 seconds
  • Memory Usage 1,766KB
  • 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
  • (4)bbcode_code_printable
  • (9)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