Show multiple images from imageid's list
Posted: 31 Aug 2009, 11:54
Would like to share this little modification.
I modified the plugin to make it show multiple images from a comma seperated id list.
In plugins/content/phocagallery.php I changed:
to
Now you can use the plugin like this:
{phocagallery view=category|categoryid=8|imageid=18,20,21}
We needed this feature for one of our customers.
I modified the plugin to make it show multiple images from a comma seperated id list.
In plugins/content/phocagallery.php I changed:
Code: Select all
// Only one image
if ($imageid > 0) {
//$where = ' AND id = '. $imageid;
}
Code: Select all
// Only one image
if ($imageid > 0) {
$ids = explode(",",$imageid);
//$where = ' AND id = '. $imageid;
$where = ' AND id IN(';
foreach ($ids as $idvalue) {
$where .= $idvalue . ',';
}
$where = rtrim($where,",") . ")";
}
Now you can use the plugin like this:
{phocagallery view=category|categoryid=8|imageid=18,20,21}
We needed this feature for one of our customers.