Thread Rating:
  • 13 Vote(s) - 4.08 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Thank You/Like System v3.3.7 + MyAlerts support
(2020-07-19, 01:47 AM)Jisso Wrote: Hello, just a curiosity, how can I show you two colors as in the reputation

example: if you have 0 likes a color and if it happens to 1 or more other color

This isn't built in to the plugin but with a little hacking you can make it happen.

It depends on whether you want to change a post's colour for when the post itself has at least one like, or for when the post's author has had at least one like for any post.

In the first case, you could add this code to the end of the thankyoulike_postbit() function in inc/plugins/thankyoulike.php - that is, just before the return:

	if (!$post['styleclass']) {
		if($post['tyl_pnumtyls'] > 0)
		{
			$post['styleclass'] = ' liked';
		}
	}

In the second case, you could instead add this code to that same location:

	if (!$post['styleclass']) {
		$post_user = get_user($post['uid']);
		if($post_user['tyl_unumrcvtyls'] > 0)
		{
			$post['styleclass'] = ' liked';
		}
	}

Then you can go to your ACP and navigate to Templates & Themes => Themes and add styling for .liked to the thankyoulike.css stylesheet for whichever themes you want this to work on.
Reply


Messages In This Thread
RE: Thank You/Like System v1.9.1 - by OMID_HXC - 2015-04-06, 08:26 PM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-06, 08:34 PM
RE: Thank You/Like System v1.9.1 - by expat - 2015-04-07, 05:57 AM
RE: Thank You/Like System v1.9.1 - by Whiteneo - 2015-04-07, 09:03 AM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-07, 03:17 PM
RE: Thank You/Like System v1.9.1 - by DrXotick - 2015-04-08, 12:01 PM
RE: Thank You/Like System v1.9.1 - by meetdilip - 2015-04-08, 12:50 PM
RE: Thank You/Like System v1.9.1 - by Sazze - 2015-04-08, 12:50 PM
RE: Thank You/Like System v1.9.1 - by bekircem - 2015-04-08, 01:22 PM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-08, 02:33 PM
RE: Thank You/Like System v1.9.1 - by bekircem - 2015-04-08, 03:56 PM
RE: Thank You/Like System v1.9.1 - by DrXotick - 2015-04-08, 06:25 PM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-08, 06:28 PM
RE: Thank You/Like System v1.9.1 - by Supryk - 2015-04-08, 07:38 PM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-08, 07:40 PM
RE: Thank You/Like System v1.9.1 - by bekircem - 2015-04-08, 09:39 PM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-08, 09:42 PM
RE: Thank You/Like System v1.9.1 - by bekircem - 2015-04-08, 09:57 PM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-09, 06:54 AM
RE: Thank You/Like System v1.9.1 - by bekircem - 2015-04-09, 11:31 AM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-09, 03:17 PM
RE: Thank You/Like System v1.9.1 - by DrXotick - 2015-04-09, 06:54 PM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-09, 09:16 PM
RE: Thank You/Like System v1.9.1 - by Whiteneo - 2015-04-10, 06:58 AM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-10, 02:10 PM
RE: Thank You/Like System v1.9.1 - by DrXotick - 2015-04-10, 08:52 AM
RE: Thank You/Like System v1.9.1 - by Whiteneo - 2015-04-12, 02:42 AM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-12, 09:52 AM
RE: Thank You/Like System v1.9.1 - by ytt - 2015-04-13, 04:10 PM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-13, 04:33 PM
RE: Thank You/Like System v1.9.1 - by ytt - 2015-04-13, 04:34 PM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-13, 04:37 PM
RE: Thank You/Like System v1.9.1 - by ytt - 2015-04-13, 04:41 PM
RE: Thank You/Like System v1.9.1 - by Gershon - 2015-04-13, 05:14 PM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-13, 07:21 PM
RE: Thank You/Like System v1.9.1 - by ytt - 2015-04-13, 07:42 PM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-13, 07:44 PM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-14, 06:04 AM
RE: Thank You/Like System v1.9.1 - by Gershon - 2015-04-14, 03:49 PM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-14, 03:54 PM
RE: Thank You/Like System v1.9.1 - by andrewjs18 - 2015-04-15, 07:01 AM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-15, 08:54 AM
RE: Thank You/Like System v1.9.1 - by andrewjs18 - 2015-04-15, 04:49 PM
RE: Thank You/Like System v1.9.1 - by Gershon - 2015-04-15, 04:48 PM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-15, 05:22 PM
RE: Thank You/Like System v1.9.1 - by Whiteneo - 2015-04-15, 10:33 PM
RE: Thank You/Like System v1.9.1 - by tzameti13 - 2015-04-16, 05:28 AM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-16, 07:16 AM
RE: Thank You/Like System v1.9.1 - by tzameti13 - 2015-04-16, 07:23 AM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-16, 07:25 AM
RE: Thank You/Like System v1.9.1 - by tzameti13 - 2015-04-16, 07:43 AM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-16, 08:18 AM
RE: Thank You/Like System v1.9.1 - by numygroup - 2015-04-16, 11:30 AM
RE: Thank You/Like System v1.9.1 - by jesuite - 2015-04-17, 03:16 PM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-17, 03:45 PM
RE: Thank You/Like System v1.9.1 - by jesuite - 2015-04-17, 05:18 PM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-18, 02:12 PM
RE: Thank You/Like System v1.9.1 - by jesuite - 2015-04-18, 03:16 PM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-18, 03:21 PM
RE: Thank You/Like System v1.9.1 - by Eldenroot - 2015-04-19, 05:53 PM
RE: Thank You/Like System v1.9.11 + MyAlerts support - by Bradley Varol - 2016-05-20, 07:10 AM
RE: Thank You/Like System v1.9.11 + MyAlerts support - by Bradley Varol - 2016-05-20, 04:57 PM
RE: Thank You/Like System v1.9.11 + MyAlerts support - by Bradley Varol - 2016-05-21, 06:07 PM
RE: Thank You/Like System v3.3.6 + MyAlerts support - by Laird - 2020-07-19, 07:19 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)