Witajcie!


Istnieje problem z pluginem wykonanym na MyBB. Do tej pory nie mogę znaleźć rozwiązania. Na forum MybB była już masa tematów na ten temat i nic. Przykładowy: Idź na MyBB PL

Jeśli się nie mylę jest coś z JS, chociaż to może być pomyłka.

kod pliku thx.js

  1. /**
  2.  *
  3.  * Thanks Plugin
  4.  * Developed by SaeedGH (SaeedGhMail@Gmail.com)
  5.  * www.mybbhelp.ir
  6.  *
  7.  */
  8.  
  9. var pid=-1;
  10. var spinner=null;
  11. function thx_common(response)
  12. {
  13. try
  14. {
  15. xml=response.responseXML;
  16. remove=xml.getElementsByTagName('del').item(0).firstChild.data=="1";
  17. lin=document.getElementById('a'+pid);
  18. if (remove) {
  19. table = document.getElementById('thx' + pid);
  20. table.style.display = xml.getElementsByTagName('display').item(0).firstChild.data != 0 ?
  21. '' : 'none';
  22. list = document.getElementById('thx_list' + pid);
  23. list.innerHTML = xml.getElementsByTagName('list').item(0).firstChild.data;
  24.  
  25. img = document.getElementById('i' + pid);
  26. img.src = xml.getElementsByTagName('image').item(0).firstChild.data;
  27. }
  28. else
  29. {
  30. lin.innerHTML="";
  31. lin.onclick=null;
  32. lin.href="";
  33. lin = null;
  34. }
  35. }
  36. catch(err)
  37. {
  38. alert("an Error had occured please contact administrator");
  39. alert(err);
  40. }
  41. finally
  42. {
  43. spinner.destroy();
  44. spinner=null;
  45. return lin;
  46. }
  47.  
  48. }
  49. function thx_action(response)
  50. {
  51. lin=thx_common(response)
  52. if(lin!=null)
  53. {
  54. lin.onclick= new Function("","return rthx("+pid+");");
  55. lin.href='showthread.php?action=remove_thank&pid='+pid;
  56. }
  57. }
  58.  
  59. function rthx_action(response)
  60. {
  61. lin=thx_common(response)
  62. if (lin!=null)
  63. {
  64. lin.onclick = new Function("", "return thx(" + pid + ");");
  65. lin.href = 'showthread.php?action=thank&pid=' + pid;
  66. }
  67.  
  68.  
  69. }
  70.  
  71. function thx(id)
  72. {
  73. if(spinner)
  74. return false;
  75. spinner = new ActivityIndicator("body", {image: "images/spinner_big.gif"});
  76. pid=id;
  77. pb="pid="+pid;
  78. new Ajax.Request('xmlhttp.php?action=thankyou',{method: 'post',postBody:pb, onComplete:thx_action});
  79. return false;
  80. }
  81.  
  82. function rthx(id)
  83. {
  84. if(spinner)
  85. return false;
  86. spinner = new ActivityIndicator("body", {image: "images/spinner_big.gif"});
  87. pid=id;
  88. b="pid="+pid;
  89. new Ajax.Request('xmlhttp.php?action=remove_thankyou',{method: 'post',postBody:b,onComplete:rthx_action});
  90. return false;
  91. }


Tu jest kod pliku *.php. http://hostuje.net/file.php?id=21e600debd3...65fb37414c254f2

Z góry dziękuję za jaką kolwiek pomoc. smile.gif