MyBB Community Forums
[1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - 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 Releases (https://community.mybb.com/forum-102.html)
+---- Thread: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) (/thread-59652.html)



RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - Clank - 2014-09-03

(2014-09-03, 07:46 PM)[email protected] Wrote: Ok, thanks. I was just interested, i have no idea how to do that. Big Grin


(2014-09-03, 04:39 PM).m. Wrote: ^ for the simple likes plugin, if the error is missing core system files then see this reply
I uploaded both, when i visit my plugin page, i get this error:
"Fatal error: Class 'MybbStuff_SimpleLikes_Import_Manager' not found in /home/a7117140/public_html/forum/inc/plugins/simplelikes.php on line 28"

Umm, do you have pluginlibrary installed?


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - [email protected] - 2014-09-03

I just uploaded plugin library while simple likes was in and it gave the same error, so i thought it could because the plugin library wasnt active then, so i deleted the simple likes to get access on the plugin page again. I tried to install plugin library and it first said, incompatible with mybb 1.8, then changed the compatibility from 1.6 to 1.8 on the file, went to plugin page and when i try to install & activate plugin library, nothing happens, it stil says install & activate after refresh.


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - Clank - 2014-09-03

(2014-09-03, 08:25 PM)[email protected] Wrote: I just uploaded plugin library while simple likes was in and it gave the same error, so i thought it could because the plugin library wasnt active then, so i deleted the simple likes to get access on the plugin page again. I tried to install plugin library and it first said, incompatible with mybb 1.8, then changed the compatibility from 1.6 to 1.8 on the file, went to plugin page and when i try to install & activate plugin library, nothing happens, it stil says install & activate after refresh.

That's normal, plugin library cannot be installed, it just sits there. Did you try uploading simple likes again?

Nevermind, it looks like the importer is broken on 1.6. I don't know why.


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - [email protected] - 2014-09-04

Yes i tried again, it just doesnt work. Dont even know why its on the mods page.


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - Euan T - 2014-09-04

SimpleLikes is actually hidden on the mods page, but there's a bug in the mods system that allows access anyway if you access the URL directly. I have not release SimpleLikes 1.5.0 yet, it is still in testing. It should not be used if you do not know what you are doing.


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - SAEED.M - 2014-09-07

Can anyone set this for 1.8 ?? I need to this for 1.8 !!!!!!


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - Ronshaan - 2014-09-07

this is working with 1.8 if u change the capability
i have one issue
i want it to work with different theme but it does show up but masses the thread view
how do i make it work on different theme ?


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - [email protected] - 2014-09-07

Why do you mean by change the "capability"? Could you also give Us the solutions to fix this? Ty.


RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - ATofighi - 2014-09-07

If you want use it for 1.8 see this:

in "inc/plugins/thankyoulike.php" find:
"compatibility" 	=> "14*,16*"
replace with:
"compatibility" 	=> "14*,16*,18*"

and change "jscript/thankyoulike.js"  to this code:
var thankyoulike = {
	init: function()
	{
	},
	
	tgl: function(pid)
	{
		if(tylCollapsible == 1)
		{
			if($('#tyl_data_'+pid).is(':visible'))
			{
				$('#tyl_data_'+pid).hide();
				$('#tyl_title_'+pid).hide();
				$('#tyl_title_collapsed_'+pid).show();
				$('#tyl_i_expcol_'+pid).attr('src', $('#tyl_i_expcol_'+pid).attr('src').replace("collapse", "collapse_collapsed"));
				$('#tyl_i_expcol_'+pid).attr('alt', "[+]");
				$('#tyl_a_expcol_'+pid).attr('title', "[+]");
			}
			else
			{
				$('#tyl_data_'+pid).show();
				$('#tyl_title_collapsed_'+pid).hide();
				$('#tyl_title_'+pid).show();
				$('#tyl_i_expcol_'+pid).attr('src', $('#tyl_i_expcol_'+pid).attr('src').replace("collapse_collapsed", "collapse"));
				$('#tyl_i_expcol_'+pid).attr('alt', "[-]");
				$('#tyl_a_expcol_'+pid).attr('title', "[-]");
			}
		}
	},
	
	add: function(pid)
	{
		if(use_xmlhttprequest == 1 && tylEnabled == 1)
		{
			if(tylUser == 0)
			{
				return true;
			}
			//this.spinner = new ActivityIndicator("body", {image: imagepath + "/spinner_big.gif"});
			$.ajax('thankyoulike.php?ajax=1&action=add&pid='+pid+'&my_post_key='+my_post_key,
			{
				type: 'POST'
			}).done(function(data)
			{
				thankyoulike.addDone(data, pid);
			});
			document.body.style.cursor = 'wait';
			return false;
		}
		else
		{
			return true;
		}
	},
	
	addDone: function(data, pid)
	{
		if(typeof data == 'string' && data.match(/<error>([^<]*)<\/error>/))
		{
			message = data.match(/<error>([^<]*)<\/error>/);

			if(!message[1])
			{
				message[1] = "An unknown error occurred.";
			}

			/*if(this.spinner)
			{
				this.spinner.destroy();
				this.spinner = '';
			}*/
			document.body.style.cursor = 'default';
			alert(message[1]);
		}
		else
		{
			tylVisible = 2;
			if(tylCollapsible == 1 && $("#tyl_"+pid).css('display') != "none")
			{	
				if($('datatyl_data_'+pid).is(':visible'))
				{
					tylVisible = 1;
				}
				else
				{
					tylVisible = 0;
				}
			}
			$("#tyl_"+pid).html(data.tylData);
			$("#tyl_"+pid).show();
			$("#tyl_btn_"+pid).html(data.tylButton);
			if(tylCollapsible == 1)
			{
				if(tylVisible != 2)
				{
					if(tylVisible == 1)
					{
						$('#tyl_data_'+pid).show();
						$('#tyl_title_collapsed_'+pid).hide();
						$('#tyl_title_'+pid).show();
						$('#tyl_i_expcol_'+pid).attr('src', $('#tyl_i_expcol_'+pid).attr('src').replace("collapse_collapsed", "collapse"));
						$('#tyl_i_expcol_'+pid).attr('alt', "[-]");
						$('#tyl_a_expcol_'+pid).attr('title', "[-]");
					}
					else
					{
						$('#tyl_data_'+pid).hide();
						$('#tyl_title_'+pid).hide();
						$('#tyl_title_collapsed_'+pid).show();
						$('#tyl_i_expcol_'+pid).attr('src', $('#tyl_i_expcol_'+pid).attr('src').replace("collapse", "collapse_collapsed"));
						$('#tyl_i_expcol_'+pid).attr('alt', "[+]");
						$('#tyl_a_expcol_'+pid).attr('title', "[+]");
					}
				}
			}
		}
		
/*		if(this.spinner)
		{
			this.spinner.destroy();
			this.spinner = '';
		}*/
		document.body.style.cursor = 'default';
	},
	
	del: function(pid)
	{
		if(use_xmlhttprequest == 1 && tylEnabled == 1)
		{
			if(tylUser == 0)
			{
				return true;
			}
			//this.spinner = new ActivityIndicator("body", {image: imagepath + "/spinner_big.gif"});
			$.ajax('thankyoulike.php?ajax=1&action=del&pid='+pid+'&my_post_key='+my_post_key,
			{
				type: 'POST'
			}).done(function(data)
			{
				thankyoulike.delDone(data, pid);
			});
			//new Ajax.Request('thankyoulike.php?ajax=1&action=del&pid='+pid+'&my_post_key='+my_post_key, {method: 'post', onComplete: function(request) { thankyoulike.delDone(request, pid); }});
			document.body.style.cursor = 'wait';
			return false;
		}
		else
		{
			return true;
		}
	},
	
	delDone: function(data, pid)
	{
		if(typeof data == 'string' && data.match(/<error>([^<]*)<\/error>/))
		{
			message = data.match(/<error>([^<]*)<\/error>/);

			if(!message[1])
			{
				message[1] = "An unknown error occurred.";
			}

			/*if(this.spinner)
			{
				this.spinner.destroy();
				this.spinner = '';
			}*/
			document.body.style.cursor = 'default';
			alert(message[1]);
		}
		else
		{
			tylVisible = 2;
			if(tylCollapsible == 1 && $("#tyl_"+pid).css('display') != "none")
			{	
				if($('datatyl_data_'+pid).is(':visible'))
				{
					tylVisible = 1;
				}
				else
				{
					tylVisible = 0;
				}
			}
			$("#tyl_"+pid).html(data.tylData);
			$("#tyl_"+pid).show();
			$("#tyl_btn_"+pid).html(data.tylButton);
			if(tylCollapsible == 1)
			{
				if(tylVisible != 2)
				{
					if(tylVisible == 1)
					{
						$('#tyl_data_'+pid).show();
						$('#tyl_title_collapsed_'+pid).hide();
						$('#tyl_title_'+pid).show();
						$('#tyl_i_expcol_'+pid).attr('src', $('#tyl_i_expcol_'+pid).attr('src').replace("collapse_collapsed", "collapse"));
						$('#tyl_i_expcol_'+pid).attr('alt', "[-]");
						$('#tyl_a_expcol_'+pid).attr('title', "[-]");
					}
					else
					{
						$('#tyl_data_'+pid).hide();
						$('#tyl_title_'+pid).hide();
						$('#tyl_title_collapsed_'+pid).show();
						$('#tyl_i_expcol_'+pid).attr('src', $('#tyl_i_expcol_'+pid).attr('src').replace("collapse", "collapse_collapsed"));
						$('#tyl_i_expcol_'+pid).attr('alt', "[+]");
						$('#tyl_a_expcol_'+pid).attr('title', "[+]");
					}
				}
			}
		}
		
/*		if(this.spinner)
		{
			this.spinner.destroy();
			this.spinner = '';
		}*/
		document.body.style.cursor = 'default';
	}
};	
$(document).ready(thankyoulike.init);

change "thankyoulike_button_add" template to this code:
<div id="tyl_btn_{$post['pid']}" class="postbit_buttons inline"><a href="thankyoulike.php?action=add&amp;pid={$post['pid']}&amp;my_post_key={$mybb->post_code}" onclick="return thankyoulike.add({$post['pid']}, {$post['tid']});" class="postbit_thank_add"><span>+ Thanks</span></a></div>

and change "thankyoulike_button_del" template to this code:
<div id="tyl_btn_{$post['pid']}" class="postbit_buttons inline"><a href="thankyoulike.php?action=del&amp;pid={$post['pid']}&amp;my_post_key={$mybb->post_code}" onclick="return thankyoulike.del({$post['pid']}, {$post['tid']});" class="postbit_thank_del" title="{$lang->del_tyl}"><span>- Remove thanks </span></a></div>



RE: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011) - [email protected] - 2014-09-07

It. still doesn't work with that. When i click on the like button, it does the reload icon instead of the mouse, + it doesnt show up that i liked it.