Thread Rating:
  • 12 Vote(s) - 4.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Thank You/Like System v3.3.2 + MyAlerts support
Hi, I needed to make thankyoulike clicks to also add reputation points, so I came up with the following code which I wanted to share in case someone else needs it:


    // Build array of reputation data.
    $reputation = array(
	"uid" => intval($post['uid']),
	"adduid" => $mybb->user['uid'],
	"pid" => intval($post['pid']),
	"reputation" => 1,
	"dateline" => TIME_NOW,
	"comments" => ''
    );

    // Insert a new reputation
    $db->insert_query("reputation", $reputation);
    // Update user
    $db->write_query("UPDATE ".TABLE_PREFIX."users SET reputation=reputation+1 WHERE uid=".intval($post['uid']));

I add it in public_html/thankyoulike.php file just above this line:

// Update tyl count in posts and threads and users and total


Works perfectly (in tapatalk as well) but needs to be added after every update of the Thank you / Like plugin. If there is a better way to do it, I will be grateful to know.
Reply


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

Forum Jump:


Users browsing this thread: 1 Guest(s)