Jump to content

Trophies and Medals - Supporttopic


Recommended Posts

On 11/30/2017 at 1:32 PM, evandixon said:

I set the Notification Sender to a specific user, but when Trophies are awarded, the resulting notifications show as being from the user with ID 1. Medal notifications are working properly. I'd appreciate assistance in getting this working.

Fixed this myself with a manual code change, by setting ~/extensions/core/Notifications/TrophyAndMedal.php line 58 to be equal to line 69.

Old value:

'author'		=>  \IPS\Member::load( 1 ),			// [Optional] The user whose photo should be displayed for this notification

New value:

'author'		=>  \IPS\Member::load( \IPS\Settings::i()->trophy_notification_sender ),			// [Optional] The user whose photo should be displayed for this notification

 

Link to comment

I found and fixed a race condition that results in trophies being awarded to members who do not meet the criteria. The issue is in /sources/Trophy/Trophy.php on line 193, inside the function formatFormValues.

#$this->crdata = $data;
$values['crdata'] = $data;
$this->faicon = $values['faicon'];
if ( !$this->id )
        {
             $this->save();
        }
// ...
return $values

The problem is that `$this->crdata` is not being set before `$this->save()` is called. IPS will later use the results of this function (`$values`) to update the model, but not before an active background task can assign the trophy.

The simplest fix is to simply uncomment the line of code on line 193. I have not encountered this issue after applying this fix, but because of the way race conditions work, that doesn't necessarily prove anything.

Link to comment
On 5.12.2017 at 11:48 PM, evandixon said:

I found and fixed a race condition that results in trophies being awarded to members who do not meet the criteria. The issue is in /sources/Trophy/Trophy.php on line 193, inside the function formatFormValues.


#$this->crdata = $data;
$values['crdata'] = $data;
$this->faicon = $values['faicon'];
if ( !$this->id )
        {
             $this->save();
        }
// ...
return $values

The problem is that `$this->crdata` is not being set before `$this->save()` is called. IPS will later use the results of this function (`$values`) to update the model, but not before an active background task can assign the trophy.

The simplest fix is to simply uncomment the line of code on line 193. I have not encountered this issue after applying this fix, but because of the way race conditions work, that doesn't necessarily prove anything.

Hm, are you sure?

This was indeed an issue in old releases, but should be fixed in the recent one.
Anyway, thanks for the report, I'll review this today.

Edited by Fosters
Link to comment

I deleted a category of trophies with it's contents....

Caos was unleashed.

It doesn't delete the trophies from the users... and naturally, when it attempts to get info about things that don't exist... yeah.

I fixed my site, but a word of warning to anyone else.

Edited by Cyrem
Link to comment
6 hours ago, Cyrem said:

I deleted a category of trophies with it's contents....

Caos was unleashed.

It doesn't delete the trophies from the users... and naturally, when it attempts to get info about things that don't exist... yeah.

I fixed my site, but a word of warning to anyone else.

Thanks, will take a look at this later today.
Just to clarifym You got this screen where you choose to delete the children, correct? And the trophies were deleted, but the member associations not?

del.thumb.png.e863b8c9a9ce3474994b412239d6d173.png

Link to comment
On 2.12.2017 at 9:46 PM, evandixon said:

Fixed this myself with a manual code change, by setting ~/extensions/core/Notifications/TrophyAndMedal.php line 58 to be equal to line 69.

Old value:


'author'		=>  \IPS\Member::load( 1 ),			// [Optional] The user whose photo should be displayed for this notification

New value:


'author'		=>  \IPS\Member::load( \IPS\Settings::i()->trophy_notification_sender ),			// [Optional] The user whose photo should be displayed for this notification

 

thanks, fixed for the next release. I was sure that we fixed this already, but it's indeed still wrong in the recent release.

Link to comment
20 hours ago, micronx said:

hello @Fosters,

i'm thinking to change from iawards to your application.

Can this display a category in the bottom post or this only shows in 1 location - postbit(user panel) ? Iawards has 2 location option to show the awards.

Thanks,

It's showing them only in the member bit and on a members profile, but we're open to suggestions:)

Link to comment
On 12/14/2017 at 4:38 AM, micronx said:

hello @Fosters,

i'm thinking to change from iawards to your application.

Can this display a category in the bottom post or this only shows in 1 location - postbit(user panel) ? Iawards has 2 location option to show the awards.

Thanks,

Do you mean the signature area?

A major problem with the signature area is that it uses up a lot of space per post.  On mobile, that signficiantly reduces screen real estate.  Furthermore, many admins disable signatures to begin with since they don't really serve a compelling purpose anymore in modern forums with profiles, hovercards, avatars, and other ways of connecting with users.  

Link to comment

 

Trophies and Medals is one of the most popular applications in the IPS Marketplace.  And it's no wonder - every community wants and needs to reward users!  

We wanted to provide a set of links to free icons, so you can go wild while designing your own trophies and medals.  Have fun and let us know what fun awards you come up with!  

Our favorite link is Smashing Magazine's 55 icon sets, which covers a variety of unusual and fun icons including Horror, Pacman, Toys, Dress Up, Royal, and Soccer.  There's something in there for everyone!

 

Link to comment
On 16.12.2017 at 3:33 AM, Volstate said:

Did the Iawards conversion tool make it into this yet? I didn't see it on the change log.

 

10 hours ago, Blisslandia said:

I don't want guests to see the trophy info if they don't have an account. How can it be removed from the guest activity feed?

Screen Shot 2017-12-19 at 1.12.47 AM.png

That's not possible, you'll have to disable it global

Link to comment
13 hours ago, Fosters said:

It would require custom coding

 

Would love this feature to be in a future release - being able to apply permissions to this so that guests can't see the activity anywhere. It's important for a private community to have control over privacy that the public can not see.

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...