2009-10-25, 08:29 AM
(2009-10-25, 03:23 AM)technix Wrote: [ -> ](2009-10-24, 10:45 AM)- G33K - Wrote: [ -> ](2009-10-23, 11:55 PM)technix Wrote: [ -> ](2009-10-23, 07:41 PM)RateU Wrote: [ -> ]Does it happen if you use the default thx.php file? Because I think you use "a custom" thx.php file.
Yes my php is custom it is set to use text for the links instead of graphics, thats the only change, but none the less I need the spinner to destroy
I'd appreciate if anyone knew how to correct the JS to destroy the spinner with the changes to the php that I have posted.
Thank you so much
Derrick
You changed links to text but the JS is still trying to load the images, it seems thats where the JS stops and doesn't get to destroying the spinner.
Try removing the img lines in the JS (lines 31,33,56,58)
Ok This did in fact destroy the spinner, although created a new snag. In stead of the text for Thanks changing to no Thanks once thanks is clicked it stays on thanks however, if you click it it does in fact remove it. So its not changing to wording but the usability is working, if this makes sense. here is the code
if(!$b) //show thank button $post['thanks'] = "<span class=\"buttons\"><a id=\"a{$post['pid']}\" onclick=\"javascript: ThankYou.thx({$post['pid']}); return false; \" href=\"showthread.php?action=thank&tid={$post['tid']}&pid={$post['pid']}\">Thanks</a></span>"; else $post['thanks'] = "<span class=\"buttons\"><a id=\"a{$post['pid']}\" onclick=\"javascript: ThankYou.rthx({$post['pid']}); return false; \" href=\"showthread.php?action=remove_thank&tid={$post['tid']}&pid={$post['pid']}\">No Thanks</a></span>";
So its linking correctly by removing it, and that works but its not changing the Text to No Thanks
Derrick
Try:
In the JS:
Find:
lin.href='showthread.php?action=remove_thank&pid='+pid;
ADD AFTER:
lin.innerHTML=xml.getElementsByTagName('text').item(0).firstChild.data;
Find:
lin.href='showthread.php?action=thank&pid='+pid;
ADD AFTER:
lin.innerHTML=xml.getElementsByTagName('text').item(0).firstChild.data;
In the thx.php
Find:
$output="<thankyou>
<list><![CDATA[$list]]></list>
<display>".($list ? "1" : "0")."</display>
<image>{$mybb->settings['bburl']}/{$theme['imgdir']}/";
$output.=$mybb->input['action'] == "thankyou" ? "postbit_rthx.gif": "postbit_thx.gif";
$output.="</image>
</thankyou>";
REPLACE with:
$output="<thankyou>
<list><![CDATA[$list]]></list>
<display>".($list ? "1" : "0")."</display>
<text>";
$output.=$mybb->input['action'] == "thankyou" ? "Remove Thanks": "Add Thanks";
$output.="</text>
</thankyou>";