Page 2 of 2

Re: Search just one category or section

Posted: Fri Jun 11, 2010 9:42 pm
by mshoaib
Thanks alot for the quick reply. I will be waiting for it.

Re: Search just one category or section

Posted: Thu Jun 17, 2010 2:07 pm
by jawad nisar
hello freerider

you posted some attachments on wed Thu Oct 15, 2009 8:35 am. i have changed the files as instructed. but nothing changed to search function kindly guide me so that i could complete this task

Re: Search just one category or section

Posted: Wed Oct 13, 2010 1:02 pm
by syhussaini
Please help...

Even I am looking for something similar for the new versions of Joomla.
Currently working with Joomla 1.5.20

Re: Search just one category or section

Posted: Sat Apr 02, 2011 8:54 pm
by yosia
Any way of getting this module for Joomla 1.5 without activating the Legacy mode?

Greetings.

Re: Search just one category or section

Posted: Wed Oct 26, 2011 10:34 pm
by yekibud
So I decided not to invest the effort to make this plugable as I am no longer interested in supporting Joomla projects, but I did validate the hack for Joomla 1.5.23 and updated the component model and content search plugin to exclude other search plugins that might get called and appended to your section search.

Just extract the archive to your site root and you should be good to go.

Re: Search just one category or section

Posted: Sun Jan 22, 2012 10:18 pm
by amoradi
hi

thanks for education

but Error occurred search result
this error:
Warning: Invalid argument supplied for foreach() in F:\xammp4\xampplite\htdocs\joomla10\plugins\search\content.php on line 189

please check again...

Re: Search just one category or section

Posted: Mon Jan 23, 2012 1:55 am
by yekibud
What version of Joomla are you using? Did you set a section search ID in the module?

Could you add print_r($row); on line 188 and tell me what you get?

Re: Search just one category or section

Posted: Mon Jan 23, 2012 9:22 am
by amoradi
my joomla version is 1.5.24
I set section search id 1

add $print_r($row); but Does not work...

Re: Search just one category or section

Posted: Mon Jan 23, 2012 4:40 pm
by yekibud
It's

Code: Select all

print_r($row);
not

Code: Select all

$print_r($row);
. You should see the output in your browser when you search using your section search module. It should be some sort of Joomla content/article object.

I've only tested this for Joomla 1.5.23 - but I doubt a minor version change would make a difference. Do you have articles related to section 1?

If

Code: Select all

print_r($row);
doesn't give you any output then just add
exit;
on the next line. That should give you a blank page when you search. Then at least we know the code is being called.

Re: Search just one category or section

Posted: Mon Jan 23, 2012 6:14 pm
by amoradi
I'm sorry

I Write a mistake

Is correct:
print_r($row);

add this code,but does not work!

when add this code: exit;
displaye blank page

I have in this section many article...

please check again

Re: Search just one category or section

Posted: Mon Jan 23, 2012 6:29 pm
by yekibud
That doesn't sound right. Could you post your plugins/search/content.php file?

Re: Search just one category or section

Posted: Mon Jan 23, 2012 7:42 pm
by amoradi
I replace all attached file, but not work

this my content.php file:

Re: Search just one category or section

Posted: Tue Jan 24, 2012 5:59 pm
by yekibud
Hm, the file looks right. I'll have to do a fresh install of 1.5.24 to try to duplicate the problem you are having. Probably wont get to it till the end of the week, though.

Re: Search just one category or section

Posted: Wed Feb 01, 2012 6:14 pm
by macastillo
freerider wrote:Thank you!!! a milion!!!
...
I allso tried to implement to limit search by category. And it all went without problem.
Now I have option of limiting search by categories or sections... Yeeaj!!! 8)
If you need solution, see my attached file (it is tested on Joomla 1.5.10!!!!!)

Yekibud thanks again!!!
Hi.

It works fine, but when you do a second search with the searchbox on the resultpage (not the module), he searches the complete site again. The parameter section_id is shown in the url, but the value remains empty.

How can be fixed?

Regards,

Re: Search just one category or section

Posted: Wed Feb 01, 2012 9:04 pm
by yekibud
@macastillo:

Glad to hear it's working for you (at least on the first search). That's how it works for me, too. It's probably just not a popular feature on my site, since nobody has complained for two years. But, it's still a bug, so I should probably fix it. I'll see if I can at least take a peak at it in the next couple days.

What version of Joomla are you using, btw?

Re: Search just one category or section

Posted: Thu Feb 02, 2012 3:52 pm
by macastillo
Hi @yekibud:

Thanks for your answer!
yekibud wrote:@macastillo:

Glad to hear it's working for you (at least on the first search). That's how it works for me, too. It's probably just not a popular feature on my site, since nobody has complained for two years.
People usually don't complain, just says at their mind "this doesn't work..." ;-)
yekibud wrote: But, it's still a bug, so I should probably fix it. I'll see if I can at least take a peak at it in the next couple days.

What version of Joomla are you using, btw?
I'm using Joomla v1.5.17. I don't know about PHP... I was a programmer 15 years ago, so I can read code but I can't fix it :-(

I also tried with hidding searchForm, but it only shows the results, not how many results do you have (if you have 0 results, it only shows an empty page).

Regards.

Re: Search just one category or section

Posted: Fri Feb 03, 2012 9:37 pm
by amoradi
yekibud wrote:Hm, the file looks right. I'll have to do a fresh install of 1.5.24 to try to duplicate the problem you are having. Probably wont get to it till the end of the week, though.
hi yekibud

I'm wait, but still not answer for problem

please check it...
I need a solution...

Re: Search just one category or section

Posted: Sun Feb 09, 2014 12:04 pm
by OmegaV
@Yekibud

Thank you!!! I really appreciate your post in this forum !!!

I apply your coding to limit my category search for my joomla 3.x.

And it is still work :D