PDA

View Full Version : Redirecting empty search queries


Neticus
01-03-2006, 02:59 AM
When the search button is pressed without any keywords it returns a list of all the featured listings. Where is the code that directs this so that I may direct it to the index page instead?

Thnks

Neticus

Neticus
01-05-2006, 02:51 PM
Anybody???? All i need is the name of the file and in that file i presume there is a url code i'll be able to change?

clubracer
02-21-2006, 09:30 AM
you found a workaround on that?

on my phpld it shows all the regular links, this is going to bring me in trouble when i get more then 25 links, the page will be way too large.

a redirect to the index page (with an empty search query) will do the job.

Neticus
02-21-2006, 02:31 PM
No, but like you i need it for v3.02 Ive posted query in supporters forum :)

clubracer
02-21-2006, 04:52 PM
good job!

Boby
02-21-2006, 08:18 PM
Hello!

This is just a quick fix!

Edit index.php and find the following code line:
Content visible to registered users only.
It's the first line of code, just right after the the looong comment.

Insert this right after the found line:
Content visible to registered users only.

I suggest you also stop searches for a keyword shorter than 3 chars. This can cause problems on huge databases.
Let's say you search for "a" or "ar", this can find to many results and your allowed memory will be in short time exhausted. But you can now search for "art" that is allowed by the script and you'll find some results.
Content visible to registered users only.
Just my 2 cents :wink:

Boby

clubracer
02-21-2006, 09:14 PM
THNX Boby!

your search update is working on v3.0.2

Boby
02-21-2006, 09:22 PM
Content visible to registered users only.
You are welcome!

Content visible to registered users only.
Actually it's working on both, phpLD2 and phpLD3 :)

Boby

Kevuk2k
02-21-2006, 10:29 PM
Content visible to registered users only.
You are welcome!

Content visible to registered users only.
Actually it's working on both, phpLD2 and phpLD3 :)

Boby[/quote]

Boby, it is because of you and the work you do for this site together with the main man that I am proud to be part of phplinkdirectory. You do things without question, you should be proud of yourself. Well done mate.

Good luck with the exams, and how did the maths one go! Bet it was easy :lol:

Kev

P.S. Almost all on my own I got the front page looking as I wanted, it was your hint that helped. :wink:

Boby
02-21-2006, 10:41 PM
Content visible to registered users only.
Thank you, again! Well, I really like this script and if I am helping to develop this, I want it to run for all of our users.

Content visible to registered users only.
I need some luck! :) I have every day till next week maths exams. Did not passed the first :cry: [no big deal], but I hope to make better for the others.

Content visible to registered users only.
I see you are doing well on your directory, I like the icons. :lol:

Boby

Kevuk2k
02-21-2006, 11:09 PM
Content visible to registered users only.
Thank you, again! Well, I really like this script and if I am helping to develop this, I want it to run for all of our users.

Content visible to registered users only.
I need some luck! :) I have every day till next week maths exams. Did not passed the first :cry: [no big deal], but I hope to make better for the others.

Content visible to registered users only.
I see you are doing well on your directory, I like the icons. :lol:

Boby[/quote]

Hi Boby, sad you failed the first. The icons only work with the 'enable re-write set to yes'

I've also found a problem with the links, In for example there are more than 23 links yet when you click on 'next' it reverts to the first page even though it reads in the browser bar.

I will post on the forum for you and for others so that at least one of you will find the fix.

Cheers, and good luck.

Kev

Boby
02-21-2006, 11:20 PM
Content visible to registered users only.
Yes, that would be good :)
This way we can separate different problems.

Boby

Kevuk2k
02-21-2006, 11:28 PM
Content visible to registered users only.
Yes, that would be good :)
This way we can separate different problems.

Boby[/quote]

Just Have Boby. Will of course reward for work. :wink:

Kev

Neticus
02-22-2006, 04:01 AM
Thanks for the solution Boby. Big help! :)
Neticus

igotdreams
02-24-2006, 09:42 PM
does anyone get the featured listings but no data when conducting searches with version 3.0.2 or earlier????

I am.

http://web--site.net/

anon
02-24-2006, 09:55 PM
Content visible to registered users only.
You are welcome!

Content visible to registered users only.
Actually it's working on both, phpLD2 and phpLD3 :)

Boby[/quote]

Boby, it is because of you and the work you do for this site together with the main man that I am proud to be part of phplinkdirectory. You do things without question, you should be proud of yourself. Well done mate.

[/quote]

Agreed 100%

Both David And Bobby are awesome! They are always there to offer support and help out.

crawlr
05-17-2006, 09:56 PM
Hi,

This mod isn't working for me on v3.0.4.

Not sure whats wrong, entered the code as specified.

anon
05-17-2006, 10:09 PM
Content visible to registered users only.
Well, for starters, look at the date when this mod was made. (e.g. PRE 3.04)

secondly, you *are* returning results as per what your pagination says (25 links currently)

What you have to do if modify your main.tpl to recognize the search.

if you read the 'readme.txt' that came with the upgrade, you'll see in there that Boby has given detail as to what's changed, and what variables have been change too.

give that a good look over and see what you can come up with.

Rob

crawlr
05-17-2006, 11:43 PM
Yes I knew it was pre 3.0.4. but someone else mentioned it worked w/ 3.0.2. I'm not very "code savvy" -- has anyone else updated this mod?

bobby9101
05-23-2006, 06:34 PM
doesn't work with 2.0
at ;east for me

Jama62
06-03-2006, 09:40 AM
This mod worked on my ver 2. Nice mod thanx