Search just one category or section

Discuss the development and implementation of Joomla! bots/Plugins here.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
mshoaib
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Tue Nov 10, 2009 4:09 pm

Re: Search just one category or section

Postby mshoaib » Fri Jun 11, 2010 9:42 pm

Thanks alot for the quick reply. I will be waiting for it.

jawad nisar
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Jun 17, 2010 11:01 am

Re: Search just one category or section

Postby jawad nisar » Thu Jun 17, 2010 2:07 pm

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

User avatar
syhussaini
Joomla! Explorer
Joomla! Explorer
Posts: 348
Joined: Sat Jan 03, 2009 2:20 pm
Location: Hyderabad-India
Contact:

Re: Search just one category or section

Postby syhussaini » Wed Oct 13, 2010 1:02 pm

Please help...

Even I am looking for something similar for the new versions of Joomla.
Currently working with Joomla 1.5.20
Thanks & Warm Regards
Syed
http://MyBloggingHelp.com/

yosia
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Thu Apr 10, 2008 7:30 pm

Re: Search just one category or section

Postby yosia » Sat Apr 02, 2011 8:54 pm

Any way of getting this module for Joomla 1.5 without activating the Legacy mode?

Greetings.

yekibud
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Tue Jan 13, 2009 4:32 pm
Location: Sacramento, California

Re: Search just one category or section

Postby yekibud » Wed Oct 26, 2011 10:34 pm

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.
You do not have the required permissions to view the files attached to this post.

amoradi
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Apr 17, 2011 7:03 am

Re: Search just one category or section

Postby amoradi » Sun Jan 22, 2012 10:18 pm

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...

yekibud
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Tue Jan 13, 2009 4:32 pm
Location: Sacramento, California

Re: Search just one category or section

Postby yekibud » Mon Jan 23, 2012 1:55 am

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?

amoradi
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Apr 17, 2011 7:03 am

Re: Search just one category or section

Postby amoradi » Mon Jan 23, 2012 9:22 am

my joomla version is 1.5.24
I set section search id 1

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

yekibud
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Tue Jan 13, 2009 4:32 pm
Location: Sacramento, California

Re: Search just one category or section

Postby yekibud » Mon Jan 23, 2012 4:40 pm

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.

amoradi
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Apr 17, 2011 7:03 am

Re: Search just one category or section

Postby amoradi » Mon Jan 23, 2012 6:14 pm

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

yekibud
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Tue Jan 13, 2009 4:32 pm
Location: Sacramento, California

Re: Search just one category or section

Postby yekibud » Mon Jan 23, 2012 6:29 pm

That doesn't sound right. Could you post your plugins/search/content.php file?

amoradi
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Apr 17, 2011 7:03 am

Re: Search just one category or section

Postby amoradi » Mon Jan 23, 2012 7:42 pm

I replace all attached file, but not work

this my content.php file:
You do not have the required permissions to view the files attached to this post.

yekibud
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Tue Jan 13, 2009 4:32 pm
Location: Sacramento, California

Re: Search just one category or section

Postby yekibud » Tue Jan 24, 2012 5:59 pm

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.

macastillo
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Feb 01, 2012 3:37 pm
Location: Chile
Contact:

Re: Search just one category or section

Postby macastillo » Wed Feb 01, 2012 6:14 pm

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,

yekibud
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Tue Jan 13, 2009 4:32 pm
Location: Sacramento, California

Re: Search just one category or section

Postby yekibud » Wed Feb 01, 2012 9:04 pm

@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?

macastillo
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Feb 01, 2012 3:37 pm
Location: Chile
Contact:

Re: Search just one category or section

Postby macastillo » Thu Feb 02, 2012 3:52 pm

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.

amoradi
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Apr 17, 2011 7:03 am

Re: Search just one category or section

Postby amoradi » Fri Feb 03, 2012 9:37 pm

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...

OmegaV
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Sat Feb 01, 2014 2:10 pm

Re: Search just one category or section

Postby OmegaV » Sun Feb 09, 2014 12:04 pm

@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


Return to “Plugins/Mambots”

Who is online

Users browsing this forum: No registered users and 4 guests