forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: metamog on November 24, 2011, 11:15:56 pm
-
I would like to have a search function like this:
I want to have a clickable text, or a button (in or next to a user-field). That shows (makes a search for) all photos with the same word in the same user field (and search this user-field only).
I'd like to have one button, or clickable text on each user-field , searching only in these user-fields for the exact phrase.
I don't know how to code at all, but as much as I can guess it's sounds like simple logics so it should be quite easy to acchieve this thing?
I hope it's OK for me to make a suggestion for a plugin like this here. To me it sounds like a very simple code to produce, but as I wrote above: I don't know anything about coding.
Kind Regards
Morgan Larsson
SWEDEN
Here's my site: http://echinopsis.eu
PS. The reason why I want this funtion is to have my users to be able to browse, between sibblings of hybrid plants, in an easy way (and also browse through plants between different producers, in an easy way).
-
Custom fields for image description
That is, I wrote user-field in my request above.
Morgan Larsson
SWEDEN
-
I found the search string to be input and its:
http://echinopsis.eu/thumbnails.php?search= (insert data from user-field) &submit=s%C3%B6k&album=search&newer_than=&older_than=&type=AND&user1=on
for a search in only user-field 1
Is it possible to just add some code inside displayimage.php, in the area of the user-field, to make a clickable link to a search like this?
Morgan Larsson
http://echinopsis.eu
-
You want to add those buttons to the "File information" box, right?
Moving to themes board, as I doubt anybody will create a plugin for this. But it should be quite easy to modify your theme accordingly.
-
Yes, you're right about file information box, thank you André!
Morgan Larsson
-
Open displayimage.php, find
$info[$CONFIG['user_field' . $i . '_name']] = make_clickable($CURRENT_PIC_DATA['user' . $i]);
and replace with
$info[$CONFIG['user_field' . $i . '_name']] = "<a href=\"thumbnails.php?album=search&type=AND&user{$i}=on&search=".urlencode($CURRENT_PIC_DATA['user' . $i])."\">".$CURRENT_PIC_DATA['user' . $i]."</a>";
-
Thank you a thousand times André!!!
Really great, exactly what I wanted. :)
Wish I could help you back, my profession is cooking so it'll be hard for me to do anything for you on distance! Though I want you to know that I appreciate your help!
Morgan Larsson
http://echinopsis.eu
-
You could at least
tag your answer as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.
;)
-
Oops, didn't know there was such a button!
Fix it now, thank you again!
Morgan
:D ;D :) ;)