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)
-   -   Show Thread Enhancements - [AJAX] Post Thank You Hack (https://vborg.vbsupport.ru/showthread.php?t=231666)

agentaeon 07-11-2012 06:30 PM

1 Attachment(s)
Attachment 139670

I am using ForceHSS' version of the hack and I have been unable to find any information regarding how to make the box where it says people have thanked for this useful post look like the attached image.

I am using a theme that takes advantage of postbit legacy.

Can someone help?

Thanks.

Hippy 07-11-2012 06:44 PM

That's because it's a article that BOP5 write look at the post of mine in the first post or my Sig. The link to it is there

Sarteck 07-17-2012 05:16 PM

I'm wracking my brains trying to figure out how to make this work after moving parts of my vB4 suite to sub-domains (the forums and the blogs).

When we click on Thanks, nothing happens except for the "Thanks" bit disappearing. When the thread is re-loaded, nothing has changed, either.

When we middle-click or otherwise open the "Thanks" in a new Tab/Window, it works fine.

I tried making a post_thanks.php file in my forums sub-directory that has the same stuff most everything else in that directory has:
PHP Code:

<?php
require_once(dirname(__FILE__) . "/vb_dir.php");
chdir($vb_dir);
require_once(
$vb_dir '/' basename(__FILE__));
?>

But it didn't change a thing. (And here I thought I was being clever. :< )



It worked great before the change to the new sub-domain. It still does not work on a clean Style. I (obviously) haven't tried disabling all my plugins, since this one would be included. XP


Am I missing something?

ForceHSS 07-18-2012 12:33 AM

Quote:

Originally Posted by Sarteck (Post 2349027)
I'm wracking my brains trying to figure out how to make this work after moving parts of my vB4 suite to sub-domains (the forums and the blogs).

When we click on Thanks, nothing happens except for the "Thanks" bit disappearing. When the thread is re-loaded, nothing has changed, either.

When we middle-click or otherwise open the "Thanks" in a new Tab/Window, it works fine.

I tried making a post_thanks.php file in my forums sub-directory that has the same stuff most everything else in that directory has:
PHP Code:

<?php
require_once(dirname(__FILE__) . "/vb_dir.php");
chdir($vb_dir);
require_once(
$vb_dir '/' basename(__FILE__));
?>

But it didn't change a thing. (And here I thought I was being clever. :< )



It worked great before the change to the new sub-domain. It still does not work on a clean Style. I (obviously) haven't tried disabling all my plugins, since this one would be included. XP


Am I missing something?

Have you tried removing and reinstalling

Sarteck 07-18-2012 03:27 AM

Quote:

Originally Posted by ForceHSS (Post 2349112)
Have you tried removing and reinstalling

No, but I did re-download, and re-installed (allowing uploaded files to overwrite the old files) with "Allow Overwrite" set when I imported the XML.

If I remove it, won't that remove the database of Thanks I already have? :(

Note that Thanking is still possible; one can still "Thank" by opening the thank link itself in a new tab/window. It's just the AJAX that seems to crap out.

ForceHSS 07-18-2012 04:23 AM

Version you are using and vb version?

ForceHSS 07-18-2012 04:26 AM

Quote:

Originally Posted by Sarteck (Post 2349148)
No, but I did re-download, and re-installed (allowing uploaded files to overwrite the old files) with "Allow Overwrite" set when I imported the XML.

If I remove it, won't that remove the database of Thanks I already have? :(

Note that Thanking is still possible; one can still "Thank" by opening the thank link itself in a new tab/window. It's just the AJAX that seems to crap out.

You said you moved parts to your sub as I said above to reinstall after removing might fix the problem as some error might of happened after the move. But it is very hard to see without site links and screenshots so can only go by what you say

Sarteck 07-18-2012 04:34 AM

I'm using 7.84. I -think- I was using 7.83 before I re-installed it, but it might have been 7.84.

vB version is 4.1.11. (Was on 4.1.10, but when we moved stuff to subdomains, there was a bug for going to the first unread post of a thread, and that was fixed in 4.1.11, so we just upgraded last night.)



I have the site on three subdomains, basically. Normal content (including CMS) is on the plain old www.domain, forums are on forums.domain, and blogs (not that it matters) are on blogs.domain.

What I "moved," well, it wasn't really a move. I left everything installed as normal. I then created a new file in my forums sub-directory on the server called post_thanks.php (originally, there was just the one on the main part of the site). I put into it the content you see above (which is the content in most files in stub directories like mine).



I will install this onto my clean testing forum tonight (I split it into sub-domains as well not too long ago), and see if the problem persists.

ForceHSS 07-18-2012 04:43 AM

Quote:

Originally Posted by Sarteck (Post 2349165)
I'm using 7.84. I -think- I was using 7.83 before I re-installed it, but it might have been 7.84.

vB version is 4.1.11. (Was on 4.1.10, but when we moved stuff to subdomains, there was a bug for going to the first unread post of a thread, and that was fixed in 4.1.11, so we just upgraded last night.)



I have the site on three subdomains, basically. Normal content (including CMS) is on the plain old www.domain, forums are on forums.domain, and blogs (not that it matters) are on blogs.domain.

What I "moved," well, it wasn't really a move. I left everything installed as normal. I then created a new file in my forums sub-directory on the server called post_thanks.php (originally, there was just the one on the main part of the site). I put into it the content you see above (which is the content in most files in stub directories like mine).



I will install this onto my clean testing forum tonight (I split it into sub-domains as well not too long ago), and see if the problem persists.

Why not have it on the one domain like all other forums. Well the problem could be because of ur setup. I am sure with a bit of recoding you can fix

Sarteck 07-18-2012 07:32 AM

Quote:

Originally Posted by ForceHSS (Post 2349167)
Why not have it on the one domain like all other forums. Well the problem could be because of ur setup. I am sure with a bit of recoding you can fix

...because it's how I have my forum set up...? O.o

You do realize that vBulletin 4.1+ allows for subdomains to separate blogs, forums, and CMS, yeah?





ANYways, back to the issue.

I altered the post_thanks.js to have the following function changed:
Code:

var post_thanks_handleFailure = function(o)
{
        if(o.responseText !== undefined)
        {
                alert(o.responseText);
        }
        else {console.debug("Here is the request object (failed): %o", o);}
}

When debugging, the response I get is:

Code:

Here is the request object (failed): Object { tId=1, status=0, statusText="communication failure"}






Ah, fixed it.





That new post_thanks.php that I put up in my forums stub directory, I put that back in, and THEN I prefixed the "sUrl" in each of the three functions with PATHS.forum+'/'. (Full code will follow at the end of this post.)

Thanks is now working just fine.










Code:

/*======================================*\
|| #################################### ||
|| # Post Thank You Hack version 7.84 # ||
|| # Original version by Abe1        # ||
|| # Updated by Forcehss              # ||
|| #################################### ||
\*======================================*/
var post_thanks_base_url = PATHS.forum+'/';
var post_thanks_handleSuccess = function(o)
{
        if(o.responseText !== undefined)
        {
                if (post_thanks_callback.object_name[o.tId] !== undefined)
                {
                        fetch_object(post_thanks_callback.object_name[o.tId]).innerHTML = o.responseText;
                }
        }
}
var post_thanks_handleFailure = function(o)
{
        if(o.responseText !== undefined)
        {
                alert(o.responseText);
        }
        else {console.debug("Here is the request object (failed): %o", o);}
}
var post_thanks_callback =
{
        success: post_thanks_handleSuccess,
        failure: post_thanks_handleFailure,
        timeout: vB_Default_Timeout,
        cache: false,
        object_name: new Array()
};
function post_thanks_give(postid, integrate)
{
        fetch_object('post_thanks_button_' + postid).style.display = 'none';
        fetch_object('post_thanks_separator_' + postid).style.display = 'none';

        if (integrate == true)
        {
                fetch_object('post_groans_button_' + postid).style.display = 'none';
        }

        var sUrl = post_thanks_base_url + 'post_thanks.php';
        var postData = 'do=post_thanks_add&using_ajax=1&p=' + postid + '&securitytoken=' + SECURITYTOKEN;

        var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, post_thanks_callback, postData);

        post_thanks_callback.object_name[request.tId] = 'post_thanks_box_' + postid;

        fetch_object('post_thanks_box_' + postid).style.display = '';

        return false;
}
function post_thanks_remove_all(postid, integrate)
{
        var sUrl = post_thanks_base_url + 'post_thanks.php';
        var postData = 'do=post_thanks_remove_all&using_ajax=1&p=' + postid + '&securitytoken=' + SECURITYTOKEN;

        var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, post_thanks_callback, postData);

        post_thanks_callback.object_name[request.tId] = 'post_thanks_box_' + postid;

        fetch_object('post_thanks_button_' + postid).style.display = ''
        fetch_object('post_thanks_separator_' + postid).style.display = '';

        if (integrate == true)
        {
                fetch_object('post_groans_button_' + postid).style.display = '';
        }

        fetch_object('post_thanks_box_' + postid).style.display = 'none';

        return false;
}
function post_thanks_remove_user(postid, integrate)
{
        var sUrl = post_thanks_base_url + 'post_thanks.php';
        var postData = 'do=post_thanks_remove_user&using_ajax=1&p=' + postid + '&securitytoken=' + SECURITYTOKEN;

        var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, post_thanks_callback, postData);

        post_thanks_callback.object_name[request.tId] = 'post_thanks_box_' + postid;

        fetch_object('post_thanks_button_' + postid).style.display = ''
        fetch_object('post_thanks_separator_' + postid).style.display = '';

        if (integrate == true)
        {
                fetch_object('post_groans_button_' + postid).style.display = '';
        }

        fetch_object('post_thanks_box_' + postid).style.display = 'none';

        return false;       
}


