Hi

I needed to search from one of the parameters of the urls in my app and I couldn't find anything useful for having the search term as an argument and not a filter, so I've added it.

I am testing it but seems to work fine.

(The zip attached includes views_handler_argument_search.inc file, which should be placed in views/modules/search folder)

Comments

dawehner’s picture

Version: 6.x-2.6 » 6.x-2.x-dev
Category: task » feature
Status: Active » Needs work

Updating status.

It would be cool if you would include the handler in the patch, read http://drupal.org/patch/create how to do it with cvs.

// $Id

Should be $Id$

 * @author pcambra

I'm not sure whether this should be part of the handler...

The code of the handler looks fine, but i will test it better later

pcambra’s picture

StatusFileSize
new2.34 KB

You are right. I've removed the author and corrected the $Id
I followed the instructions to add a file with a patch and I hope I did correctly!

dawehner’s picture

Status: Needs work » Needs review
+++ handlers/views_handler_argument_search.inc	3 Nov 2009 22:45:43 -0000
@@ -0,0 +1,51 @@
+ *

Remove this line :)

I'm on crack. Are you, too?

Updating status

pcambra’s picture

Status: Needs review » Needs work
StatusFileSize
new2.37 KB

Wrong directory, should be placed in modules/search !

pcambra’s picture

StatusFileSize
new2.27 KB

Like this?

*confused* :-S

pcambra’s picture

Status: Needs work » Needs review
elvis2’s picture

+1 Subscribing...

Any updates on this? Any chance more instructions can be given.

Regards

merlinofchaos’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev
Status: Needs review » Fixed

Committed to 3.x branch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

pokadan’s picture

Why does the .inc in the zip file not work with views 2.x? The argument option does not get picked up when adding Search arguments.

m.stenta’s picture

StatusFileSize
new1.66 KB

I have packaged a small module that basically adds the above code to Views 2.x. I've tested it in Views 2.12 and it seems to work just fine. Just drop it in, enable it, and voila: a Search Terms argument in Views.

Note: the module makes some assumptions about the structure of the existing Views code, so this might not work forever. Worth a try, though, and I hope someone finds it useful.

sinasalek’s picture

Thanks @mstenta, that would be nice to see this included in the next view's release

m.stenta’s picture

I added the above module to my new Git sandbox. Hooray for the Git migration!

http://drupal.org/sandbox/mstenta/1080684

sinasalek’s picture

@mstenta Yeah i'm sure module developers are very happy now days :)! BTW i forgot to mention that your module works well for me thanks again

XiaN Vizjereij’s picture

Subscribe

caponey’s picture

using this module combined with quick tabs to make tabbed search results based on content types. I've wanted to do this forever. thanks so much! great great great contribution.