Quote:
Originally Posted by ForceHSS
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;
}