MyBB Community Forums

Full Version: [1.4.x/1.6.x] Thank You/Like System v1.5 (Updated: 10/26/2011)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Don't remove any parts of plugin templates, because there could be a deinstalling problem.

You can remove the original button icons and add custom "Font Awesome" icons with css changes in g33k_thankyoulike.css

Change:
a.add_tyl_button span{
background-image: url(images/thankyoulike/thx_add.png);
}

a.del_tyl_button span{
background-image: url(images/thankyoulike/thx_del.png);
}

to:
a.add_tyl_button span{
background-image: none;
}

a.del_tyl_button span{
background-image: none;
}

a.add_tyl_button span:before{
content: "\f087";
}

a.del_tyl_button span:before{
content: "\f088";
}
actually i tried as you mention before , but it shows extra space in button , you may see attachment 

[attachment=33648]
OK...I see the problem - try this in css file:
a.add_tyl_button span{
background-image: none;
padding-left: 0;
}

a.del_tyl_button span{
background-image: none;
padding-left: 0;
}

a.add_tyl_button span:before{
content: "\f087";
margin-right: 5px;
}

a.del_tyl_button span:before{
content: "\f088";
margin-right: 5px;
}
thank you very much it just work fine Smile now everything seems ok

one question , for example i want few forums first post only like/thanks , but other few forums with all post like /thanks option , is there any way that i can do this ?
(2015-01-30, 09:36 PM)mujeebdgk Wrote: [ -> ]thank you very much it just work fine Smile  now everything seems ok


one question , for example i want few forums first post only like/thanks , but other few forums with all post like /thanks option , is there any way that i can do this ?

No, you can just use likes or thank you system Smile
may be i didn't clear my point .

for example i have two forums A & B , in A i want like button for only first post , but in forum B i want like buttons for all posts Smile

is it possible ?
I understood, no it is not possible. But feel free to make any changes and push your code into github
(2015-01-31, 02:38 PM)mujeebdgk Wrote: [ -> ]may be i didn't clear my point .

for example i have two forums A & B , in A i want like button for only first post , but in forum B i want like buttons for all posts Smile

is it possible ?

It's possible with some changes in plugin main php file ony.

If you want do this, open /inc/plugins/thankyoulike.php to edit.

Search for (line #771):
else if(($mybb->settings[$prefix.'firstall'] == "first" && $thread['firstpost'] == $post['pid']) || $mybb->settings[$prefix.'firstall'] == "all")
{
	// Same as above but show add button
	eval("\$post['button_tyl'] = \"".$templates->get("thankyoulike_button_add")."\";");
}

Replace this whole part with:
else if(($mybb->settings[$prefix.'firstall'] == "first" && $thread['firstpost'] == $post['pid']) || $mybb->settings[$prefix.'firstall'] == "all")
{
	if ((my_strpos("FIDsXXX", $post['fid']) !== false) && $thread['firstpost'] != $post['pid'])
	{
		$post['button_tyl'] = '';
	}
	else
	{
		// Same as above but show add button
		eval("\$post['button_tyl'] = \"".$templates->get("thankyoulike_button_add")."\";");
	}
}

Replace FIDsXXX in "" with the forum id (separeted by comma) where you want add the TYL button only in first post.
@SvePu - ok, what about to add this as a new feature into 1.8.2?
Yes, I could add it as a settings option for the next version,