MyBB Community Forums

Full Version: ThankYou mod
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(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>";
(2009-10-25, 08:29 AM)- G33K - Wrote: [ -> ]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>";

Thank you so much, it is working perfectly now.

I dunno how you people can learn to do this stuff but I truly appreciate it.

Derrick
I was having the same problem with the thanks mod. that spinner pic comes and don't go until I refresh the whole page. I was about to gave up then I tried "the classic view of thread". I was surprised that it was working quite fine with the classic view system then I forced that classic view to all users and new users as well. and now thanks system is working quite fine.

Any how, I could not resolve it with the modern preview yet.
in the up given solution i think only spinner pic has been avoided. Can there be any other solution to this problem?
please post your thx.php here ..thanks Smile problem with the javascript i think
attached file
requires updating for 1.6.5
not working for me
same errors on safari mac contact admin ............
and type error nul is not a object
and don,t show
Thanks by:
Pages: 1 2 3