This simple module provides a block with a searchform to search in Google, Bing, Yahoo!, Alta Vista or Dogpile.
Upload files to /sites/all/modules/searchblock/ and activate the module. You should find the block in the block section.
No configuration is required, but you can add descriptional text, select the result to be displayed in the same browser window or in a new one. You can also choose whether you want the search engine option in a drop down menu or radio buttons. The default text on the searchbutton is "Search", but you also have the option to change it.
The module is for Drupal 7.
Link to Sandbox page: http://drupal.org/sandbox/pkPlus/1893704
Link to GIT: http://drupalcode.org/sandbox/pkPlus/1893704.git
Link to Drupalcode tree: http://drupalcode.org/sandbox/pkPlus/1893704.git/tree
Live example: http://www.internor.com/content/searchblock-drupal
Comments
Comment #0.0
pkPlus commentedImage added.
Comment #0.1
pkPlus commentedAdded link to Drupalcode tree
Comment #0.2
pkPlus commentedAdded pathname to upload directory
Comment #0.3
pkPlus commentedPaddint on image
Comment #0.4
pkPlus commentedChanged description text
Comment #1
nikro commentedHi pkPlus,
I'll just give you a quick heads up. I'm not sure if that's a module someone would need, but if you really want to continue it's development, would be awesome of people would be able to specify engines that they want to enable, in the configuration form.
Automated Review
Make sure you get no errors and no warnings (you can re-run the test via Repeat Review):
http://ventral.org/pareview/httpgitdrupalorgsandboxpkplus1893704git
Manual Review
searchblock_block.js
You have to rewrite the functionality, take a look at: http://drupal.org/node/171213
Use jQuery to add behavior to your search block, instead of calling the function directly onclick.
searchblock_block.module
All-in-all I'd recommend you to use Form API instead of outputting a
in your theme function. Users will be able to add custom functionality to your form, preprocess and process functions, etc.
I'm not aware right now of a module with similar functionality (I didn't search really intense thou'), but if your module can be used as a standalone module, consider making it a bit more dynamic in the future.
Keep up the good work, cheers!
Comment #2
nikro commentedI have to stop forgetting to change statuses!
Comment #3
nikro commentedAlso make sure you get rid of the master branch, follow these instructions: http://drupal.org/node/1127732
Comment #4
pkPlus commentedHi Nikro
Thank you for reviewing this and thank you very much for more great advices and tips. This is my first attempt to create a module, so I have a lot to learn. I appreciate your advices and will dive into the matter and do something with what you pointed out.
I'm working on developing a bookmarking site, where users can choose which bookmarks they want on their own custom page. At the same time, I thought it might be nice for users to have a search box where they can select what search engine to use. I found no modules for that, so I gave it a try myself.
Thanks a lot! :)
Comment #5
arun ak commentedHi,
In your module js file add drupal js behaviour.
Comment #6
chris.smith commentedComment #7
stborchertIt appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and we will take a look at your project right away.
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
Comment #8
PA robot commentedClosing due to lack of activity. Feel free to reopen if you are still working on this application.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #8.0
PA robot commentedAdded link to example