[bd] Medal

[bd] Medal 1.5.5b

No permission to download
@xfrocks Custom location appears to no longer function in the new version...

Selecting "manual position" in options, and adding:

PHP:
<xen:include template="bdmedal_message_medals_manual" />
into the message_user_info template isn't working anymore for me?
 
@xfrocks Custom location appears to no longer function in the new version...

Selecting "manual position" in options, and adding:

PHP:
<xen:include template="bdmedal_message_medals_manual" />
into the message_user_info template isn't working anymore for me?
Please try with

Code:
<xen:include template="bdmedal_message_medals" />

It should work.
 
@xfrocks is there any reason you don't use event hints?

With the following hints;
Code:
    <listener event_id="load_class" execute_order="10" callback_class="bdMedal_Listener" callback_method="load_class" active="1" hint="XenForo_ControllerAdmin_User" description=""/>
    <listener event_id="load_class" execute_order="10" callback_class="bdMedal_Listener" callback_method="load_class" active="1" hint="XenForo_ControllerPublic_Account" description=""/>
    <listener event_id="load_class" execute_order="10" callback_class="bdMedal_Listener" callback_method="load_class" active="1" hint="XenForo_ControllerPublic_Member" description=""/>
    <listener event_id="load_class" execute_order="10" callback_class="bdMedal_Listener" callback_method="load_class" active="1" hint="XenForo_ControllerPublic_Help" description=""/>
    <listener event_id="load_class" execute_order="10" callback_class="bdMedal_Listener" callback_method="load_class" active="1" hint="XenForo_ControllerPublic_Thread" description=""/>
    <listener event_id="load_class" execute_order="10" callback_class="bdMedal_Listener" callback_method="load_class" active="1" hint="XenForo_Model_Import" description=""/>

And then your load_class function can be just simplified to:
Code:
    public static function load_class($class, array &$extend)
    {
        $extend[] = str_replace('XenForo_', 'bdMedal_Extend_', $class);
    }
 
Last edited:
@xfrocks is there any reason you don't use event hints?

With the following hints;
Code:
    <listener event_id="load_class" execute_order="10" callback_class="bdMedal_Listener" callback_method="load_class" active="1" hint="XenForo_ControllerAdmin_User" description=""/>
    <listener event_id="load_class" execute_order="10" callback_class="bdMedal_Listener" callback_method="load_class" active="1" hint="XenForo_ControllerPublic_Account" description=""/>
    <listener event_id="load_class" execute_order="10" callback_class="bdMedal_Listener" callback_method="load_class" active="1" hint="XenForo_ControllerPublic_Member" description=""/>
    <listener event_id="load_class" execute_order="10" callback_class="bdMedal_Listener" callback_method="load_class" active="1" hint="XenForo_ControllerPublic_Help" description=""/>
    <listener event_id="load_class" execute_order="10" callback_class="bdMedal_Listener" callback_method="load_class" active="1" hint="XenForo_ControllerPublic_Thread" description=""/>
    <listener event_id="load_class" execute_order="10" callback_class="bdMedal_Listener" callback_method="load_class" active="1" hint="XenForo_Model_Import" description=""/>

And then your load_class function can be just simplified to:
Code:
    public static function load_class($class, array &$extend)
    {
        $extend[] = str_replace('XenForo_', 'bdMedal_Extend_', $class);
    }
Mostly out of habit :)
 
If the user is not have any medal, Trophies tab contain trophies from xenforo system.

If the user have any medal, trophies tab contain medal from bd and awarded medal tab contain trophies from xenforo.
 
Now that there is easy to use front end awarding, would it be possible to have the option to un-award a medal from the front end?
 
  • Like
Reactions: rdn
Hi, I know this might be a newbie question but I have no idea whatelse to do.
When I try to install this addon, I keep getting that old error "The files associated with this add-on could not be found. Please upload them and try again."
And yes, I am putting the files in the correct folders. I tested installing another addon, and everthing went well. But the test addon didn't have /js folder, just /library.
Could someone help me? Thanks!
 
@xfrocks I'm using manual position, what's the best way to hide medals on mobile devices?

1.png
 
UPDATE to the above:

When I click the pulldown next to the username that has the medal "Reverse Award", I get the error above.

If instead I click the "X" next the username, then click the "Reverse Award" in the popup modal, I get the error:

"This medal has not been awarded to anybody yet." If I refresh the page, the award is gone.

So, it seems like the "Reverse Award" through the pulldown doesn't work, but the "reverse award" process using the "X" works, but still throws an error.

I have the same issue. Despite the fact I can revoke awards using the 'X'. Anyone found a solution for this?


Interestingly the pull-down menue and the 'X' use 2 different ID's. Just look at the end of following links.

Reverse Award pull-down menue:
/admin.php?medal-medals/11/reverse-award&user_id=1996
'X' next to the pull down menue:
/admin.php?medal-medals/11/reverse-award&awarded_id=81
 
Top Bottom