PDA

View Full Version : How to have customized search results page


Andy
Jan-27-2006, 03:35 PM
From Onethumb's Release Notes (http://blogs.smugmug.com/release-notes/) Searching can now have your look and feel, with your header and footer...

And, it only takes one word: SMUGSEARCH

By putting the word SMUGSEARCH in your header, the smugmug servers will use advanced character recognition technology to generate all the code for a site specific search box and search button. you dont have to code a thing!

For example instead of using this code:


<p align="center"><font face="Verdana" size="2">
<form method="get" action="/search/index.mg">
<input type="text" name="searchWords" />
<input type="hidden" name="searchType" value="InUser" />
<input type="hidden" name="NickName" value="yournicknamehere" />
<input type="submit" value="Search yournickname's Galleries" />
</form>
</font></p>


all you need to do now is:

<p align="center">SMUGSEARCH</p>

it is highly recommended to use the new SMUGSEARCH keyword because if the search engine ever changes, the code that is generated by the smugmug servers will automatically be updated.

:ear

Andy
Jan-27-2006, 06:21 PM
If you want to change color of text on the search results page, put this in your CSS:

/* change the blue text on search results page to white */
.blue {
color: #fff;
}

Moon Mullen
Jan-27-2006, 08:22 PM
Andy:

I had the custom code for searching within my site, and I haven't replaced it yet with the new search code. I did notice that now when I search on a multi-word keyword it now indicates "no matching keywords". Try typing in "moon mullen" or "four county catholic" on www.moonmullen.smugmug.com (http://www.moonmullen.smugmug.com) to see what I mean. Both of these keyword strings are attached to lots of photos. Any ideas?

Moon

Andy
Jan-27-2006, 08:25 PM
Andy:

I had the custom code for searching within my site, and I haven't replaced it yet with the new search code. I did notice that now when I search on a multi-word keyword it now indicates "no matching keywords". Try typing in "moon mullen" or "four county catholic" on www.moonmullen.smugmug.com (http://www.moonmullen.smugmug.com) to see what I mean. Both of these keyword strings are attached to lots of photos. Any ideas?

Moon

I get 106 results when I type in moon mullen :dunno

Andy
Jan-27-2006, 08:26 PM
I get 106 results when I type in moon mullen :dunno

1215 results for four county catholic...

Andy
Jan-27-2006, 08:27 PM
Oh Keywords :)

Ook hang on

Andy
Jan-27-2006, 08:32 PM
Oh Keywords :)

Ook hang on

SMUGSEARCH has to go in the header for now. I don't know if it can belong in the footer. I put it in header for you, try it now :D

here's your old code, in case you want to put it back.

<form method="get" action="/search/index.mg">
<input type="text" name="searchWords" />
<input type="hidden" name="searchType" value="InUser" />
<input type="hidden" name="NickName" value="moonmullen" />
<input type="submit" value="Find Photos" />
</form>

Moon Mullen
Jan-28-2006, 06:05 AM
Andy, I can take this up through support if you want but I can't seem to get the keyword search function to work properly. Under my old site search if you input a keyword it would give you the link at the top of the page showing the number of images found. When you clicked on the number you could do the keyword mix and match which was really cool. This still works but there are 2 exceptions that I am running into:

1. Input a keyword with 3 characters or less and you get no results. For example, I typed in 'joe' in the search box on my homepage and it says "We're sorry, but 'joe' is too short. Please try another search". I have 74 photos with 'joe' attached as a keyword. I tried the same search using 'pat' and got the same results. Typing 'john' brings back the proper results. Is it possible keywords with less than 4 characters are the problem?

2. Relative to keywords with mutliple words (i.e. "four county catholic") it does bring back all the photos and galleries, but it doesn't bring back the keyword results that allow folks to mix and match the photos with other keywords.

Any insight? I do like the search box and having it in the header makes more sense anyways.

Thanks,

Moon

Andy
Jan-28-2006, 06:17 AM
Andy, I can take this up through support if you want but I can't seem to get the keyword search function to work properly. Under my old site search if you input a keyword it would give you the link at the top of the page showing the number of images found. When you clicked on the number you could do the keyword mix and match which was really cool. This still works but there are 2 exceptions that I am running into:

