Keyword

How to show author image in k2 category listing page

More
9 years 10 months ago #134797 by Munna
Hello everybody. We know k2 category listing page shows author name. But how to show author image in category listing page. Please let me know if anybody can do it. I want to show author image in category listing page.

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #134798 by Munna
ok finally got it. I have done it myself. WOW.

<?php
$option = JRequest::getCmd('option');
$view = JRequest::getCmd('view');
if ($option == "com_k2" && $view == "itemlist")
{
$K2Itemid = JRequest::getInt('id');
$db = JFactory::getDBO();
$db->setQuery("SELECT image FROM #__k2_users WHERE id = ".$K2Itemid);
$K2Catid = $db->loadResult();
$userImage = $K2Catid;
echo "<img src='media/k2/users/$userImage'";
}
?>

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 10 months ago #134807 by Krikor Boghossian
Replied by Krikor Boghossian on topic How to show author image in k2 category listing page
Kudos Munna :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum