View Full Version : Advanced Search doesn't recognize numbers(FIXED)
September 2nd, 2005, 03:37 AM
Navbar Advanced Search doesn't recognize numbers,
The search function above category index does.
For example, if I have an item number, example, PI#233849, the lower search box recognizes and finds all thumbs of said item.
But the Advanced Search for PI#233849 finds only finds items - PI .
September 7th, 2005, 08:01 AM
Please explain how you mean?
I search the main search thing and enter 55 all photos with 55 are returned. I do the same thing with the real search page and the same results are returned. There should be no difference here as the form action goes to showgallery.php where the search results are pulled.
September 7th, 2005, 08:23 AM
Try typing in PI#233849
The search box on index page gives correct results - 9 pics.
The advanced doesn't. It shows many pages of pics, finds all listings with PI. - doesnt recognize numbers.
Note when done in advanced search, search result only show the letters PI in the search box at index.
September 7th, 2005, 08:50 AM
You have some old files on your install. This is suppose to be in showgallery.php and I bet it's not in yours
if ( !isset($when) || $when < 1 ) $when = "";
Example being your using a showgallery.php file from Photopost 5.1 when the above meantioned bug was fixed on July 12th in Photopost 5.11
So please ensure you are running 5.14 files
September 8th, 2005, 01:00 AM
We've just upgraded to 5.14, and yes, the above code is now showing. However advanced Search does still not find example, PI#233849
Please check Post #3 with example to try out.
If you need further access, let me know.
September 8th, 2005, 05:34 AM
Mark your install still has the OLD FILE on it
TELL TAKE GIVE AWAY RIGHT IN THAT URL WHEN I DO A SEARCH ON YOUR INSTALL
Take that when=0 out of the url and you see it work. This was a bug I fixed back in 5.11 on July 12th and indeed line 437 is correct.
I suggest deleting your old files and reupload.
September 8th, 2005, 07:52 AM
showgallery.php was indeed replaced and line 437 does show as you have mentioned.
Not sure what other files we should replace as my wife Carole has been doing all upgrades as per instructions, but mistakes happen.
She's off to work and will take a closer look when she gets back home later.
September 8th, 2005, 08:09 AM
Well look at the line I am posting from showgallery
if ( !isset($when) || $when < 1 ) $when = "";
Your file is not getting overwritten or something because if when is 0 that line sets it to empty and it will not display in the url
September 9th, 2005, 11:07 PM
We tried it without any modification...
The problem appears to be that the advanced Search does not recognize #.
In a search for PI#233849, it also searches for PI
BTW, we have Display Keywords turned off, but turned it on briefly, and noticed that with thumb titles having PI#233849, that the keyword showed as PI 233849. The # character was not in the keyword.
Also, as mentioned previously, the search box on index page DOES WORK.
Typing in PI#233849 does indeed find these pics.
Hope this helps find the problem,
Mark and Carole
September 10th, 2005, 07:04 AM
I have answered this by your private email and I will answer it here.
You must replace all your hacked files with brand new 5.14 unhacked files
Note here is your search url
Here is an unhacked photopost
September 10th, 2005, 09:36 PM
I have replaced all the php files (except config-inc.php, config-int.php and install.php) and also replaced all the templates - We still have the same problem with the advanced search - when we paste in PI#233849 the search finds everything that has the letters PI which includes many pictures that are not related to PI#233849
Would you experiment and put the #and follow it by a group of numbers and then search for the #----- and see what results you get?
We are totally stumped on this one...
September 11th, 2005, 02:44 AM
I uploaded a pic here at PhotoPost, Title - Testing PI#233849
It's still pending ...
Meanwhile I did a search just for # and I got many returns including my pending pic, though # was not in the other pics titles or description.
September 11th, 2005, 10:06 AM
Well it all comes down to the # and I do not have any hypothesis yet. I am testing right now
September 11th, 2005, 02:53 PM
We have a spare lic/domain we use for testing, which Carole thinks she has reverted all files to 5.14, but we're still getting ...
even though at PhotoPost it shows as ...
(I have cleared cookies etc etc)
Our next step (in the next day or so) will be to delete our test installation and try a completely fresh installation.
Fortunately this is no biggie as the index Search box at our site DOES find example item PI#233849 as a single search phrase..
(The biggie is that I have over 500 pics, and more coming, which I've itemized in the above format, and I'd hate to have to go back to, and edit /rephrase to get the advanced search function to find these items.
It's important that researchers can find pics based on the itemized phrase, and the searchbox function does find them.
BTW, I did a search, in the index Search box, at PhotoPost for PI#233849 and it did not find my Testing PI#233849 pic, but this may be because it is still pending.
September 11th, 2005, 06:44 PM
The fix is so easy in search.php add the code in bold
$keywords = urlencode($keywords);
$condition = rawurlencode($condition);
$what = rawurlencode($what);
forward( "showgallery.php?mcats=$scats&si=$keywords&what=$what&name=$name&when=$when&whenterm=$whenterm&condition=$condition", $Globals['pp_lang']['searching'] );
September 11th, 2005, 08:23 PM
by golly! it works as long as we search in these fields:
search title and description
search all fields
It does not work if we search in:
search title only
thank you very much, this is a vast improvement,
September 11th, 2005, 08:34 PM
Hello it certainly works for me on my install testing that search string and the only place the PI#233849 is entered is the title of the photo.
Are any of your photos simple titled that? I think not
Your title's have this -PI#233849- not PI#233849 hense it can't be found since none of the words in the title are like that.
I bet if you uploaded a photo with PI#233849 in the title as one of the words it would work
September 11th, 2005, 09:19 PM
Yep, you are right!
And a BIG THANKS for solving this.
Without these ... -_- it DOES find them in Title Only Search
I will stop adding -_- and remove them from past pics.
Fortunately it does correctly find -PI#233849- in any other search mode using only PI#233849
As a coincidence, today I realized something at our vB forums on the same line...
Plant nomenclature rules - list plants as ... Genus species 'Cultivar'
example - Cucurbita maxima 'Atlantic'
Guess what I realized!!! A search for Atlantic without the '_' returns 0 finds in both search functions at vB, and alas, also at PP.
I guess it's time to throw away the nomenclature rule book!
~ Mark and Carole
September 12th, 2005, 05:40 AM
I really should post this as a new thread, but it ties in with my last comments, so I'll post a note here first ...
This is in reference to typing in Cultivar to find Titles with 'Cultivar'.
Apparently this does work with vB 3.5, but not with vB 3.0.
Jake explained my query here ...
Now if this could work in a PhotoPost search I won't have to change all the 'Cultivar' Titles in the pics :)
Shall I post this into suggestions?
September 12th, 2005, 06:06 AM
Yes that would not be a bug as there is no boolean search. You would need to post in suggestions
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.