Hello,
my question is: where in displayimage.php i can write image id (like id=zzz) for my fullscreened pictures?
There's is code:
<?php
if (isset($HTTP_GET_VARS['picfile'])) {
if (!GALLERY_ADMIN_MODE) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
$picfile = $HTTP_GET_VARS['picfile'];
$picname = $CONFIG['fullpath'] . $picfile;
$imagesize = @getimagesize($picname);
echo "<a href=\"javascript: window.close()\"><img src=\"" . path2url($picname) . "\" $imagesize[3] class=\"image\" border=\"0\" alt=\"\" title=\"$picfile\n" . $lang_fullsize_popup['click_to_close'] . "\"/></a><br />\n";
} elseif (isset($HTTP_GET_VARS['pid'])) {
$pid = (int)$HTTP_GET_VARS['pid'];
$sql = "SELECT * " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE pid='$pid' $ALBUM_SET";
$result = db_query($sql);
if (!mysql_num_rows($result)) cpg_die(ERROR, $lang_errors['non_exist_ap'], __FILE__, __LINE__);
$row = mysql_fetch_array($result);
$pic_url = get_pic_url($row, 'fullsize');
$geom = 'width="' . $row['pwidth'] . '" height="' . $row['pheight'] . '"';
echo "<a href=\"javascript: window.close()\"><img src=\"" . $pic_url . "\" $geom class=\"image\" border=\"0\" alt=\"\" title=\"" . htmlspecialchars($row['filename']) . "\n" . $lang_fullsize_popup['click_to_close'] . "\"></a><br />\n";
}
?>
So where here i can write image id?
No one have any idea?
I don't understand the question.
The code for original size image is:
<a href="javascript: window.close()"><img src="albums/userpics/10002/NAME.JPG" width="800" height="600" class="image" border="0" alt="" title="NAME.JPG
Click on image to close window"></a>
And i need to add here "id=somename", like:
<a href="javascript: window.close()"><img src="albums/userpics/10002/NAME.JPG" id=somename width="800" height="600" class="image" border="0" alt="" title="NAME.JPG
Click on image to close window"></a>
The question is, where in displayimage and what i must add?
an id is just an id, not sure what you're trying to accomplish. Anyway, to add an id attribute, edit displayimage.php, find echo "<a href=\"javascript: window.close()\"><img src=\"" . path2url($picname) . "\" $imagesize[3] class=\"image\" border=\"0\" alt=\"\" title=\"$picfile\n" . $lang_fullsize_popup['click_to_close'] . "\"/></a><br />\n";
and replace with echo "<a href=\"javascript: window.close()\"><img src=\"" . path2url($picname) . "\" $imagesize[3] class=\"image\" border=\"0\" alt=\"\" title=\"$picfile\n" . $lang_fullsize_popup['click_to_close'] . "\" id=\"somename\" /></a><br />\n";
Then find echo "<a href=\"javascript: window.close()\"><img src=\"" . $pic_url . "\" $geom class=\"image\" border=\"0\" alt=\"\" title=\"" . htmlspecialchars($row['filename']) . "\n" . $lang_fullsize_popup['click_to_close'] . "\"></a><br />\n";
and replace with echo "<a href=\"javascript: window.close()\"><img src=\"" . $pic_url . "\" $geom class=\"image\" border=\"0\" alt=\"\" title=\"" . htmlspecialchars($row['filename']) . "\n" . $lang_fullsize_popup['click_to_close'] . "\" id=\"somename\" /></a><br />\n";
Thx, that's it :D
It was needed for javascript turning image Black and White|Colored