Thank you for your quick answer , but that's not what i was looking for.
That only works if you use bbcode, in this case the user enters the artist's name only (no bbcode)
and clicking the name would search the gallery for all images created by that artist.
I found a way and it seems to work:
first i used this info provided by nibbler here:
http://forum.coppermine-gallery.net/index.php/topic,38804.0.htmlto make the custom field a default search field.
then for the intermediate view (pic2) i changed the code in displayimage.php
from
for ($i = 1; $i <= 4; $i++) {
if ($CONFIG['user_field' . $i . '_name']) {
if ($CURRENT_PIC_DATA['user' . $i] != "") {
$info[$CONFIG['user_field' . $i . '_name']] = make_clickable($CURRENT_PIC_DATA['user' . $i]);
}else{
$info[$CONFIG['user_field' . $i . '_name']] ='Unknown';
}
}
to
for ($i = 1; $i <= 4; $i++) {
if ($CONFIG['user_field' . $i . '_name']) {
if ($CURRENT_PIC_DATA['user' . $i] != "") {
$info[$CONFIG['user_field' . $i . '_name']] = '<a href ="thumbnails.php?album=search&search='.$CURRENT_PIC_DATA['user' . $i].'">'.$CURRENT_PIC_DATA['user' . $i].'</a>';
}else{
$info[$CONFIG['user_field' . $i . '_name']] ='Unknown';
}
}
for the thumbnail view (pic1) i used the code provided by stramm here:
http://forum.coppermine-gallery.net/index.php/topic,27654.0.htmlto add a custom field to the thumbnail view, and changed the code
from
if ($row['user1']) {
$user1_temp = $row['user1'];
} else {
$user1_temp = 'Unknown';
}
$caption .= '<span style="font-weight:bold;">'."Artist: ".'</span>'.'<span style="color:red;font-weight:bold;">'.$user1_temp.'<br /></span>';
to
if ($row['user1']) {
$user1_temp = $row['user1'];
} else {
$user1_temp = 'Unknown';
}
$caption .= '<span style="font-weight:bold;">'."Artist: ".'</span>'.'<span style="color:red;font-weight:bold;"><a href ="thumbnails.php?album=search&search='.$user1_temp.'">'.$user1_temp.'</a><br /></span>';