forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: casp3r on June 07, 2010, 04:41:08 pm
-
I have 3 image custom fields and was wondering if it is possible to make them clickable, much the same way that the keywords work?
www.niaviation.co.uk/gallery/index.php
testuser
password2010
Many thanks in advance.
-
Take a look at the thread Clickable and Searchable image description Custom field (http://forum.coppermine-gallery.net/index.php/topic,54057.0.html) that was written for cpg1.4.x and see if it works for cpg1.5.x as well. Please report back.
-
I'll take a look and report back. Many thanks.
-
The replacement code
$info[$CONFIG['user_field' . $i . '_name']] = '<a href ="thumbnails.php?album=search&search='.$CURRENT_PIC_DATA['user' . $i].'">'.$CURRENT_PIC_DATA['user' . $i].'</a>';
gives a url like this
http://127.0.0.1/coppermine/thumbnails.php?search=D-ABDS
but it seems that the url should be something like
http://127.0.0.1/coppermine/thumbnails.php?search=D-ABDS&user3=on
for it to work. Unfortunately I'm unable to modify the sample code above to make it so. Any help would be greatly appreciated.
-
You're not capable to add that little string? ::) OK, try
$info[$CONFIG['user_field' . $i . '_name']] = '<a href ="thumbnails.php?album=search&search='.$CURRENT_PIC_DATA['user' . $i].'&user3=on">'.$CURRENT_PIC_DATA['user' . $i].'</a>';
-
Sorry Joachim not a programmer :( Get an error message now.
Parse error: syntax error, unexpected '[' in C:\xampp\htdocs\coppermine\displayimage.php on line 201
-
Try
$info[$CONFIG['user_field' . $i . '_name']] = '<a href ="thumbnails.php?album=search&search='.$CURRENT_PIC_DATA['user' . $i].'&user3=on">'.$CURRENT_PIC_DATA['user' . $i].'</a>';
then.
-
Thanks Joachim, just had to tweak it a bit so that it would work with user1, user2, user3 and user4
$info[$CONFIG['user_field' . $i . '_name']] = '<a href ="thumbnails.php?album=search&search='.$CURRENT_PIC_DATA['user' . $i].'&user'.$i.'=on">'.$CURRENT_PIC_DATA['user' . $i].'</a>';