Hey MD king,
I am sorry for the delay of this reply,
Hmm I have a little bit lost here, may i know this badge.php is it under any function file?
Or you just put whatever I suggested that code into this badge.php?
If yes, that was not correct.
Try download my custom example .badge and .points file and extract the zip file then install from
backend > Easysocial > User Points/Achievement > install (upload these file through these separate installer)
When you view on the `User Points/Achievement` listing page, you will see your custom badge and point exist.
Then I want my site user whoever install application after 5/10 times then get my custom badge, so I have to put my custom badge/point command (e.g. apps2.badge || apps2.points) into Easysocial core function file e.g.
JoomlaFolder\administrator\components\com_easysocial\tables\app.php
//LINE After 559
// my custom badges and point
$badge = FD::badges();
$badge->log( 'com_easysocial' , 'apps2.install' , $userId , JText::_( 'COM_EASYSOCIAL_APPS_BADGE_INSTALLED' ) );
$points = FD::points();
$points->assign( 'apps2.install' , 'com_easysocial' , $userId );
So when the user trying to install an application in his profile, it will get the point. Until installed 5/10 times (this value you can set it from backend Easysocial badge listing page) the user will get that custom badges.