(Note - I need to get this working so we can buy the PRO version)
I have created a custom AJAX component to display some content.
When fetching content from the DB (with my component)- it displays the gallery thumbnails, however when clicking a thumbnail it opens the image in a new browser window (not the lightbox).
When i create a normal content page with the {gallery}{/gallery} tags everything works fine.
I think it has to do with my code.
My code is as follows:
global $mainframe;
$dispatcher =& JDispatcher::getInstance();
$db =& JFactory::getDBO();
$sql = "SELECT `introtext`, `title` FROM #__content WHERE `id` = ".$contentID."";
$db->setQuery($sql);
$content = $db->loadObject();
$content->text = $content->introtext;
$params =& $mainframe->getParams('com_content');
JPluginHelper::importPlugin('content');
$results = $dispatcher->trigger('onPrepareContent', array (& $content, & $params, 0));
echo $content->text;
Is there anything i am missing here.