Integration of jLike with Phocagallery

1)Enable jlike Phocagallery plugin
2) To show Like / Dislike button on a Category view

  • Only Like & Dislike ¬†integration
    • Add Following given lines on line no 84 components/com_phocagallery/views/category/tmpl/default.php
  • OR Like, Dislike & Comments Integration
    • Add Following given at the end of file in components/com_phocagallery/views/category/tmpl/default.php
  • Please make sure you embed this code in php start and end tags if needed.
$dispatcher = &JDispatcher::getInstance();
JPluginHelper::importPlugin('content');
$grt_response=$dispatcher->trigger('onBeforeDisplaylike',array('com_phocagallery.detail',$this->category,array(),0));
echo $grt_response[0];


3) To show Like / Dislike button on a Image / photo  view

  • Only Like & Dislike integration
    • Add following given lines¬† on line no 29 components/com_phocagallery/views/detail/tmpl/default.php
  • OR Like, Dislike & Comments Integration
    • Add Following given at the end of file in¬†components/com_phocagallery/views/detail/tmpl/default.php
  • Please make sure you embed this code in php start and end¬† tags if needed.
$dispatcher = &JDispatcher::getInstance();
JPluginHelper::importPlugin('content');
$grt_response=$dispatcher->trigger('onBeforeDisplaylike',array('com_phocagallery.detail',$this->item,array(),0));
echo $grt_response[0];