1. Input a keyword with 3 characters or less and you get no results. For example, I typed in 'joe' in the search box on my homepage and it says "We're sorry, but 'joe' is too short. Please try another search". I have 74 photos with 'joe' attached as a keyword. I tried the same search using 'pat' and got the same results. Typing 'john' brings back the proper results. Is it possible keywords with less than 4 characters are the problem?

2. Relative to keywords with mutliple words (i.e. "four county catholic") it does bring back all the photos and galleries, but it doesn't bring back the keyword results that allow folks to mix and match the photos with other keywords.

Any insight? I do like the search box and having it in the header makes more sense anyways.

Thanks,

Moon

Hey Bob - the new search is for four letters and more. I'll have to look into the other question. Stay tuned, ok?

Moon Mullen
Jan-28-2006, 07:29 AM
Hey Bob - the new search is for four letters and more. I'll have to look into the other question. Stay tuned, ok?

Thanks again, Andy. I'll wait for your response on the keyword issue. Relative to the 4 letter requirement is this going to change? There are a lot of 3 letter words in the dictionary and common names are often abbreviated to 3 letters - Robert to Bob, Joseph to Joe, Patricia or Patrick to Pat....you get the point. In life most people address each other by the shortened name and the user instinct is going to be to search by the name used in public - i.e. Joe, Bob, Rob, Pat, Jim, Jan, Jen, Tim, Tom....you get the point.

Bob soon to be Robert (ha!)

P.S. I left off two of my favorite 3 letter words - dog & cat!

dogwood
Jan-28-2006, 09:55 AM
Andy:

In my old coded search bar, it said "Search Dogwood Digital". Can this latest search bar say something other than "search"? Just curious. I like it and it seems to work faster than my old one.

dogwood
Jan-28-2006, 10:24 AM
I have custom headers on my galleries and pages, but how do I make a custom header for the search results page (no header shows up right now-- only my navbar). For example, my CSS code for galleries that aren't assigned a custom header (myLogo) is:

.galleryPage #myLogo {
display: block;
background: url(http://dogwood.smugmug.com/photos/52348002-L.jpg);
height: 167px;
width: 750px;
}

Seems like I need to replace ".galleryPage" with something to get a header to show up on the search box. Any idea what?

Andy
Jan-28-2006, 12:10 PM
Andy:

In my old coded search bar, it said "Search Dogwood Digital". Can this latest search bar say something other than "search"? Just curious. I like it and it seems to work faster than my old one.

I'm waiting on an answer on that, thanks for your patience. Ping this thread in a day or so if you haven't seen an update from me.

Andy
Jan-28-2006, 12:10 PM
I have custom headers on my galleries and pages, but how do I make a custom header for the search results page (no header shows up right now-- only my navbar). For example, my CSS code for galleries that aren't assigned a custom header (myLogo) is:

.galleryPage #myLogo {
display: block;
background: url(http://dogwood.smugmug.com/photos/52348002-L.jpg);
height: 167px;
width: 750px;
}

Seems like I need to replace ".galleryPage" with something to get a header to show up on the search box. Any idea what?

Lee will answer. Thanks.

dogwood
Jan-31-2006, 08:25 AM
Lee will answer. Thanks.

Two questions about the new search bar.

1) Can I change the word "search" to something like "search photos"? How?

2) Can a custom header be placed on the search results page? How?

Andy
Jan-31-2006, 08:48 AM
Two questions about the new search bar.

1) Can I change the word "search" to something like "search photos"? How?

2) Can a custom header be placed on the search results page? How?

1) - I don't know yet

2) - sure, look here: http://dgrin.smugmug.com/ and search for the word, tutorial

it's automagic.

bwg
Jan-31-2006, 08:53 AM
Two questions about the new search bar.

1) Can I change the word "search" to something like "search photos"? How?

2) Can a custom header be placed on the search results page? How?

i guess i'm supposed to answer this huh?

1) can you change the word search..yes. put this as the last thing in your header box.

<script type="text/javascript">
document.getElementById('searchWords').value = 'search photos';
</script>


