By Captain Tango on Sunday, 27 July 2014
Replies 5
Likes 0
Views 1.2K
Votes 0
Thought I would share a little hack that I have been using on my site for a few months now.
What it does: A new way of assigning badges to a user.

First thing you will need to do is edit Site\controllers\photo.php
find
$photo->assignBadge( 'photos.tag' , $my->id );


add after
$badge  = Foundry::badges();
$badge->log( 'com_easysocial' , $tag->uid , $photo->user_id , JText::_( 'Tagged with a Badge' ) );


Next you will need to create some new user profiles in the backend for the badges you would like to give out. Then log into those profiles, and send friend requests to yourself, and anyone else you would like to have the ability to give out this badge.

Finally make and install the badge file itself. Where 'command' is the user id for the badge profile you just created.
[
{
"title" : "Mirror Universe",
"alias" : "selfie",
"description" : "Took a picture of their 'evil' side.",
"howto" : "Take a sexy mirror selfie",
"command" : "810",
"extension" : "com_easysocial",
"avatar" : "media/com_easysocial/badges/selfie.png",
"frequency" : 1
}
]



Hope some of you find this as useful as I have found it on my site.
Nice, thanks for sharing this!
·
Sunday, 27 July 2014 01:28
·
0 Likes
·
0 Votes
·
0 Comments
·
While I am thinking about it. This hack can be even more effective with this mod.
http://www.nordmograph.com/extensions/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=90&virtuemart_category_id=15&Itemid=58
As you could set it to automatically friend your site admins and moderators.
·
Sunday, 27 July 2014 01:37
·
0 Likes
·
0 Votes
·
0 Comments
·
Since that app is intercepting "new registrations" you could probably ride on that app if you have that app Perhaps duplicating that app for "badges"?
·
Sunday, 27 July 2014 02:04
·
0 Likes
·
0 Votes
·
0 Comments
·
I asked for permission to use his code as a base for a modified version that would work for my app system, but I never got an answer, so I assume that was a no.
·
Sunday, 27 July 2014 02:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Ah, I see. Maybe you should try writing to him again in his forums?
·
Sunday, 27 July 2014 12:28
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post