[bd] Medal

[bd] Medal 1.5.5b

No permission to download
Seems I found the problem.

Some settings can be found in AdminCP at: Style-Properties -> Messege Elements
upload_2014-5-27_18-10-24.webp

But there are also settings that can be made in AdminCP at: Style-Properties -> Member Profile Page (Maybe from an older version). It seems that these settings have no effect or have a conflict with the other settings as above.
upload_2014-5-27_18-13-34.webp
 
Hey @xfrocks
Not a bug per se, but on line 130 of DataWriter/Medal.php you have

Code:
$success = @rename($tempFile, $filePath);

would you mind replacing with

Code:
$success = XenForo_Helper_File::safeRename($tempFile, $filePath);

This will make it work with S3.
 
Hey @xfrocks
Not a bug per se, but on line 130 of DataWriter/Medal.php you have

Code:
$success = @rename($tempFile, $filePath);

would you mind replacing with

Code:
$success = XenForo_Helper_File::safeRename($tempFile, $filePath);

This will make it work with S3.
S3 how?
 
We use the php wrapper function of Zend to regsiter S3. The following gets put into our index.php/admin.php

Code:
require_once 'Zend/Service/Amazon/S3.php';
$s3 = new Zend_Service_Amazon_S3('aws_key', 'aws_secret');
$s3->registerStreamWrapper("s3");

And then we define relevant external data paths in config, so that Xenforo uses S3 for external data with no other modifications needed, hwoever "rename" desn't work across wrappers, hence why the use of 'rename' was replaced with "XenForo_Helper_File::safeRename" As an example, XF had 'rename' replaced with "XenForo_Helper_File::safeRename" in the upgrade from 1.2.x to 1.3.x in XenForo_Model_Avatar::_writeAvatar
 
We use the php wrapper function of Zend to regsiter S3. The following gets put into our index.php/admin.php

Code:
require_once 'Zend/Service/Amazon/S3.php';
$s3 = new Zend_Service_Amazon_S3('aws_key', 'aws_secret');
$s3->registerStreamWrapper("s3");

And then we define relevant external data paths in config, so that Xenforo uses S3 for external data with no other modifications needed, hwoever "rename" desn't work across wrappers, hence why the use of 'rename' was replaced with "XenForo_Helper_File::safeRename" As an example, XF had 'rename' replaced with "XenForo_Helper_File::safeRename" in the upgrade from 1.2.x to 1.3.x in XenForo_Model_Avatar::_writeAvatar
Nice idea. However, I would suggest you to consider using an add-on from us: [bd] Data Storage which does basically what you need + offer caching for remote file stats so your server won't have to make S3 call every time a file is checked etc. Regarding the rename method, it will be updated in future version. Please do a manual edit for now.
 
Okay I'm confused, how do I award a medal to someone? I've been trying to figure out how to do it for an hour.

ETA: Ah! Nevermind, I finally figured out that it's by the Controls dropdown, but it might be worth pointing that out specifically. :p
 
Last edited:
@xfrocks users are able to arrange medals in the order they choose through their profile?
How do I prevent this? If not possible please add an option to prevent this and revert back to proper order.
 
@xfrocks users are able to arrange medals in the order they choose through their profile?
How do I prevent this? If not possible please add an option to prevent this and revert back to proper order.
In the addon options page you can order by date added, medal id, etc. Just select the one you want.
 
Having problems installing this on a test forum

Configure medals in AdminCP > Applications > Medal System
4. Configure position to show medals (post) in AdminCP > Home > Options > Messages

None of these options are listed for me? Under options there is no "Messages"

When i try search for "Medal" in admincp i click it and it says:

Error
You do not have permission to view this page or perform this action.
 
I just installed this addon and am super excited about it!

I just ran into an odd problem:

I awarded the 3 default medals to a member, and they all displayed properly.

I then changed the images and sort-order of two of the medals. They all display properly on the postbit (under avatar), but when I'm in the medal CP I see this:

upload_2014-6-14_8-58-35.webp

The two medals I edited show zero members awarded.... but I can still see them in the "Esquire" member's postbit.

I ran the medal cache rebuild, but this didn't solve the problem.

So, why aren't the medals showing for this member in the CP, but they show up for the member in their postbit?
 
Update: I just tested and reordered the 3rd medal (Medal 2 in the pic above) from position 10 to 9, and after saving the position it too shows as zero members awarded.

Changing the order back to 10 from 9 did not solve the problem.

Any ideas why changing the medal would erase my ability to manage the users with the medal?
 
Another update:

Adding another member to the same medal refreshed the awards list so all awardees are now shown. So, that's at least a workaround.

... but, when I went to remove (reverse?) an award by clicking the "x" to the right of the award, I got this error:

upload_2014-6-14_9-26-12.webp

When I go into the "Controls" pulldown I get the option to reverse the award. Clicking on that I get the page that says "Confirm Reversal of Award"

When I do that, I get this error:

"Error
The requested user could not be found."
 
Another update:

Adding another member to the same medal refreshed the awards list so all awardees are now shown. So, that's at least a workaround.

... but, when I went to remove (reverse?) an award by clicking the "x" to the right of the award, I got this error:

View attachment 75783

When I go into the "Controls" pulldown I get the option to reverse the award. Clicking on that I get the page that says "Confirm Reversal of Award"

When I do that, I get this error:

"Error
The requested user could not be found."
Looks like a bug. I will check and get back to you.
 
Looks like a bug. I will check and get back to you.

Thank you @xfrocks ! Let me know if you need any other information or anything. It's really odd that I can't remove medals from any of the accounts no matter what I do (I'm still on xF 1.3.0 in case that's potentially an issue)
 
Thank you @xfrocks ! Let me know if you need any other information or anything. It's really odd that I can't remove medals from any of the accounts no matter what I do (I'm still on xF 1.3.0 in case that's potentially an issue)
I haven't been able to reproduce your issue but I can think of one issue with old files. Please try re-uploading the files (download the zip package again from xenforo.com) and do that again.
 
Top Bottom