UPDATES EasyBlog 6.0.11 Released! Update to the latest version now!

Helpdesk

Your Time
Our Time
Response Time
24 — 48 hours
We strive to provide the fastest ever response possible. However, we are not super beings.

Allow at least 24 — 48 hours
  Support is online
Our support specialists is available now. We will attend to you as soon as we can.
  Support is online

Creation of new badges

Todd Hunter · ·
12:30 PM Tuesday, 21 November 2017
High
I am creating new badges in my easysocial site. In my other thread "
How to create a badge for choosing to attend events" I had asked for assistance on carrying out the function. Everything was successful. This was the post from Arlex Wong

------------------
Based on what my colleague mentioned that is correct, one of your `frequency` value is not enter correct the format then causing this issue.

You can also can refer my sample .badge file from my attached file below, you can extract it and check those command you have to put different and match with following the coding.

And that controller function you have look for this file in order to implement your new badge.

JoomlaFolder/administrator/components/com_easysocial/tables/eventguest.php

Please refer on my attached screenshot and see which line of code you suppose to add in.

/ Assign badge for the user
$badge = ES::badges();
$badge->log('com_easysocial', 'event.attend', $this->uid, JText::_('add your message here'));
$badge->log('com_easysocial', 'events.going', $this->uid, JText::_('add your message here'));
$badge->log('com_easysocial', 'events.goingsuper', $this->uid, JText::_('add your message here'));
$badge->log('com_easysocial', 'events.goingmarvellous', $this->uid, JText::_('add your message here'));
$badge->log('com_easysocial', 'events.goingmaster', $this->uid, JText::_('add your message here'));
$badge->log('com_easysocial', 'events.goingamazing', $this->uid, JText::_('add your message here'));
$badge->log('com_easysocial', 'events.goingstupendous', $this->uid, JText::_('add your message here'));
-----------------------
I am now looking to do the same thing for the command control friends.create to make a series of badges for making a number of friends.
I successfully created and installed the following:
[
{
"title" : "Acquaintance",
"description" : "Badge for Making 5 Friends",
"howto" : "To unlock this badge, you need to have made 5 friends.",
"alias" : "Acquaintance",
"extension" : "com_easysocial",
"command" : "friends.create5",
"avatar" : "media/com_easysocial/badges/acquaintance.png",
"frequency" : 5
},
{
"title" : "Friend",
"description" : "Badge for Making 10 Friends",
"howto" : "To unlock this badge, you need to have made 10 friends.",
"alias" : "Friend",
"extension" : "com_easysocial",
"command" : "friends.create10",
"avatar" : "media/com_easysocial/badges/friend.png",
"frequency" : 10
},
{
"title" : "Pal",
"description" : "Badge for Making 20 Friends",
"howto" : "To unlock this badge, you need to have made 20 friends.",
"alias" : "Pal",
"extension" : "com_easysocial",
"command" : "friends.create20",
"avatar" : "media/com_easysocial/badges/pal.png",
"frequency" : 20
},
{
"title" : "Mate",
"description" : "Badge for Making 30 Friends",
"howto" : "To unlock this badge, you need to have made 30 friends.",
"alias" : "Mate",
"extension" : "com_easysocial",
"command" : "friends.create30",
"avatar" : "media/com_easysocial/badges/mate.png",
"frequency" : 30
},
{
"title" : "Familiar",
"description" : "Badge for Making 40 Friends",
"howto" : "To unlock this badge, you need to have made 40 friends.",
"alias" : "Familiar",
"extension" : "com_easysocial",
"command" : "friends.create40",
"avatar" : "media/com_easysocial/badges/familiar.png",
"frequency" : 40
},
{
"title" : "Well Known",
"description" : "Badge for Making 50 Friends",
"howto" : "To unlock this badge, you need to have made 50 friends.",
"alias" : "Well Known",
"extension" : "com_easysocial",
"command" : "friends.create50",
"avatar" : "media/com_easysocial/badges/wellknown.png",
"frequency" : 50
},
{
"title" : "Champion",
"description" : "Badge for Making 70 Friends",
"howto" : "To unlock this badge, you need to have made 70 friends.",
"alias" : "Champion",
"extension" : "com_easysocial",
"command" : "friends.create70",
"avatar" : "media/com_easysocial/badges/champion.png",
"frequency" : 70
},
{
"title" : "Famous",
"description" : "Badge for Making 100 Friends",
"howto" : "To unlock this badge, you need to have made 100 friends.",
"alias" : "Famous",
"extension" : "com_easysocial",
"command" : "friends.create100",
"avatar" : "media/com_easysocial/badges/famous.png",
"frequency" : 100
}
]

I know need to know the syntax for the controller functions and what file it needs to be added to.
The replies under this section are restricted to logged in users or users with an active subscription with us