ForceHSS 07-18-2012 02:30 PM

Glad you got it fixed and I also have one of my forums with the sub like yours

thienhi228 07-22-2012 11:33 AM

Thank you! Please upgrade for vbb 4.2.x

gedsta 07-22-2012 11:45 AM

Quote:

Originally Posted by thienhi228 (Post 2350402)
Thank you! Please upgrade for vbb 4.2.x

It works fine on vB 4.2.0

https://vborg.vbsupport.ru/showpost....postcount=1847

L2Insomnia 07-22-2012 04:29 PM

Odd I uploaded and enabled the one provided by ForceHSS and it has no effect at all..nothing shows up. This is on a clean install using the default template and no other mods installed. No errors or anything.

ForceHSS 07-22-2012 06:03 PM

Vb version and make sure you installed all files to correct folders

L2Insomnia 07-22-2012 10:36 PM

Oops sorry forgot the version. I am running 4.2.0 Patch level 2.

I just checked all files and they are all there in the correct locations.

ForceHSS 07-23-2012 12:52 AM

Do you have the setting option for the mod. Does any part of it show in the admincp also check error logs see if they show anything

cbiweb 07-24-2012 12:55 PM

This error showed up while trying to thank a post:
Quote:

If this error occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error.]]>
It seems to have fixed itself, but what caused it, and is there a way to prevent it from happening again? I'm running vB4.2 PL2.

