1
Mods & Plugins (Releases & Support) / Re: [MOD] similar images
« on: June 09, 2011, 09:52:36 PM »
god idea
tks
tks
Thanks for such a nice MOD.
one request, can we control the number of rows and columns, not from ACP bcoz that changes the whole gallery i want to change number of rows and column for the similar images only..
In my case i've 4 rows with no columns in categories page, but in details page i want to show the similar images in 2 rows and 3 columns.
thanks.
To achive this you have to replace the $config['...']-variables with simple values and change the total numbers of displayed images.
So in details.php and only in the MOD's code find:
<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">
and replace e.g. with:
<table width='50%' border='0' cellpadding='2' cellspacing='4'>
This has to be done at 3 different places. Note: the values given are just examples, you are hard-coding html, adapt it to your needs.
Find:
if ($count == $config['image_cells']) {
Replace with:
if ($count == 2) {
Find:
$leftover = ($config['image_cells'] - $count);
Replace with:
$leftover = (2 - $count);
2 is the number of rows.
At
if ($i_ids > 4) $i_ids = 4;
set the maximum of displayed images. 2 rows and 3 colums will have 2x3=6 images. For your example change it to:
if ($i_ids > 6) $i_ids = 6;
Good luck!