I am building a digital photography website, and have enabled the 4 extra fields to store such info as photographer, camera type etc
What I would really love is to make these field contents clickable. eg if an image is taken with a Nikon 885, click on the "Nikon 885" to find ALL photos taken with that camera.
I know users can search for items in fileds, but a clickable option would make this very slick.
Is this possible?
So what you want is for all words (or phrases) in the fields to count as keywords.
I will look into that.
There it was, in the faq all the time :wink:
http://coppermine.sourceforge.net/faq.php?q=linksInCustomFields#linksInCustomFields
Hi,
what in the FAQ stands, is not exact that, that was needed.
Try this one:
in displayimage.php find (if you have 4 user fields):
for ($i = 1; $i <= 4; $i++) {
if ($CONFIG['user_field' . $i . '_name'] ) {
if ($CURRENT_PIC_DATA['user' . $i] != "") {
add after this:
$info[$CONFIG['user_field'.$i.'_name']] = '<span class="alblink">' . preg_replace("/(\S+)/", "<a href=\"thumbnails.php?album=search&type=full&search=\\1\">\\1</a>" , $CURRENT_PIC_DATA['user' . $i]) . '</span>';
that's all.
All the field will be clickable. If you want some of them to be not clickable check for i ( if (i==1 or i==2), etc) in the for-loop.