special search function special search function
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

special search function

Started by metamog, November 24, 2011, 11:15:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

metamog

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).

metamog

Custom fields for image description

That is, I wrote user-field in my request above.


Morgan Larsson
SWEDEN

metamog

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


Αndré

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.

metamog

Yes, you're right about file information box, thank you André!


Morgan Larsson

Αndré

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&amp;type=AND&amp;user{$i}=on&amp;search=".urlencode($CURRENT_PIC_DATA['user' . $i])."\">".$CURRENT_PIC_DATA['user' . $i]."</a>";

metamog

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

Αndré

You could at least
Quote from: Joachim Müller on September 28, 2008, 12:46:26 PM
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.
;)

metamog

Oops, didn't know there was such a button!

Fix it now, thank you again!

Morgan

:D  ;D  :)  ;)