ForceHSS 07-24-2012 10:50 PM

describe the action you performed before you received this error

revmitchell 07-25-2012 04:57 AM

Will not install here is the error:

Quote:

The following dependencies were not met:

This product is not compatible with version 4.2.0 of vBulletin. (Compatible starting with 4.0.0 beta 4 / Incompatible with 4.1.0 alpha 1 and greater)

New Joe 07-25-2012 05:42 AM

Quote:

Originally Posted by L2Insomnia (Post 2350480)
Odd I uploaded and enabled the one provided by ForceHSS and it has no effect at all..nothing shows up. This is on a clean install using the default template and no other mods installed. No errors or anything.

Same here, I installed it on 4.2.0 and the Thanks button doesn't show, on 4.1.3shows fine

Disco_Dave 07-25-2012 08:18 AM

I'm running this add on, on 4.2 pl2 and it works a treat :)

New Joe 07-25-2012 08:41 AM

Quote:

Originally Posted by tricksodave (Post 2351239)
I'm running this add on, on 4.2 pl2 and it works a treat :)

Did you use Hippy's fix or ForceHSS's fix?

Disco_Dave 07-25-2012 08:56 AM

Quote:

Originally Posted by New Joe (Post 2351245)
Did you use Hippy's fix or ForceHSS's fix?

I'm using Hippy's fix, I wouldn't be sure what the difference's are though :)

cbiweb 07-25-2012 09:43 AM

Quote:

Originally Posted by cbiweb (Post 2351045)
This error showed up while trying to thank a post:

It seems to have fixed itself, but what caused it, and is there a way to prevent it from happening again? I'm running vB4.2 PL2.

Quote:

Originally Posted by ForceHSS (Post 2351165)
describe the action you performed before you received this error


I woke up that morning, had coffee, went into my office to get on my computer, checked email and stuff, then logged onto my forums, checked for new posts, read a few, and on one of them I simply clicked the 'Thanks' icon. That's when the error occurred.

