Hi, i struggle for over an hour now with what i thing should be simple... please anybody can help me or push me in the right direction ?
I have a query that return images link from phocagallery database as an array, everything works fine, the images are displayed correctly in small size, but i just want to click on it and open in modal to see the normal size... but it does'nt work at all.
My form opens in modal already, so i tried a couple of things like content.prepare, but i can't do it.
Here is my code so far:
Thank in advance if anybody feels like wanting to help !!
I have a query that return images link from phocagallery database as an array, everything works fine, the images are displayed correctly in small size, but i just want to click on it and open in modal to see the normal size... but it does'nt work at all.
My form opens in modal already, so i tried a couple of things like content.prepare, but i can't do it.
Here is my code so far:
Code:
$codeprojet = '{liste_des_projets___code_projet}';
$ceprojetid= '{liste_des_projets___id}';
if (empty($ceprojetid)) {
//echo '';
}
else {
$db = JFactory::getDBO();
$query = 'SELECT id FROM a0z3w_phocagallery_categories WHERE title ='.$codeprojet.'';
$db->setQuery($query);
$catid = $db->loadResult();
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery
->select(array('filename'))
->from('a0z3w_phocagallery')
->where('catid = ' . $catid);
$myDb->setQuery($myQuery);
$rows = $myDb->loadObjectList();
$list = array();
foreach ($rows as $row)
{
$list[] = '<a href="images/phocagallery/' . $row->filename . '" rel="lightbox"><img src="images/phocagallery/' . $row->filename . '" width="150px" height="150px"></a>';
}
return '' . implode($list) . '';
}
Thank in advance if anybody feels like wanting to help !!