Andre a good day. Tell me is it possible to make a similar image on the page displayimage.php?
Maybe there is some plugin for that? :)
If I remember correctly there's a mod or plugin available which automatically display similar pictures according to their histogram. I've had a quick look at the cpg1.5.x plugin contributions board, but haven't found it there (the thread is probably somewhere else). Is this what you're looking for?
Yes, I want that this plugin, I'm willing to reward you financially for the help :)
I suggest to search our boards for that plugin / mod. I'm not absolutely sure that it was made for cpg1.5.x, maybe it was initially created for cpg1.4.x. However, if you find it, please post the link to the thread. I don't volunteer for creating such a plugin from, but are ready to help you to get it to work, if it doesn't work as expected.
Thank you very much Andre, I will try to find this plugin!
I posted a similar feature request (http://forum.coppermine-gallery.net/index.php/topic,61596.msg305597.html#msg305597) some time ago. Also found these threads:
http://forum.coppermine-gallery.net/index.php/topic,61596.msg305597.html#msg305597 (http://forum.coppermine-gallery.net/index.php/topic,61596.msg305597.html#msg305597)
http://forum.coppermine-gallery.net/index.php/topic,62619.msg311099.html#msg311099 (http://forum.coppermine-gallery.net/index.php/topic,62619.msg311099.html#msg311099)
I think the second thread is the one I remembered. Unfortunately it seems that the plugin either hasn't been finished yet or isn't publicly available.
Have carefully reviewed all of the plugins for 1.4, but unfortunately found nothing. Is it possible to simply display additional images under the picture of the album? Something like a filmstrip, but images are not in a row, scatter.
So you want to change the layout of the filmstrip?
Well, as an option. It is necessary to do so in the filmstrip to display images from this album is not a row, and randomly.
Slightly modifying the design then it will be a filmstrip like similar images :)
So you want to display random images from the same album. How exactly do you want to arrange them?
So that they appear in the filmstrip.
Quote from: serg5777 on August 26, 2013, 12:40:10 PM
like a filmstrip, but images are not in a row, scatter.
Please attach a screenshot / draft of how exactly it should look like.
Well, that's the standard map filmstrip http://i59.fastpic.ru/big/2013/0826/55/13340693901fe048e7f1544d45687655.jpg
I need it to display images from an album randomly. So to speak, and will be similar to similar images.
I give up. You said you don't want to display them in a row. But if it's fine now to display them in a row, even better.
Yes, Google translator can not translate properly for you to understand what I need :)
I need to make the images in the filmstrip were randomly, and did not go straight.
To say it was just a block similar images in filmstrip.
I will remove the arrows, there will be just four images from the album.
I had a short look at the filmstrip functions and I guess it's easier to built it from scratch. Do you want to wrap the images in the film strip design anyway (black background, tile images above and below)?
Andre, I did not design the main thing, the main thing in the filmstrip to display similar images (from the album), just could not find plugin.
This is just to say one of the embodiments of similar images for the gallery :)
Andre perhaps you I still do not understand, I will show you the screenshot below:
Only the images in the filmstrip were not in a row, and were spread out on the album.
Here's a quick draft. Copy the function theme_display_image from themes/sample/theme.php to your theme's theme.php file, if it doesn't exist. Then, find
starttable();
echo $picture;
endtable();
and below, add
// Display random pictures from the same album
if ($superCage->get->testInt('cat')) {
$album = abs($superCage->get->getInt('cat'));
} elseif ($superCage->get->testInt('album')) {
$album = $superCage->get->getInt('album');
} else {
$album = mysql_result(cpg_db_query("SELECT aid FROM {$CONFIG['TABLE_PICTURES']} WHERE pid = ".$superCage->get->getInt('pid')), 0);
}
global $RESTRICTEDWHERE;
$result = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS r INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON a.aid = r.aid $RESTRICTEDWHERE AND pid != ".$superCage->get->getInt('pid')." AND r.aid = $album AND approved = 'YES' ORDER BY RAND() LIMIT 4");
if (mysql_num_rows($result)) {
starttable(-1, 'Similar pictures');
echo '<tr width="100%">';
while ($row = mysql_fetch_assoc($result)) {
$pic_url = get_pic_url($row, 'thumb');
echo "<td class=\"thumbnails\" align=\"center\"><a href=\"displayimage.php?pid={$row['pid']}#top_display_media\"><img class=\"image\" src=\"$pic_url\" /></a></td>";
}
endtable();
}
mysql_free_result($result);
Many thanks to Andre, you do great work!
Do not tell me how to add a field to tableh1 similar photos?
From your screenshot I assume you want to move the similar pictures down. But I don't understand what you actually asked.
To have similar picture was the same as that of a brown field and voting info :)
Ah, you want to add a table header :D
Replace
starttable();
with something like
starttable(-1, 'Similar pictures');
All is fine, for a new version of the gallery is the CPG will be a nice addition;)
I'm sorry for my english) Thanks again!
Andre, please tell me whether it is possible to fix something in the code so that similar images may not reflect the actual image? :)
Here:
Please try the updated code (http://forum.coppermine-gallery.net/index.php/topic,76564.msg369643.html#msg369643).
Thank you, it works!