search string for url

knott

Joined: 2007-06-11
Posts: 36
Posted: Fri, 2007-06-22 19:33

Hi

Where can I find out the various terms that can be used in a url search string.

I've found this one...
http://www.mysite.co.uk/gallery2/main.php?func=search&whattosearchfor=144

it finds all the pictures with number / keyword 144 in them.

what I'm looking for is something like
http://www.mysite.co.uk/gallery2/main.php?func=search&whattosearchfor=144&album=5

so I'd like it to find picture with number / keyword 144 from only album number 4

is there some kind of list available with these search terms?

many thanks

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2007-06-22 20:25

no, the urls you mention there don't return anything meaningful. there's no parameter called "func" for gallery.

maybe you want to use one of the following modules:
- search
- keyalbum
- tags

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
knott

Joined: 2007-06-11
Posts: 36
Posted: Fri, 2007-06-22 21:22

Hi valiant,

can you point me in the direction of the parameters available?

many thanks
Graeme

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2007-06-22 22:18

tons of parameters are valid, depending on the active modules. no, i can't provide you a list of them.

maybe install the tags module and click on one of the tags to get an idea how the URLs look like.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
thesainter

Joined: 2007-01-18
Posts: 5
Posted: Tue, 2007-07-31 12:20

Like this.

http://yoursite.com/gallery2/main.php?&g2_formUrl=main.php&g2_controller=search.SearchScan&g2_form%5BformName%5D=SearchScan&g2_form%5Baction%5D%5Bsearch%5D=Search&g2_form%5Boptions%5D%5BGalleryCoreSearch%5D%5Bdescriptions%5D=on&g2_form%5Boptions%5D%5BGalleryCoreSearch%5D%5Bkeywords%5D=on&g2_form%5Boptions%5D%5BGalleryCoreSearch%5D%5Bsummaries%5D=on&g2_form%5Boptions%5D%5BGalleryCoreSearch%5D%5Btitles%5D=on&g2_form%5Boptions%5D%5Bcomment%5D%5Bcomments%5D=on&g2_form%5Boptions%5D%5BCustomField%5D%5Bcustomfield%5D=on&g2_form%5Boptions%5D%5Btags%5D%5Btags%5D=on&g2_form%5BsearchCriteria%5D=your_search_here

needed:
http://example.com/gallery2/main.php?
&g2_formUrl=main.php
&g2_controller=search.SearchScan
&g2_form%5BformName%5D=SearchScan
&g2_form%5Baction%5D%5Bsearch%5D=Search

optional:

&g2_form%5Boptions%5D%5BGalleryCoreSearch%5D%5Bdescriptions%5D=on
&g2_form%5Boptions%5D%5BGalleryCoreSearch%5D%5Bkeywords%5D=on
&g2_form%5Boptions%5D%5BGalleryCoreSearch%5D%5Bsummaries%5D=on
&g2_form%5Boptions%5D%5BGalleryCoreSearch%5D%5Btitles%5D=on
&g2_form%5Boptions%5D%5Bcomment%5D%5Bcomments%5D=on
&g2_form%5Boptions%5D%5BCustomField%5D%5Bcustomfield%5D=on
&g2_form%5Boptions%5D%5Btags%5D%5Btags%5D=on

needed:
&g2_form%5BsearchCriteria%5D=your_search_here

 
knott

Joined: 2007-06-11
Posts: 36
Posted: Tue, 2007-07-31 16:16

Excellent thats brilliant thanks very much for the response.

Do you know how you can specify the album in which to search?

regards

 
knott

Joined: 2007-06-11
Posts: 36
Posted: Thu, 2008-06-26 10:09

Hi,

I've just come back to this to try again & found a module that helps by modifying the search function so you can search by album only...
http://www.saulmade.nl/g2modules/

however I'm now trying to work out what the string would be I need to add to the url to use this feature.

so far I have this (looking for title 161) and all is ok

http://www.mysite.co.uk/gallery2/main.php?&g2_formUrl=main.php&g2_controller=search.SearchScan&g2_form%5BformName%5D=SearchScan&g2_form%5Baction%5D%5Bsearch%5D=Search&g2_form%5Boptions%5D%5BGalleryCoreSearch%5D%5Btitles%5D=on&g2_form%5BsearchCriteria%5D=161

but I want to make the search specific to album g2_itemId=7852

any help much appreciated, its for my local running club.

 
knott

Joined: 2007-06-11
Posts: 36
Posted: Thu, 2008-06-26 15:12

Also any one know how to search for just a number... eg

I want to find all images called 10 (10a.jpg, 10b.jpg, 10c.jpg)

but if I search for 10 I get - 110.jpg, 108.jpg etc etc

I thought about naming images carefully in a format like this

_10_a.jpg, _10_b.jpg

then my theory was that a search for _10_ would return the correct results but a little experiment proved that it still drags in any file with characters 10 in it.

how do others with large albums get round this, or do you expect folks to click through 50+ pages of results?

Many thanks

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25959
Posted: Thu, 2008-06-26 15:21

I don't know about the search module , but this module:
http://codex.gallery2.org/Gallery2:Modules:title
might be of interest.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team