Videx 07-25-2012 01:08 PM

Quote:

Originally Posted by cbiweb (Post 2351260)
I woke up that morning, had coffee, went into my office to get on my computer, checked email and stuff, then logged onto my forums, checked for new posts, read a few, and on one of them I simply clicked the 'Thanks' icon. That's when the error occurred.

That's not much of a bug report. Now tell us how many different browsers you've tried, how many of your members are reporting the same error, and what you've already done to try to solve the problem. And, assuming it happens every time in 3-4 browsers, give us a test login so we can see it for ourselves. At some point be prepared to assure us that you have disabled all your other mods, and that it didn't stop working after installing another mod.

cbiweb 07-25-2012 01:20 PM

Please re-read my original post, slowly so as to fully comprehend all the aspects and limitations of reporting the issue (hint: happened once, fixed itself), and you'll see why there's really nothing more I can say about it than I already did.

All I want to know is if this is something that has a known cause, and how to prevent it. If not, so be it.

ForceHSS 07-25-2012 01:47 PM

Quote:

Originally Posted by cbiweb (Post 2351313)
Please re-read my original post, slowly so as to fully comprehend all the aspects and limitations of reporting the issue (hint: happened once, fixed itself), and you'll see why there's really nothing more I can say about it than I already did.

All I want to know is if this is something that has a known cause, and how to prevent it. If not, so be it.

Are you using Hippy's or my version

cbiweb 07-25-2012 01:55 PM

Yours.

ForceHSS 07-25-2012 02:03 PM

Did it ever tell you what the error was or was this the only message you ever got


Quote:

If this error occurred unexpectedly, please inform the administrator and describe the action you performed before you received this error.]]>

cbiweb 07-25-2012 02:14 PM

Yep, that was the entire message. It was on the screen right where the thanks normally appears. I do wonder if it was an early symptom of a db crash we experienced about an hour later (whole tables went missing), and we had to restore a backup.

Disco_Dave 07-25-2012 02:54 PM

Quote:

Originally Posted by New Joe (Post 2351245)
Did you use Hippy's fix or ForceHSS's fix?

I've also installed ForceHSS version and it works 100% also.

HTH
Dave

mfractal 07-25-2012 05:13 PM

tried to search this thread without much success.
I'd like to modify the code, so that when a thanks is given to a user, it's reputation would increase for the amount of rep power of the one who thanked him.

Currently, i can only set a fixed value for reputation increase.

ForceHSS 07-25-2012 09:24 PM

Quote:

Originally Posted by mfractal (Post 2351378)
tried to search this thread without much success.
I'd like to modify the code, so that when a thanks is given to a user, it's reputation would increase for the amount of rep power of the one who thanked him.

Currently, i can only set a fixed value for reputation increase.

Post in paid section if you need custom coding done

ForceHSS 07-25-2012 09:26 PM

Quote:

Originally Posted by cbiweb (Post 2351329)
Yep, that was the entire message. It was on the screen right where the thanks normally appears. I do wonder if it was an early symptom of a db crash we experienced about an hour later (whole tables went missing), and we had to restore a backup.

I would say yes db crash would not help and I would say was the reason for the message hope you don't have any more problems

L2Insomnia 07-27-2012 11:56 AM

I am not sure what changed but it is now showing and working fine. I didn't change a thing it just appeared. I think it was a problem with my browser. Thanks for the help :)

tareqbd 07-27-2012 12:18 PM

Quote:

Originally Posted by ForceHSS (Post 2351433)
Post in paid section if you need custom coding done

ForceHSS bro
the SID hide integrates the Thanks feature, no one updated it for vb 4.2.0. meta description and rss showing the hidden content. can you work on it please.
@hippy bro too.

TNERatedEdge 07-27-2012 02:40 PM

I upgraded to 4.2 how do I make this show ?

tareqbd 07-27-2012 03:47 PM

Quote:

Originally Posted by TNERatedEdge (Post 2351880)
I upgraded to 4.2 how do I make this show ?

Works fine on vb 4.2.0.

TNERatedEdge 07-27-2012 06:31 PM

how do you make it show under the posts?


All times are GMT. The time now is 10:32 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.06485 seconds
  • Memory Usage 1,869KB
  • 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_code_printable
  • (2)bbcode_php_printable
  • (21)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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