2) can you have a custom hearder for the search page? yes but since the search page isnt fully css-ified yet there is no specific class or id for search results. you'll have to define a catch-all header for the search results page, then just override it for your homepage, category pages and gallery pages.

so you would do:
#myLogo {
display: block;
background: url(http://dogwood.smugmug.com/photos/52348002-L.jpg); (http://dogwood.smugmug.com/photos/52348002-L.jpg%29;)
height: 167px;
width: 750px;
}

and then prefix .homepage, .category or .galleryPage (which you already have) to change the header for whatever page type you're on.

dogwood
Jan-31-2006, 09:35 AM
Thanks bigwebguy. Appreciate the help, as usual. The part about the specific class or id for the search results is exactly what I was wondering. I guess my question should have been, "Is the search page fully css-ified yet?" :):

Mike Lane
Jan-31-2006, 09:48 AM
Use the source luke...

rich56k
Apr-29-2006, 07:22 PM
Use the source luke...

Is possible to set up the 'Search' box function as a completely site specific device?
( to dis-able the 'other searches' portion?)
While still using the "SMUGSEARCH' code?
Thanks,
rich
http://rich56k.smugmug.com

Andy
Apr-29-2006, 07:25 PM
Is possible to set up the 'Search' box function as a completely site specific device?
( to dis-able the 'other searches' portion?)
While still using the "SMUGSEARCH' code?
Thanks,
rich
http://rich56k.smugmug.com

You can remove the "all smugmug" bits but only for modern browsers, not for IE6.

I'm heading to bed, you can search for it, there was post on this recently.

Otherwise, ping this thread again tomw and I'll try to find it for you.

rich56k
Apr-29-2006, 07:30 PM
You can remove the "all smugmug" bits but only for modern browsers, not for IE6.

I'm heading to bed, you can search for it, there was post on this recently.

Otherwise, ping this thread again tomw and I'll try to find it for you.
Will try the search...(IE6 is a concern as bulk of my viewers are on it)
If questions persist will drop in tomorrow,
Thanks Andy,
rich

Will wait to see if any one has / writes an IE6 hack for this....

Andy
Apr-30-2006, 03:00 AM
Will try the search...(IE6 is a concern as bulk of my viewers are on it)
If questions persist will drop in tomorrow,
Thanks Andy,
rich

Will wait to see if any one has / writes an IE6 hack for this....

A few people in Redmond, Washington have written one. It's called IE7 :lol3

peestandingup
Apr-30-2006, 10:44 PM
Does anyone know a way I can get this search box to show up at the far end of my breadcrumb without moving any of my existing padding any lower? I want it to look just like this:

http://img.photobucket.com/albums/v334/peestandingup/search2.jpg

Cammo
May-06-2006, 05:01 AM
i guess i'm supposed to answer this huh?

1) can you change the word search..yes. put this as the last thing in your header box.

<script type="text/javascript">
document.getElementById('searchWords').value = 'search photos';
</script>

This looks great however when you click in the search box it doesn't delete the text "search photos" like it does normally, any ideas?

Thanks!

gus
Jul-18-2006, 10:48 PM
all you need to do now is:

<p align="center">SMUGSEARCH</p>

it is highly recommended to use the new SMUGSEARCH keyword because if the search engine ever changes, the code that is generated by the smugmug servers will automatically be updated.

:ear
yerbut....where do i paste it mate ??

java script or head tag or CSS etc.

Andy
Jul-18-2006, 11:04 PM
yerbut....where do i paste it mate ??

java script or head tag or CSS etc.
In your header, mate :thumb

gus
Jul-19-2006, 02:56 AM
In your header, mate :thumb
Is the header the head tag ? Im serious...might sound like im pulling the pisser out of you but i have no idea once you lot start abreviating stuff.

bwg
Jul-19-2006, 03:21 AM
Is the header the head tag ? Im serious...might sound like im pulling the pisser out of you but i have no idea once you lot start abreviating stuff.goes in the header section (not the head tag section) of your customization.

when the SM server sees SMUGSEARCH, it'll insert the search code stuff there. so wherever in your header you want the search to appear, that's where you put SMUGSEARCH.

full bottle?

