Advertisement:

Author Topic: Awards mod - making awards stack  (Read 917 times)

Offline Gabriel91

  • Semi-Newbie
  • *
  • Posts: 17
Awards mod - making awards stack
« on: January 01, 2018, 04:03:05 AM »
Hi!

I want to make the awards stack; when assigning the same award to a user the award count will increase (in a tooltip or graphical, if possible). Usually, re-assigning some award will replace it. I want to be visible that some user got that award multiple times.

Here is the mod: https://github.com/Spuds/SMF-Member-Awards [nofollow]

Can someone, pls,  provide me the lines that I need to edit in order to make that stack happen?
Ty!

Offline Gabriel91

  • Semi-Newbie
  • *
  • Posts: 17
Re: Awards mod - making awards stack
« Reply #1 on: January 04, 2018, 06:28:37 AM »
Any tip? Can it be done? or can you direct me to a mod for awards that have this feature? Pls

Offline DreadPirateRoberts

  • Newbie
  • *
  • Posts: 4
Re: Awards mod - making awards stack
« Reply #2 on: November 27, 2019, 01:54:25 AM »
Yes I have a soultion to this in the AwardsManage.php

find this line and erase it
   
Quote
// First the removals ... Members can only have one active award of each auto 'type'
   foreach ($members as $member => $dummy)
   {
      if (!empty($remove[$member]))
         $smcFunc['db_query']('', '
            DELETE FROM {db_prefix}awards_members
            WHERE id_award IN ({array_int:award_list})
               AND id_member = {int:id_member}',
            array(
               'id_member' => $member,
               'award_list' => $remove[$member],
            )
         );
   }
But you need to remove all of your awards and add them back slowly so the smf software will read who has the awards and if they met the requirements or it will not work.
I have it on my site if you want to see what it looks like agoraroad.com/macforum