MyBB Community Forums
Compatibility thanks plugin - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Support (https://community.mybb.com/forum-72.html)
+---- Thread: Compatibility thanks plugin (/thread-158403.html)



Compatibility thanks plugin - glover - 2014-09-01

Hi.
Someone know which one plugin "thanks" can work with MyBB 1.8 ?


RE: Compatibility thanks plugin - Ashley S - 2014-09-01

No plugins are updated to MyBB 1.8 yet.


RE: Compatibility thanks plugin - Aoki - 2014-09-02

Just wait a few weeks and you'll see some plugins updated.


RE: Compatibility thanks plugin - Destroy666 - 2014-09-02

This should work: http://community.mybb.com/mods.php?action=view&pid=24


RE: Compatibility thanks plugin - glover - 2014-09-04

This one cannot work... it require mybbstuff core system...


RE: Compatibility thanks plugin - dragonexpert - 2014-09-04

See the reply here: http://community.mybb.com/thread-158580.html


RE: Compatibility thanks plugin - glover - 2014-09-05

Hello again.
I resolved problem with compatibility this plugin. http://mods.mybb.com/view/thanks
Now this plugin can also work with new mybb 1.8.

Bellow i put fixed java script code for plugin thanks.
All work good with ajax Smile

/**

 *
 * Thanks Plugin fixed for MyBB 1.8 by Glover(http://cqpolska.pl)
 * Developed by SaeedGH ([email protected])
 * www.mybbhelp.ir
 *
 */

var pid=-1;
var spinner=null;

var my_spinner = {

content:  '<div id="my_spinner" style="position: fixed;display: inline;top: 50%;left: 50%;"><img  src="images/spinner_big.gif"></div>',

show: function (){
$("body").append(my_spinner.content);
return true;
},
destroy: function (){
$("#my_spinner").remove();
return false;}
};

function thx_common(xml)
{
try
{
remove=xml.getElementsByTagName('del').item(0).firstChild.data=="1";
lin=document.getElementById('a'+pid);
if (remove) {
table = document.getElementById('thx' + pid);
table.style.display = xml.getElementsByTagName('display').item(0).firstChild.data != 0 ?
'' : 'none';
list = document.getElementById('thx_list' + pid);
list.innerHTML = xml.getElementsByTagName('list').item(0).firstChild.data;

img = document.getElementById('i' + pid);
img.src = xml.getElementsByTagName('image').item(0).firstChild.data;
}
else 
{
lin.innerHTML="";
lin.onclick=null;
lin.href="";
lin = null;
}
}
catch(err)
{
alert("an Error had occured please contact administrator")
alert(err);
}
finally
{
spinner=my_spinner.destroy();
return lin;
}

}
function thx_action(response)
{
lin=thx_common(response)
if(lin!=null)
{
lin.onclick= new Function("","return rthx("+pid+");");
lin.href='showthread.php?action=remove_thank&pid='+pid;
}
}

function rthx_action(response)
{
lin=thx_common(response)
if (lin!=null) 
{
lin.onclick = new Function("", "return thx(" + pid + ");");
lin.href = 'showthread.php?action=thank&pid=' + pid;
}
}

function thx(id)
{
if(spinner)
return false;
my_spinner.show();
pid=id;
pb="pid="+pid;
$.ajax('xmlhttp.php?action=thankyou',{type: 'post',data:pb, success: thx_action});

return false;
}

function rthx(id)
{
if(spinner)
return false;
my_spinner.show();
pid=id;
b="pid="+pid;
$.ajax('xmlhttp.php?action=remove_thankyou',{type: 'post',data:b, success: rthx_action});
return false;
}



RE: Compatibility thanks plugin - Whiteneo - 2014-09-05

I released a thanks plugin working on 1.8 i made all ajax script and entire almost code, works and its compatible with that thanks plugin and have many more opts and css styled buttons.

I tested since beta appears and after upgrade my forum and make some tests i release it here on mods zone.


RE: Compatibility thanks plugin - glover - 2014-09-05

I understand Dark Neo but i wanted only this simple fast thanks(without any add code like myallerts), same is with CSS styles buttons (on my modifications) because most users on my site wanted only this one...