Dna
Jul-19-2006, 05:58 AM
so, using <p align="center">SMUGSEARCH</p> this can only go in the header ?

I use this code at the moment, since I want a search just on my site.
<html>

<!-- Site Keyword Search -->
<form name="suggest" action="/keyword/jump.mg">
<div class="search">search
<input autocomplete="off" maxLength=256 size=25 name="Keyword" value="" onfocus="InstallAC(document.suggest,document.suggest.Keywor d,document.suggest.submitButton,'suggestRPC.mg','e n')" />
<input type=submit value="keyword search" name="submitButton" class="buttons" />
******** src="/include/js/keywordsuggest.js""></********
</form>
</div>
<!-- End Site Keyword Search -->
</html> It doesn't have to be numerical or less than 4 letter, it just has to work, but I don't want it on every page. My Galleries are already sorted by category and sub-cat so search is of a lower priority.

Dna

lsv.smugmug.com

(insert script where there is ******* :dunno )

Andy
Jul-19-2006, 07:28 AM
so, using <p align="center">SMUGSEARCH</p> this can only go in the header ?

I use this code at the moment, since I want a search just on my site.
<html>

<!-- Site Keyword Search -->
<form name="suggest" action="/keyword/jump.mg">
<div class="search">search
<input autocomplete="off" maxLength=256 size=25 name="Keyword" value="" onfocus="InstallAC(document.suggest,document.suggest.Keywor d,document.suggest.submitButton,'suggestRPC.mg','e n')" />
<input type=submit value="keyword search" name="submitButton" class="buttons" />
******** src="/include/js/keywordsuggest.js""></********
</form>
</div>
<!-- End Site Keyword Search -->
</html> It doesn't have to be numerical or less than 4 letter, it just has to work, but I don't want it on every page. My Galleries are already sorted by category and sub-cat so search is of a lower priority.

Dna

lsv.smugmug.com

(insert script where there is ******* :dunno )

I r dumb, I'm not understanding your question, Dna, sorry :scratch

Dna
Jul-19-2006, 03:02 PM
I r dumb, I'm not understanding your question, Dna, sorry :scratchThe use of Smugsearch has to go in the header.
1. Is there a hack to put it somewhere else, eg footer ? Or do I have to use the javascript search for that ?
2. I assume that you could use css to move the Smugsearch from the header to whereever you want ?
3. Smugsearch only searches your site ?

Thanks

Dna

bwg
Jul-19-2006, 04:21 PM
The use of Smugsearch has to go in the header.
1. Is there a hack to put it somewhere else, eg footer ? Or do I have to use the javascript search for that ?
2. I assume that you could use css to move the Smugsearch from the header to whereever you want ?
3. Smugsearch only searches your site ?

Thanks

Dnayes, the use of smugsearch has to go in the header

however, you COULD do the following (i do this on my site)

put the smugsearch in a div: <div id="tmpSrch" style="display: none;">SMUGSEARCH</div>

then create an empty div where you want the search to ultimately live: <div id="smugsearch2"></div>

the final step is to write a javascript function to take the contents (innerHTML) of tmpSrch and put it into smugsearch2. you can see the result at http://bigwebguy.smugmug.com

Dna
Jul-19-2006, 04:37 PM
yes, the use of smugsearch has to go in the header

however, you COULD do the following (i do this on my site)

put the smugsearch in a div: <div id="tmpSrch" style="display: none;">SMUGSEARCH</div>

then create an empty div where you want the search to ultimately live: <div id="smugsearch2"></div>

the final step is to write a javascript function to take the contents (innerHTML) of tmpSrch and put it into smugsearch2. you can see the result at http://bigwebguy.smugmug.comThanks for the reply BWG.
Will it live in the header as part of the menu list ? ie <li>SMUGSEARCH</li> ?

And I assume that if I put an id in there, I can style it to fit the rest of the theme ?

Dna

bwg
Jul-19-2006, 04:47 PM
Thanks for the reply BWG.
Will it live in the header as part of the menu list ? ie <li>SMUGSEARCH</li> ?

And I assume that if I put an id in there, I can style it to fit the rest of the theme ?

Dnasure, it can do that. i promise if you try it you wont break the internets!

