AI Assistant
Notifications
Clear all

[Solved] Can we assign badges to certain member based on his membership

3 Posts
2 Users
0 Reactions
2,090 Views
Posts: 1
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sahib)
New Member
Joined: 3 years ago
[#11538]

I don't want to assign badges to all users based on his points. Also dont want to show points. I want to assign badge to only users who are having Premium membership. Is there is any hooks available for customization inside wpDiscuz - myCRED Integration for developers.

 

Thanks

Sahib Khan


2 Replies
Astghik
Posts: 6645
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@astgh)
Illustrious Member
Joined: 8 years ago

Hi Sahib Khan,

Also dont want to show points.

You can disable it in the Dashboard > Points > Hooks > admin page, just edit the "wpDiscuz Integration" section. Please watch this small video instraction:  https://www.screencast.com/t/BqkfMmeS

I want to assign badge to only users who are having Premium membership. Is there is any hooks available for customization inside wpDiscuz - myCRED Integration for developers.

I'll ask the developers and let you know soon. 


1 Reply
Astghik
Admin
(@astgh)
Joined: 8 years ago

Illustrious Member
Posts: 6645
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

I'll ask the developers and let you know soon. 

You should make the customization using the MyCread plugin mycred_the_badge hook. The example is provided below: 

add_filter("mycred_the_badge", function($image, $badge_id, $badge, $userID){
    if($userID == 4){
        return $image;
    }
    return '';
},15,4);

You should customize the code as it's necessary in your case. 


Share:
Scroll to top