gus
Jul-19-2006, 08:21 PM
goes in the header section (not the head tag section) of your customization.

when the SM server sees SMUGSEARCH, it'll insert the search code stuff there. so wherever in your header you want the search to appear, that's where you put SMUGSEARCH.

full bottle?
Thanks mate..up & working :thumb

This stuff aint that hard if i can keep you lot from assuming the rest of us live in the dark with pasty white skin.

devbobo
Jul-19-2006, 10:17 PM
This stuff aint that hard if i can keep you lot from assuming the rest of us live in the dark with pasty white skin.
gus gus gus.....

ur preconceived notions of us 'technical people' are more than amusing. What's makes you think you're any less pasty than us ? :scratch

bwg
Jul-20-2006, 01:41 AM
Thanks mate..up & working :thumb

This stuff aint that hard if i can keep you lot from assuming the rest of us live in the dark with pasty white skin.that's alright gus, just go back to your croc chasing, boomerang throwing and steve irwin watching. Leave the technical stuff to us pasties.

gus
Jul-26-2006, 11:15 PM
gus gus gus.....

ur preconceived notions of us 'technical people' are more than amusing. What's makes you think you're any less pasty than us ? :scratch
Your all tall greys thats why. I dont for one min think that man worked the chip out by himself....hence the need some 'special people' planted to keep it working.

profurious
Sep-01-2006, 06:01 AM
ok, so i have a few questions about this search bar thing.

1. from what i can gather, it will search all of smug mug, i don't want this so i guess i can use the code that dna used to only search my site, is this right.
2. what exactly does it search, ie file names, IPTC, etc, we do all are description through cs2, file-file info-description, will the search bar recognize that info.
3. sort of refers to ?1, if i can use dna's code, will it do search's for numbers, ie if someone want to do a search for #17 say, will they be able to do that

all the help i could get on this would be great

http://alteredimages.smugmug.com/

ivar
Sep-01-2006, 02:35 PM
ok, so i have a few questions about this search bar thing.

1. from what i can gather, it will search all of smug mug, i don't want this so i guess i can use the code that dna used to only search my site, is this right.
2. what exactly does it search, ie file names, IPTC, etc, we do all are description through cs2, file-file info-description, will the search bar recognize that info.
3. sort of refers to ?1, if i can use dna's code, will it do search's for numbers, ie if someone want to do a search for #17 say, will they be able to do that

all the help i could get on this would be great

http://alteredimages.smugmug.com/Hi Profurious :wave

Yes, SMUGSEARCH searches through entire smugmug, so if you want to limit it to your site, you will have to use other code.

The search function searches through captions and keywords (also the gallery keywords).

It will search numbers, however, they every search has to be 4 characters. So searching 13 doesn't work, search 1234 does work.

There was an thread about searching shorter words recently on dgrin, i'll see if i can find it for you.

I hope this helps.

ivar
Sep-01-2006, 02:58 PM
Profurious, this might also be something you would like to read: http://www.dgrin.com/showthread.php?t=38113

justME
Oct-03-2006, 02:33 PM
http://justineolson.smugmug.com/
Hello.
Never mind.

MAHAROGERS
Jun-09-2007, 01:05 PM
I love this simple command but I just can't get the search box to show up where I want it to.

How can I get it to align right next to the smugmug style drop-down menu. If you look at this gallery in ie the box shows up in the upper right. In firefox it's on the extreme left.

http://markrogersphotography.smugmug.com/gallery/2138270#110975747

Help,,,,,

From Onethumb's Release Notes (http://blogs.smugmug.com/release-notes/) Searching can now have your look and feel, with your header and footer...

And, it only takes one word: SMUGSEARCH

By putting the word SMUGSEARCH in your header, the smugmug servers will use advanced character recognition technology to generate all the code for a site specific search box and search button. you dont have to code a thing!

For example instead of using this code:


<p align="center"><font face="Verdana" size="2">
<form method="get" action="/search/index.mg">
<input type="text" name="searchWords" />
<input type="hidden" name="searchType" value="InUser" />
<input type="hidden" name="NickName" value="yournicknamehere" />
<input type="submit" value="Search yournickname's Galleries" />
</form>
</font></p>

all you need to do now is:

<p align="center">SMUGSEARCH</p>
it is highly recommended to use the new SMUGSEARCH keyword because if the search engine ever changes, the code that is generated by the smugmug servers will automatically be updated.

:ear

Allen
Jun-09-2007, 07:22 PM
I love this simple command but I just can't get the search box to show up where I want it to.

How can I get it to align right next to the smugmug style drop-down menu. If you look at this gallery in ie the box shows up in the upper right. In firefox it's on the extreme left.

http://markrogersphotography.smugmug.com/gallery/2138270#110975747

Help,,,,, Look in your header code and see where the </p> is because
in the generated code it shows this.

<p align="right"></p><form name="searchBox" ...


Incorrect
<p align="center"></p>SMUGSEARCH
correct
<p align="center">SMUGSEARCH</p>

MAHAROGERS
Jun-10-2007, 06:54 AM
Ok, I changed but the same thing is still happening. I've tried "center" and "right" but it still displays the same way.

Look in your header code and see where the </p> is because
in the generated code it shows this.

<p align="right"></p><form name="searchBox" ...


Incorrect
<p align="center"></p>SMUGSEARCH
correct
<p align="center">SMUGSEARCH</p>

Allen
Jun-10-2007, 07:15 AM
Ok, I changed but the same thing is still happening. I've tried "center" and "right" but it still displays the same way.
Try it this way

in header

<div align="center">SMUGSEARCH</div>

Add to CSS

#searchBox {
position: relative;
left: 340px;
}

MAHAROGERS
Jun-10-2007, 07:34 AM
Ok - that's much better but could I get the search box to sit immediately to the left or right of the gallery style drop-down selector -- like Andy W has up in his header -- so they're not stacked and force the page content down so far. Better yet, how did Andy get them to show up on the top right side of his galleries in his actual header art -- that's a much more efficient use of the space.

And, by the way, can't tell you how much I appreciate your patience and help with all this.

Mark

Try it this way

in header

<div align="center">SMUGSEARCH</div>

Add to CSS

#searchBox {
position: relative;
left: 340px;
}

Allen
Jun-10-2007, 07:49 AM
Ok - that's much better but could I get the search box to sit immediately to the left or right of the gallery style drop-down selector -- like Andy W has up in his header -- so they're not stacked and force the page content down so far. Better yet, how did Andy get them to show up on the top right side of his galleries in his actual header art -- that's a much more efficient use of the space.

And, by the way, can't tell you how much I appreciate your patience and help with all this.

Mark
Try this combo and check all the different pages.

#searchBox {
position: relative;
left: 300px;
top: 10px;
}

.smugmug #searchBox {
position: relative;
left: 190px;
top: 28px;
}

.smugmug_small #searchBox {
position: relative;
left: 180px;
top: 28px;
}

mikeseb
Jun-11-2007, 03:15 PM
How cool it would be, as long as we're on the subject of search functionality, to be able to supply a link on my site, that when clicked, brings the visitor to the search results page showing whatever I wanted him/her to see.

For instance, I have a number of images sprinkled throughout my site that appeared in exhibitions; during their run they were in dedicated exhibition galleries, but after the run ended they were put into their permanent gallery homes according to subject matter.

On my "list of shows" page or whatever, how cool if I could say "click here to view all images from my MOMA exhibition of January 2006". the images would then be aggregated for our viewing pleasure.

how would a guy make this happen?

Mike S.
msphoto.smugmug.com

PBolchover
Jun-11-2007, 09:58 PM
How cool it would be, as long as we're on the subject of search functionality, to be able to supply a link on my site, that when clicked, brings the visitor to the search results page showing whatever I wanted him/her to see.

For instance, I have a number of images sprinkled throughout my site that appeared in exhibitions; during their run they were in dedicated exhibition galleries, but after the run ended they were put into their permanent gallery homes according to subject matter.

On my "list of shows" page or whatever, how cool if I could say "click here to view all images from my MOMA exhibition of January 2006". the images would then be aggregated for our viewing pleasure.

how would a guy make this happen?


Use keywords.

Keyword every image from the exihibition with MOMO2006 (or whatever you prefer), then send the user to the relevant keyword search.