diff --git a/sites/all/modules/custom_search/LICENSE.txt b/sites/all/modules/custom_search/LICENSE.txt old mode 100644 new mode 100755 index 2c095c8d..d159169d --- a/sites/all/modules/custom_search/LICENSE.txt +++ b/sites/all/modules/custom_search/LICENSE.txt @@ -1,274 +1,339 @@ -GNU GENERAL PUBLIC LICENSE - - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, -Cambridge, MA 02139, USA. Everyone is permitted to copy and distribute -verbatim copies of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your freedom to -share and change it. By contrast, the GNU General Public License is -intended to guarantee your freedom to share and change free software--to -make sure the software is free for all its users. This General Public License -applies to most of the Free Software Foundation's software and to any other -program whose authors commit to using it. (Some other Free Software -Foundation software is covered by the GNU Library General Public License -instead.) You can apply it to your programs, too. - -When we speak of free software, we are referring to freedom, not price. Our -General Public Licenses are designed to make sure that you have the -freedom to distribute copies of free software (and charge for this service if -you wish), that you receive source code or can get it if you want it, that you -can change the software or use pieces of it in new free programs; and that -you know you can do these things. - -To protect your rights, we need to make restrictions that forbid anyone to -deny you these rights or to ask you to surrender the rights. These restrictions -translate to certain responsibilities for you if you distribute copies of the -software, or if you modify it. - -For example, if you distribute copies of such a program, whether gratis or for -a fee, you must give the recipients all the rights that you have. You must make -sure that they, too, receive or can get the source code. And you must show -them these terms so they know their rights. - -We protect your rights with two steps: (1) copyright the software, and (2) -offer you this license which gives you legal permission to copy, distribute -and/or modify the software. - -Also, for each author's protection and ours, we want to make certain that -everyone understands that there is no warranty for this free software. If the -software is modified by someone else and passed on, we want its recipients -to know that what they have is not the original, so that any problems -introduced by others will not reflect on the original authors' reputations. - -Finally, any free program is threatened constantly by software patents. We -wish to avoid the danger that redistributors of a free program will individually -obtain patent licenses, in effect making the program proprietary. To prevent -this, we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - -The precise terms and conditions for copying, distribution and modification -follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND - MODIFICATION - -0. This License applies to any program or other work which contains a notice -placed by the copyright holder saying it may be distributed under the terms -of this General Public License. The "Program", below, refers to any such -program or work, and a "work based on the Program" means either the -Program or any derivative work under copyright law: that is to say, a work -containing the Program or a portion of it, either verbatim or with -modifications and/or translated into another language. (Hereinafter, translation -is included without limitation in the term "modification".) Each licensee is -addressed as "you". - -Activities other than copying, distribution and modification are not covered -by this License; they are outside its scope. The act of running the Program is -not restricted, and the output from the Program is covered only if its contents -constitute a work based on the Program (independent of having been made -by running the Program). Whether that is true depends on what the Program -does. - -1. You may copy and distribute verbatim copies of the Program's source -code as you receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice and -disclaimer of warranty; keep intact all the notices that refer to this License -and to the absence of any warranty; and give any other recipients of the -Program a copy of this License along with the Program. - -You may charge a fee for the physical act of transferring a copy, and you -may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion of it, -thus forming a work based on the Program, and copy and distribute such -modifications or work under the terms of Section 1 above, provided that you -also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices stating that -you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in whole or in -part contains or is derived from the Program or any part thereof, to be -licensed as a whole at no charge to all third parties under the terms of this -License. - -c) If the modified program normally reads commands interactively when run, -you must cause it, when started running for such interactive use in the most -ordinary way, to print or display an announcement including an appropriate -copyright notice and a notice that there is no warranty (or else, saying that -you provide a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this License. -(Exception: if the Program itself is interactive but does not normally print such -an announcement, your work based on the Program is not required to print -an announcement.) - -These requirements apply to the modified work as a whole. If identifiable -sections of that work are not derived from the Program, and can be -reasonably considered independent and separate works in themselves, then -this License, and its terms, do not apply to those sections when you distribute -them as separate works. But when you distribute the same sections as part -of a whole which is a work based on the Program, the distribution of the -whole must be on the terms of this License, whose permissions for other -licensees extend to the entire whole, and thus to each and every part -regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest your rights to -work written entirely by you; rather, the intent is to exercise the right to -control the distribution of derivative or collective works based on the -Program. + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of a -storage or distribution medium does not bring the other work under the scope -of this License. - -3. You may copy and distribute the Program (or a work based on it, under -Section 2) in object code or executable form under the terms of Sections 1 -and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable source -code, which must be distributed under the terms of Sections 1 and 2 above -on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three years, to give -any third party, for a charge no more than your cost of physically performing -source distribution, a complete machine-readable copy of the corresponding -source code, to be distributed under the terms of Sections 1 and 2 above on -a medium customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer to distribute -corresponding source code. (This alternative is allowed only for -noncommercial distribution and only if you received the program in object -code or executable form with such an offer, in accord with Subsection b -above.) +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source code -means all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation and -installation of the executable. However, as a special exception, the source -code distributed need not include anything that is normally distributed (in -either source or binary form) with the major components (compiler, kernel, -and so on) of the operating system on which the executable runs, unless that -component itself accompanies the executable. - -If distribution of executable or object code is made by offering access to -copy from a designated place, then offering equivalent access to copy the -source code from the same place counts as distribution of the source code, -even though third parties are not compelled to copy the source along with the -object code. - -4. You may not copy, modify, sublicense, or distribute the Program except as -expressly provided under this License. Any attempt otherwise to copy, -modify, sublicense or distribute the Program is void, and will automatically -terminate your rights under this License. However, parties who have received -copies, or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - -5. You are not required to accept this License, since you have not signed it. -However, nothing else grants you permission to modify or distribute the -Program or its derivative works. These actions are prohibited by law if you -do not accept this License. Therefore, by modifying or distributing the -Program (or any work based on the Program), you indicate your acceptance -of this License to do so, and all its terms and conditions for copying, -distributing or modifying the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the original -licensor to copy, distribute or modify the Program subject to these terms and -conditions. You may not impose any further restrictions on the recipients' -exercise of the rights granted herein. You are not responsible for enforcing -compliance by third parties to this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), conditions -are imposed on you (whether by court order, agreement or otherwise) that -contradict the conditions of this License, they do not excuse you from the -conditions of this License. If you cannot distribute so as to satisfy -simultaneously your obligations under this License and any other pertinent -obligations, then as a consequence you may not distribute the Program at all. -For example, if a patent license would not permit royalty-free redistribution -of the Program by all those who receive copies directly or indirectly through -you, then the only way you could satisfy both it and this License would be to +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply and -the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any patents or -other property right claims or to contest validity of any such claims; this -section has the sole purpose of protecting the integrity of the free software -distribution system, which is implemented by public license practices. Many -people have made generous contributions to the wide range of software -distributed through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing to -distribute software through any other system and a licensee cannot impose -that choice. - -This section is intended to make thoroughly clear what is believed to be a -consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in certain -countries either by patents or by copyrighted interfaces, the original copyright -holder who places the Program under this License may add an explicit -geographical distribution limitation excluding those countries, so that -distribution is permitted only in or among countries not thus excluded. In such -case, this License incorporates the limitation as if written in the body of this -License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will be -similar in spirit to the present version, but may differ in detail to address new -problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies -a version number of this License which applies to it and "any later version", -you have the option of following the terms and conditions either of that -version or of any later version published by the Free Software Foundation. If -the Program does not specify a version number of this License, you may -choose any version ever published by the Free Software Foundation. - -10. If you wish to incorporate parts of the Program into other free programs -whose distribution conditions are different, write to the author to ask for -permission. For software which is copyrighted by the Free Software -Foundation, write to the Free Software Foundation; we sometimes make -exceptions for this. Our decision will be guided by the two goals of -preserving the free status of all derivatives of our free software and of -promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, -THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT -PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE -STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT -WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND -PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL -NECESSARY SERVICING, REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR -AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR -ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE -LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, -SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES -ARISING OUT OF THE USE OR INABILITY TO USE THE -PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA -OR DATA BEING RENDERED INACCURATE OR LOSSES -SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE -PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN -IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF -THE POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/sites/all/modules/custom_search/README.txt b/sites/all/modules/custom_search/README.txt index 1f41c6d5..c5fe8a31 100644 --- a/sites/all/modules/custom_search/README.txt +++ b/sites/all/modules/custom_search/README.txt @@ -1,4 +1,3 @@ -$Id: README.txt,v 1.1.2.1 2010/03/26 16:05:47 jdanthinne Exp $ Custom search 6.x-1.x -------------------------- diff --git a/sites/all/modules/custom_search/custom_search.admin.inc b/sites/all/modules/custom_search/custom_search.admin.inc index 7bee1547..33f2a86d 100644 --- a/sites/all/modules/custom_search/custom_search.admin.inc +++ b/sites/all/modules/custom_search/custom_search.admin.inc @@ -1,23 +1,10 @@ Note: if there\'s only one type checked, the selector won\'t be displayed BUT only this type will be searched.'); - break; - } - return $output; -} - function custom_search_admin() { $directory_path = file_directory_path() . '/custom_search'; file_check_directory($directory_path, FILE_CREATE_DIRECTORY); @@ -28,158 +15,12 @@ function custom_search_admin() { } } - // Labels & default text. - $form['search_box'] = array( - '#type' => 'fieldset', - '#title' => t('Search box'), - ); - $form['search_box']['custom_search_label_visibility'] = array( - '#type' => 'checkbox', - '#title' => t('Display label'), - '#default_value' => variable_get('custom_search_label_visibility', TRUE), - ); - $form['search_box']['custom_search_label'] = array( - '#type' => 'textfield', - '#title' => t('Search box label'), - '#default_value' => variable_get('custom_search_label', CUSTOM_SEARCH_LABEL_DEFAULT), - '#description' => t('Enter the label text for the search box. The default value is "!default".', array('!default' => CUSTOM_SEARCH_LABEL_DEFAULT)), - ); - $form['search_box']['custom_search_text'] = array( - '#type' => 'textfield', - '#title' => t('Search box default text'), - '#default_value' => variable_get('custom_search_text', ''), - '#description' => t('This will change the default text inside the search form. Leave blank for no text. This field is blank by default.'), - ); - - // Submit button. - $form['submit_button'] = array( - '#type' => 'fieldset', - '#title' => t('Submit button'), - ); - $form['submit_button']['custom_search_submit_text'] = array( - '#type' => 'textfield', - '#title' => t('Submit button text'), - '#default_value' => variable_get('custom_search_submit_text', CUSTOM_SEARCH_SUBMIT_TEXT_DEFAULT), - '#description' => t('Enter the text for the submit button. Leave blank to hide it. The default value is "!default".', array('!default' => CUSTOM_SEARCH_SUBMIT_TEXT_DEFAULT)), - ); - $form['submit_button']['custom_search_image_path'] = array( - '#type' => 'textfield', - '#title' => t('Submit image path'), - '#description' => t('The path to the file you would like to use as submit button instead of the default text button.'), - '#default_value' => variable_get('custom_search_image_path', ''), - ); - $form['submit_button']['custom_search_image'] = array( - '#type' => 'file', - '#title' => t('Submit image'), - '#description' => t('If you don\'t have direct file access to the server, use this field to upload your image.'), - ); - - // Criteria. - $form['criteria'] = array( - '#type' => 'fieldset', - '#title' => t('Advanced search criteria'), - ); - $form['criteria']['or'] = array( - '#type' => 'fieldset', - '#title' => t('Or'), - '#collapsible' => TRUE, - '#collapsed' => TRUE, - ); - $form['criteria']['or']['custom_search_criteria_or_display'] = array( - '#type' => 'checkbox', - '#title' => t('Display'), - '#default_value' => variable_get('custom_search_criteria_or_display', FALSE), - ); - $form['criteria']['or']['custom_search_criteria_or_label'] = array( - '#type' => 'textfield', - '#title' => t('Label'), - '#default_value' => variable_get('custom_search_criteria_or_label', CUSTOM_SEARCH_CRITERIA_OR_LABEL_DEFAULT), - '#description' => t('Enter the label text for this field. The default value is "!default".', array('!default' => CUSTOM_SEARCH_CRITERIA_OR_LABEL_DEFAULT)), - ); - $form['criteria']['phrase'] = array( - '#type' => 'fieldset', - '#title' => t('Phrase'), - '#collapsible' => TRUE, - '#collapsed' => TRUE, - ); - $form['criteria']['phrase']['custom_search_criteria_phrase_display'] = array( - '#type' => 'checkbox', - '#title' => t('Display'), - '#default_value' => variable_get('custom_search_criteria_phrase_display', FALSE), - ); - $form['criteria']['phrase']['custom_search_criteria_phrase_label'] = array( - '#type' => 'textfield', - '#title' => t('Label'), - '#default_value' => variable_get('custom_search_criteria_phrase_label', CUSTOM_SEARCH_CRITERIA_PHRASE_LABEL_DEFAULT), - '#description' => t('Enter the label text for this field. The default value is "!default".', array('!default' => CUSTOM_SEARCH_CRITERIA_PHRASE_LABEL_DEFAULT)), - ); - $form['criteria']['negative'] = array( - '#type' => 'fieldset', - '#title' => t('Negative'), - '#collapsible' => TRUE, - '#collapsed' => TRUE, - ); - $form['criteria']['negative']['custom_search_criteria_negative_display'] = array( - '#type' => 'checkbox', - '#title' => t('Display'), - '#default_value' => variable_get('custom_search_criteria_negative_display', FALSE), - ); - $form['criteria']['negative']['custom_search_criteria_negative_label'] = array( - '#type' => 'textfield', - '#title' => t('Label'), - '#default_value' => variable_get('custom_search_criteria_negative_label', CUSTOM_SEARCH_CRITERIA_NEGATIVE_LABEL_DEFAULT), - '#description' => t('Enter the label text for this field. The default value is "!default".', array('!default' => CUSTOM_SEARCH_CRITERIA_NEGATIVE_LABEL_DEFAULT)), - ); - - // Custom search paths - $form = array_merge($form, custom_search_custom_paths_admin_form()); - + // Basic settings. + $form = _custom_search_default_admin_form(); + // Custom search paths. + $form = array_merge($form, _custom_search_custom_paths_admin_form()); // Ordering. - $form['order'] = array( - '#type' => 'fieldset', - '#title' => t('Elements ordering'), - ); - $form['order']['custom_search_order'] = array( - '#tree' => TRUE, - '#theme' => 'custom_search_sort_form', - ); - $form['order']['custom_search_order']['search_box'] = array( - '#title' => t('Search Box'), - 'sort' => array('#type' => 'weight', '#default_value' => variable_get('custom_search_search_box_weight', -1)), - '#weight' => variable_get('custom_search_search_box_weight', -1), - ); - if (count(array_filter(array_merge(variable_get('custom_search_node_types', array()), variable_get('custom_search_other', array()))))) { - $form['order']['custom_search_order']['content_types'] = array( - '#title' => t('Content Types'), - 'sort' => array('#type' => 'weight', '#default_value' => variable_get('custom_search_content_types_weight', 0)), - '#weight' => variable_get('custom_search_content_types_weight', 0), - ); - } - $form['order']['custom_search_order']['criteria_or'] = array( - '#title' => t('Advanced search criterion: Or'), - 'sort' => array('#type' => 'weight', '#default_value' => variable_get('custom_search_criteria_or_weight', 6)), - '#weight' => variable_get('custom_search_criteria_or_weight', 6), - ); - $form['order']['custom_search_order']['criteria_phrase'] = array( - '#title' => t('Advanced search criterion: Phrase'), - 'sort' => array('#type' => 'weight', '#default_value' => variable_get('custom_search_criteria_phrase_weight', 7)), - '#weight' => variable_get('custom_search_criteria_phrase_weight', 7), - ); - $form['order']['custom_search_order']['criteria_negative'] = array( - '#title' => t('Advanced search criterion: Negative'), - 'sort' => array('#type' => 'weight', '#default_value' => variable_get('custom_search_criteria_negative_weight', 8)), - '#weight' => variable_get('custom_search_criteria_negative_weight', 8), - ); - $form['order']['custom_search_order']['custom_paths'] = array( - '#title' => t('Custom search paths'), - 'sort' => array('#type' => 'weight', '#default_value' => variable_get('custom_search_custom_paths_weight', 9)), - '#weight' => variable_get('custom_search_custom_paths_weight', 9), - ); - $form['order']['custom_search_order']['submit_button'] = array( - '#title' => t('Submit button'), - 'sort' => array('#type' => 'weight', '#default_value' => variable_get('custom_search_submit_button_weight', 10)), - '#weight' => variable_get('custom_search_submit_button_weight', 10), - ); + $form = array_merge($form, _custom_search_ordering_admin_form()); $form['#attributes'] = array('enctype' => 'multipart/form-data'); $form['#submit'][] = 'custom_search_admin_submit'; @@ -192,30 +33,12 @@ function custom_search_admin() { function custom_search_admin_submit($form, &$form_state) { foreach ($form_state['values']['custom_search_order'] as $key => $data) { variable_set('custom_search_' . $key . '_weight', $data['sort']); + variable_set('custom_search_' . $key . '_region', $data['region']); } } -/** - * Theme the re-ordering form. - */ -function theme_custom_search_sort_form($form) { - drupal_add_tabledrag('custom-search-sort', 'order', 'sibling', 'sort'); - $header = array(t('Elements'), 'sort'); - foreach (element_children($form) as $key) { - // Add class to group weight fields for drag and drop. - $form[$key]['sort']['#attributes']['class'] = 'sort'; - $row = array(); - $row[] = $form[$key]['#title']; - $row[] = drupal_render($form[$key]['sort']); - $rows[] = array('data' => $row, 'class' => 'draggable'); - } - $output = theme('table', $header, $rows, array('id' => 'custom-search-sort')); - $output .= drupal_render($form); - return $output; -} - function custom_search_content_admin() { - return system_settings_form(custom_search_content_admin_form()); + return system_settings_form(_custom_search_content_admin_form()); } function custom_search_results_admin() { @@ -249,6 +72,16 @@ function custom_search_results_admin() { '#title' => t('Display advanced search'), '#default_value' => variable_get('custom_search_results_advanced_search', TRUE), ); + $form['search_form']['advanced']['custom_search_results_advanced_search_collapsible'] = array( + '#type' => 'checkbox', + '#title' => t('Collapsible'), + '#default_value' => variable_get('custom_search_results_advanced_search_collapsible', TRUE), + ); + $form['search_form']['advanced']['custom_search_results_advanced_search_collapsed'] = array( + '#type' => 'checkbox', + '#title' => t('Collapsed'), + '#default_value' => variable_get('custom_search_results_advanced_search_collapsed', TRUE), + ); $form['search_form']['advanced']['criteria'] = array( '#type' => 'fieldset', '#title' => t('Criteria'), @@ -287,6 +120,24 @@ function custom_search_results_admin() { ); } + if (module_exists('taxonomy')) { + $form['search_form']['advanced']['taxonomy'] = array( + '#type' => 'fieldset', + '#title' => t('Taxonomy'), + '#description' => t('Select the vocabularies to display on the advanced search form.'), + '#collapsible' => TRUE, + '#collapsed' => TRUE, + ); + $vocabularies = taxonomy_get_vocabularies(); + foreach ($vocabularies as $voc) { + $form['search_form']['advanced']['taxonomy']['custom_search_advanced_voc' . $voc->vid . '_display'] = array( + '#type' => 'checkbox', + '#title' => $voc->name, + '#default_value' => variable_get('custom_search_advanced_voc' . $voc->vid . '_display', TRUE), + ); + } + } + $form['results'] = array( '#type' => 'fieldset', '#title' => t('Results'), diff --git a/sites/all/modules/custom_search/custom_search.css b/sites/all/modules/custom_search/custom_search.css index 061f4b3f..adddafff 100644 --- a/sites/all/modules/custom_search/custom_search.css +++ b/sites/all/modules/custom_search/custom_search.css @@ -1,4 +1,16 @@ -/* $Id: custom_search.css,v 1.1 2010/03/03 11:01:05 jdanthinne Exp $ */ + +#elements tr.region-message { + font-weight: normal; + color: #999; +} +#elements tr.region-populated { + display: none; +} + +fieldset.custom_search-popup { + display: none; + position: absolute; +} input.custom-search-default-value { color:#999;} .element-invisible { diff --git a/sites/all/modules/custom_search/custom_search.info b/sites/all/modules/custom_search/custom_search.info index 773c0be4..9ca653a6 100644 --- a/sites/all/modules/custom_search/custom_search.info +++ b/sites/all/modules/custom_search/custom_search.info @@ -1,34 +1,11 @@ -; $Id: custom_search.info,v 1.1.2.9 2010/05/04 17:04:48 jdanthinne Exp $ name = Custom Search description = Customize the default search, change labels, default texts, ordering, and display content types and taxonomy selectors. core = 6.x package = Custom Search dependencies[] = search - -; Information added by drupal.org packaging script on 2010-04-30 -version = "6.x-1.x-dev" -core = "6.x" -project = "custom_search" -datestamp = "1272629076" - - -; Information added by drupal.org packaging script on 2010-05-02 -version = "6.x-1.x-dev" -core = "6.x" -project = "custom_search" -datestamp = "1272758640" - - -; Information added by drupal.org packaging script on 2010-05-03 -version = "6.x-1.x-dev" -core = "6.x" -project = "custom_search" -datestamp = "1272845023" - - -; Information added by drupal.org packaging script on 2010-06-07 -version = "6.x-1.4" +; Information added by Drupal.org packaging script on 2014-04-02 +version = "6.x-1.12" core = "6.x" project = "custom_search" -datestamp = "1275894013" +datestamp = "1396449571" diff --git a/sites/all/modules/custom_search/custom_search.install b/sites/all/modules/custom_search/custom_search.install index 7deb4513..95a65e30 100644 --- a/sites/all/modules/custom_search/custom_search.install +++ b/sites/all/modules/custom_search/custom_search.install @@ -1,5 +1,4 @@ set permissions.', array('@link' => url('admin/user/permissions#module-custom_search')))); } /** @@ -21,6 +19,8 @@ function custom_search_uninstall() { variable_del('custom_search_label_visibility'); variable_del('custom_search_label'); variable_del('custom_search_text'); + variable_del('custom_search_size'); + variable_del('custom_search_max_length'); variable_del('custom_search_submit_text'); variable_del('custom_search_image_path'); variable_del('custom_search_criteria_or_display'); @@ -30,6 +30,9 @@ function custom_search_uninstall() { variable_del('custom_search_criteria_negative_display'); variable_del('custom_search_criteria_negative_label'); variable_del('custom_search_paths'); + variable_del('custom_search_paths_selector'); + variable_del('custom_search_paths_selector_label'); + variable_del('custom_search_paths_selector_label_visibility'); variable_del('custom_search_search_box_weight'); variable_del('custom_search_content_types_weight'); variable_del('custom_search_criteria_or_weight'); @@ -37,16 +40,27 @@ function custom_search_uninstall() { variable_del('custom_search_criteria_negative_weight'); variable_del('custom_search_custom_paths_weight'); variable_del('custom_search_submit_button_weight'); + variable_del('custom_search_search_box_region'); + variable_del('custom_search_content_types_region'); + variable_del('custom_search_criteria_or_region'); + variable_del('custom_search_criteria_phrase_region'); + variable_del('custom_search_criteria_negative_region'); + variable_del('custom_search_custom_paths_region'); + variable_del('custom_search_submit_button_region'); variable_del('custom_search_target'); variable_del('custom_search_node_types'); + variable_del('custom_search_node_types_excluded'); variable_del('custom_search_other'); variable_del('custom_search_type_selector'); variable_del('custom_search_type_selector_label'); variable_del('custom_search_type_selector_label_visibility'); variable_del('custom_search_type_selector_all'); variable_del('custom_search_any_restricts'); + variable_del('custom_search_any_force'); variable_del('custom_search_results_search'); variable_del('custom_search_results_advanced_search'); + variable_del('custom_search_results_advanced_search_collapsible'); + variable_del('custom_search_results_advanced_search_collapsed'); variable_del('custom_search_advanced_or_display'); variable_del('custom_search_advanced_phrase_display'); variable_del('custom_search_advanced_negative_display'); @@ -65,7 +79,7 @@ function custom_search_uninstall() { * Implementation of hook_enable(). */ function custom_search_enable() { - drupal_set_message(t('Custom Search enabled. Don\'t forget to set permissions.', array('@link' => url('admin/user/permissions#module-custom_search')))); + drupal_set_message(t('Custom Search enabled. Don\'t forget to set permissions.', array('@link' => url('admin/user/permissions', array('fragment' => 'module-custom_search'))))); } /** diff --git a/sites/all/modules/custom_search/custom_search.js b/sites/all/modules/custom_search/custom_search.js deleted file mode 100644 index edc18a9b..00000000 --- a/sites/all/modules/custom_search/custom_search.js +++ /dev/null @@ -1,87 +0,0 @@ -// $Id: custom_search.js,v 1.1.2.7 2010/05/25 13:42:12 jdanthinne Exp $ - -Drupal.behaviors.custom_search = function (context) { - - // Check if the search box is not empty on submit - $('form.search-form') - .submit(function(){ - var box = $(this).find('input.custom-search-box'); - if (box.val() != undefined && (box.val() == '' || box.val() == $(this).find('input.default-text').val())) { - $(this).find('input.custom-search-box').addClass('error'); - return false; - } - // If basic search is hidden, copy or value to the keys - if ($(this).find('#edit-keys').parents('div.element-invisible').attr('class') == 'element-invisible') { - $(this).find('#edit-keys').val($(this).find('#edit-or').val()); - $(this).find('#edit-or').val(''); - } - return true; - } - ); - - // Clear default text on focus, and put it back on blur. - $('input.custom-search-box') - .blur(function(){ - if ($(this).val() == '') { - $(this).addClass('custom-search-default-value'); - $(this).val($(this).parents('form').find('input.default-text').val()); - } - }) - .focus(function(){ - if ($(this).val() == $(this).parents('form').find('input.default-text').val()) $(this).val(''); - $(this).removeClass('custom-search-default-value'); - } - ); - - // Handle checkboxes - $('.custom-search-selector input:checkbox').each(function(){ - var el = $(this); - if (el.val() == 'c-all') { - el.change(function(){ - $(this).parents('.custom-search-selector').find('input:checkbox[value!=c-all]').attr('checked', false); - }); - } - else { - if (el.val().substr(0,2) == 'c-') { - el.change(function(){ - $('.custom-search-selector input:checkbox').each(function(){ - if ($(this).val().substr(0,2) == 'o-') $(this).attr('checked', false); - }); - $(this).parents('.custom-search-selector').find('input:checkbox[value=c-all]').attr('checked', false); - }); - } else { - el.change(function(){ - $(this).parents('.custom-search-selector').find('input:checkbox[value!='+el.val()+']').attr('checked', false); - }); - } - } - }); - - // Reselect types and terms in advanced search - var edit_keys = $('#edit-keys').val(); - if(edit_keys) { - // types - var pos = edit_keys.indexOf('type:'); - if (pos) { - var pos2 = edit_keys.indexOf(' ',pos); - if (pos2==-1) pos2 = edit_keys.length; - var types = edit_keys.substring(pos+5,pos2); - types = types.split(','); - for (var i in types) { - $('.search-form input:checkbox[value='+types[i]+']').attr('checked', true); - } - } - // terms - var pos = edit_keys.indexOf('category:'); - if (pos) { - var pos2 = edit_keys.indexOf(' ',pos); - if (pos2==-1) pos2 = edit_keys.length; - var terms = edit_keys.substring(pos+9,pos2); - terms = terms.split(','); - for (var i in terms) { - $('.search-form option[value='+terms[i]+']').attr('selected', true); - } - } - } - -} diff --git a/sites/all/modules/custom_search/custom_search.module b/sites/all/modules/custom_search/custom_search.module index d70e38de..6625c7a2 100644 --- a/sites/all/modules/custom_search/custom_search.module +++ b/sites/all/modules/custom_search/custom_search.module @@ -1,5 +1,4 @@ vid . '_display', TRUE)) unset($form['advanced']['category']['#options'][$voc->name]); + } + if (!count($form['advanced']['category']['#options'])) unset($form['advanced']['category']['#type']); + } + + // Content Types $names = array_keys(node_get_types('names')); foreach ($names as $name) { if (!variable_get('custom_search_advanced_type_' . $name . '_display', TRUE)) unset($form['advanced']['type']['#options'][$name]); } - if (!count($form['advanced']['type']['#options'])) unset($form['advanced']['type']); + if (!count($form['advanced']['type']['#options'])) unset($form['advanced']['type']['#type']); + if (!variable_get('custom_search_results_search', TRUE)) { // If basic search is hidded, original search terms are imported into advanced search. $original_keys = $form['basic']['inline']['keys']['#default_value']; @@ -90,67 +138,57 @@ function custom_search_form_alter(&$form, $form_state, $form_id) { if (drupal_substr($value, 0, 5) != 'type:' && drupal_substr($value, 0, 9) != 'category:') $keys[] = $value; } $form['advanced']['keywords']['or']['#default_value'] = implode(' ', $keys); - if (!isset($GLOBALS['nb_results']) || (isset($GLOBALS['nb_results']) && !$GLOBALS['nb_results'])) $form['advanced']['#collapsed'] = FALSE; + if (!isset($GLOBALS['custom_search_nb_results']) || (isset($GLOBALS['custom_search_nb_results']) && !$GLOBALS['custom_search_nb_results'])) $form['advanced']['#collapsed'] = FALSE; $form['basic']['#prefix'] = '
'; $form['basic']['#suffix'] = '
'; } - if (!variable_get('custom_search_results_advanced_search', TRUE)) unset($form['advanced']); - break; + $form['advanced']['#collapsible'] = variable_get('custom_search_results_advanced_search_collapsible', TRUE); + $form['advanced']['#collapsed'] = variable_get('custom_search_results_advanced_search_collapsed', TRUE); + + if (!variable_get('custom_search_results_advanced_search', TRUE)) $form['advanced']['#type'] = 'hidden'; - case 'search_theme_form': - case 'search_block_form': - case 'custom_search_blocks_form': + } + + break; + + case 'search_theme_form': + case 'search_block_form': + case 'custom_search_blocks_form': + if (user_access('use custom search')) { - $delta = ($form_id == 'custom_search_blocks_form') ? 'blocks_' . $form['delta']['#value'] . '_' : ''; + // Title. + $form[$form_id]['#title'] = variable_get('custom_search_' . $delta . 'label', CUSTOM_SEARCH_LABEL_DEFAULT); + if (!variable_get('custom_search_' . $delta . 'label_visibility', TRUE)) $form[$form_id]['#post_render'] = array('_custom_search_hide_label'); // Search box. - $form[$form_id]['#default_value'] = variable_get('custom_search_text', ''); + $form[$form_id]['#default_value'] = variable_get('custom_search_' . $delta . 'text', ''); $form[$form_id]['#weight'] = variable_get('custom_search_' . $delta . 'search_box_weight', 0); + if (!isset($form[$form_id]['#attributes']['class'])) $form[$form_id]['#attributes']['class'] = ''; $form[$form_id]['#attributes']['class'] .= ' custom-search-default-value custom-search-box'; + $form[$form_id]['#size'] = variable_get('custom_search_' . $delta . 'size', CUSTOM_SEARCH_SIZE_DEFAULT); + $form[$form_id]['#maxlength'] = variable_get('custom_search_' . $delta . 'max_length', CUSTOM_SEARCH_MAX_LENGTH_DEFAULT); // Default text. $form['default_text'] = array( '#type' => 'hidden', - '#default_value' => variable_get('custom_search_text', ''), + '#default_value' => variable_get('custom_search_' . $delta . 'text', ''), '#attributes' => array('class' => 'default-text'), ); // CSS - $path = drupal_get_path('module', 'custom_search'); - drupal_add_css($path . '/custom_search.css', 'module'); + drupal_add_css(drupal_get_path('module', 'custom_search') . '/custom_search.css', 'module'); - if ($form_id != 'custom_search_blocks_form') { - // Title. - $form[$form_id]['#title'] = variable_get('custom_search_label', CUSTOM_SEARCH_LABEL_DEFAULT); - if (!variable_get('custom_search_label_visibility', TRUE)) $form[$form_id]['#post_render'] = array('_custom_search_hide_label'); - - // Criterion - if (variable_get('custom_search_criteria_or_display', FALSE)) { - $form['custom_search_criteria_or'] = array( - '#type' => 'textfield', - '#title' => variable_get('custom_search_criteria_or_label', CUSTOM_SEARCH_CRITERIA_OR_LABEL_DEFAULT), - '#size' => 15, - '#maxlength' => 255, - '#weight' => variable_get('custom_search_criteria_or_weight', 6), - ); - } - if (variable_get('custom_search_criteria_phrase_display', FALSE)) { - $form['custom_search_criteria_phrase'] = array( - '#type' => 'textfield', - '#title' => variable_get('custom_search_criteria_phrase_label', CUSTOM_SEARCH_CRITERIA_PHRASE_LABEL_DEFAULT), - '#size' => 15, - '#maxlength' => 255, - '#weight' => variable_get('custom_search_criteria_phrase_weight', 7), - ); - } - if (variable_get('custom_search_criteria_negative_display', FALSE)) { - $form['custom_search_criteria_negative'] = array( + // Criterion + $criteria = array('or' => 6, 'phrase' => 7, 'negative' => 8); + foreach ($criteria as $c => $w) { + if (variable_get('custom_search_' . $delta . 'criteria_' . $c . '_display', FALSE)) { + $form['custom_search_criteria_' . $c] = array( '#type' => 'textfield', - '#title' => variable_get('custom_search_criteria_negative_label', CUSTOM_SEARCH_CRITERIA_NEGATIVE_LABEL_DEFAULT), + '#title' => variable_get('custom_search_' . $delta . 'criteria_' . $c . '_label', constant('CUSTOM_SEARCH_CRITERIA_' . strtoupper($c) . '_LABEL_DEFAULT')), '#size' => 15, '#maxlength' => 255, - '#weight' => variable_get('custom_search_criteria_negative_weight', 8), + '#weight' => variable_get('custom_search_' . $delta . 'criteria_' . $c . '_weight', $w), ); } } @@ -161,7 +199,7 @@ function custom_search_form_alter(&$form, $form_state, $form_id) { $types = array_keys(array_filter(variable_get('custom_search_' . $delta . 'node_types', array()))); if (count($types)) { $names = node_get_types('names'); - if (count($types) > 1) $toptions['c-all'] = variable_get('custom_search_' . $delta . 'type_selector_all', CUSTOM_SEARCH_ALL_TEXT_DEFAULT); + if (count($types) > 1 || variable_get('custom_search_' . $delta . 'any_force', FALSE)) $toptions['c-all'] = variable_get('custom_search_' . $delta . 'type_selector_all', CUSTOM_SEARCH_ALL_TEXT_DEFAULT); foreach ($types as $type) { $toptions['c-' . $type] = $names[$type]; } @@ -195,16 +233,17 @@ function custom_search_form_alter(&$form, $form_state, $form_id) { '#title' => variable_get('custom_search_' . $delta . 'type_selector_label', CUSTOM_SEARCH_TYPE_SELECTOR_LABEL_DEFAULT), '#options' => $options, '#default_value' => ((variable_get('custom_search_' . $delta . 'type_selector', 'select') == 'checkboxes') ? array('c-all') : 'c-all'), - '#attributes' => array('class' => 'custom-search-selector custom-search-types'), + '#attributes' => ($selector_type != 'radios' && $selector_type != 'checkboxes') ? array('class' => 'custom-search-selector custom-search-types') : array(), + '#prefix' => ($selector_type == 'radios' || $selector_type == 'checkboxes') ? '
' : '', + '#suffix' => ($selector_type == 'radios' || $selector_type == 'checkboxes') ? '
' : '', '#weight' => variable_get('custom_search_' . $delta . 'content_types_weight', 1), '#validated' => TRUE, ); // If there's only one type, hide the selector - if (count($others) + count($types) == 1) { + if (count($others) + count($types) == 1 && !variable_get('custom_search_' . $delta . 'any_force', FALSE)) { $form['custom_search_types']['#type'] = 'hidden'; - $default_value = array_keys(array_slice($options, count($options)-1)); - $form['custom_search_types']['#default_value'] = $default_value[0]; + $form['custom_search_types']['#default_value'] = key(array_slice($options, count($options)-1)); } if (!variable_get('custom_search_' . $delta . 'type_selector_label_visibility', TRUE)) $form['custom_search_types']['#post_render'] = array('_custom_search_hide_label'); @@ -216,44 +255,67 @@ function custom_search_form_alter(&$form, $form_state, $form_id) { $lines = explode("\n", variable_get('custom_search_' . $delta . 'paths', '')); foreach ($lines as $line) { $temp = explode('|', $line); - $options[$temp[0]] = $temp[1]; + $options[$temp[0]] = (count($temp) >= 2) ? t($temp[1]) : ''; } if (count($options) == 1) { $form['custom_search_paths'] = array( '#type' => 'hidden', - '#default_value' => $temp[0], + '#default_value' => key($options), ); } else { $form['custom_search_paths'] = array( - '#type' => 'select', - '#options' => $options, - '#weight' => variable_get('custom_search_' . $delta . 'paths', 9), + '#type' => variable_get('custom_search_' . $delta . 'paths_selector', 'select'), + '#title' => variable_get('custom_search_' . $delta . 'paths_selector_label', CUSTOM_SEARCH_PATHS_SELECTOR_LABEL_DEFAULT), + '#options' => $options, + '#default_value' => key($options), + '#weight' => variable_get('custom_search_' . $delta . 'custom_paths_weight', 9), ); + if (!variable_get('custom_search_' . $delta . 'paths_selector_label_visibility', TRUE)) $form['custom_search_paths']['#post_render'] = array('_custom_search_hide_label'); } } // Submit button. - $form['submit']['#value'] = variable_get('custom_search_submit_text', CUSTOM_SEARCH_SUBMIT_TEXT_DEFAULT); + $form['submit']['#value'] = variable_get('custom_search_' . $delta . 'submit_text', CUSTOM_SEARCH_SUBMIT_TEXT_DEFAULT); - if (variable_get('custom_search_image_path', '') != '') { + if (variable_get('custom_search_' . $delta . 'image_path', '') != '') { $form['submit']['#type'] = 'image_button'; - $form['submit']['#src'] = variable_get('custom_search_image_path', ''); + $form['submit']['#src'] = variable_get('custom_search_' . $delta . 'image_path', ''); $form['submit']['#name'] = 'op'; - $form['submit']['#attributes'] = array('alt' => variable_get('custom_search_submit_text', CUSTOM_SEARCH_SUBMIT_TEXT_DEFAULT)); + $form['submit']['#attributes'] = array('alt' => variable_get('custom_search_' . $delta . 'submit_text', CUSTOM_SEARCH_SUBMIT_TEXT_DEFAULT), 'class' => 'custom-search-button'); } elseif ($form['submit']['#value'] == '') $form['submit']['#attributes'] = array('style' => 'display:none;'); $form['submit']['#weight'] = variable_get('custom_search_' . $delta . 'submit_button_weight', 3); + // Popup + $form['popup'] = array( + '#type' => 'fieldset', + '#weight' => 1 + variable_get('custom_search_' . $delta . 'search_box_weight', 0), + '#attributes' => array('class' => 'custom_search-popup'), + ); + if (!empty($form['custom_search_types']) && variable_get('custom_search_' . $delta . 'content_types_region', 'block') == 'popup') { + $form['popup']['custom_search_types'] = $form['custom_search_types']; + unset($form['custom_search_types']); + } + if (!empty($form['custom_search_paths']) && variable_get('custom_search_' . $delta . 'custom_paths_region', 'block') == 'popup') { + $form['popup']['custom_search_paths'] = $form['custom_search_paths']; + unset($form['custom_search_paths']); + } + foreach ($criteria as $c => $w) { + if (variable_get('custom_search_' . $delta . 'criteria_' . $c . '_display', FALSE) && variable_get('custom_search_' . $delta . 'criteria_' . $c . '_region', 'block') == 'popup') { + $form['popup']['custom_search_criteria_' . $c] = $form['custom_search_criteria_' . $c]; + unset($form['custom_search_criteria_' . $c]); + } + } + // Form attributes - $form['#attributes']['target'] = variable_get('custom_search_target', '_self'); $form['#attributes']['class'] = 'search-form'; $form['#submit'][] = 'custom_search_submit'; $form['form_token']['#default_value'] = drupal_get_token($form_id); - break; - } + } + break; } } @@ -262,6 +324,7 @@ function custom_search_form_alter(&$form, $form_state, $form_id) { */ function custom_search_submit($form, &$form_state) { $delta = (isset($form_state['values']['delta'])) ? 'blocks_' . $form_state['values']['delta'] . '_' : '' ; + variable_set('custom_search_delta', $delta); // save for later use (exclusion & refresh) $type = 'node'; $keys = $form_state['values'][$form_state['values']['form_id']]; @@ -283,14 +346,12 @@ function custom_search_submit($form, &$form_state) { } $search_types = module_implements('search'); - $values = array_values($types); // temp transform of the array to have numerical index for the next test - if (in_array($values[0], $search_types)) { - $type = $values[0]; - } + if (in_array(current($types), $search_types)) $type = current($types); else { if (trim($form_state['values']['custom_search_criteria_or']) != '') $keys .= ' ' . str_replace(' ', ' OR ', trim($form_state['values']['custom_search_criteria_or'])); if (trim($form_state['values']['custom_search_criteria_negative']) != '') $keys .= ' -' . str_replace(' ', ' -', trim($form_state['values']['custom_search_criteria_negative'])); if (trim($form_state['values']['custom_search_criteria_phrase']) != '') $keys .= ' "' . trim($form_state['values']['custom_search_criteria_phrase']) . '"'; + $original_keywords = $keys; if (count($types)) { // If a content type is selected, and it's not -Any-, search for that type. if (!in_array('all', $types)) $keys = search_query_insert($keys, 'type', implode(',', $types)); @@ -305,63 +366,68 @@ function custom_search_submit($form, &$form_state) { } } - if (module_exists('apachesolr_search')) $type = 'apachesolr_search'; - elseif (module_exists('google_appliance')) $type = variable_get('google_appliance_default_search_path', 'google-appliance'); - elseif (module_exists('luceneapi_node') && variable_get('luceneapi:default_search', 0)) $type = variable_get('luceneapi:default_search', 0); + // Integrates other search modules + if (module_exists('apachesolr_search') && variable_get('apachesolr_search_make_default', 0)) { + $search_path = _custom_search_apachesolr_search(array( + 'keywords' => $original_keywords, + 'types' => $types, + 'terms' => (!empty($terms)) ? $terms : array(), + )); + } + elseif (module_exists('google_appliance')) { + $search_path = _custom_search_google_appliance_search(array( + 'keys' => $keys, + )); + } + elseif (module_exists('luceneapi_node') && variable_get('luceneapi:default_search', 0)) { + $search_path = _custom_search_lucenapi_search(array( + 'keywords' => $original_keywords, + 'types' => $types, + 'terms' => (!empty($terms)) ? $terms : array(), + )); + } + else { + $search_path = array( + 'path' => 'search/' . $type . '/' . $keys, + 'query' => '', + ); + } + // Build a custom path if needed if (isset($form_state['values']['custom_search_paths']) && $form_state['values']['custom_search_paths'] != '') { - $form_state['redirect'] = str_replace('[key]', $keys, $form_state['values']['custom_search_paths']); + $custom_path = str_replace('[key]', $form_state['values'][$form_state['values']['form_id']], $form_state['values']['custom_search_paths']); + if (strpos($form_state['values']['custom_search_paths'], '[terms]') !== FALSE) $custom_path = str_replace('[terms]', (count($terms)) ? implode($form_state['values']['custom_search_paths_terms_separator'], $terms) : '', $custom_path); + $form_state['redirect'] = $custom_path; + // check for external path. If not, add base path + if (drupal_substr($custom_path, 0, 4) != 'http') $form_state['redirect'] = url($form_state['redirect'], array('absolute' => TRUE)); } - else $form_state['redirect'] = 'search/' . $type . '/' . $keys; + else $form_state['redirect'] = url($search_path['path'], array('query' => $search_path['query'], 'absolute' => TRUE)); } /* - * Presents links to filter the search results. + * Rewrite the sql query to exclude content types */ -function custom_search_preprocess_search_results(&$variables) { - $GLOBALS['nb_results'] = count($variables['results']); // save # of results for collapsing advanced search - $position = variable_get('custom_search_filter', 'disabled'); - if (user_access('use custom search') && $position != 'disabled') { - // Get search words (minus type:node_type) - $keys = search_get_keys(); - if (strpos($keys, 'type:') !== FALSE) { - $keys = drupal_substr($keys, 0, strpos($keys, 'type:')-1); - } - // Get Custom Search authorised types - $searchable_node_types = variable_get('custom_search_node_types', array()); - $searchable_node_types = array_keys(array_filter($searchable_node_types, 'custom_search_filter_array')); - if (!count($searchable_node_types)) $searchable_node_types = array_keys(node_get_types('names')); - $node_types = db_query("SELECT type, name FROM {node_type} WHERE type IN (" . db_placeholders($searchable_node_types, 'varchar') . ")", $searchable_node_types); - // Build menu - $items = array(); - $items[] = l(variable_get('custom_search_type_selector_all', CUSTOM_SEARCH_ALL_TEXT_DEFAULT), 'search/node/' . $keys); - while ($node_type = db_fetch_array($node_types)) { - $items[] = l($node_type['name'], 'search/node/' . $keys .' type:' . $node_type['type']); +function custom_search_db_rewrite_sql($query, $primary_table, $primary_field, $args) { + if ($query == '' && $primary_table == 'n' && $primary_field = 'nid' && empty($args)) { + $excluded_types = array_filter(variable_get('custom_search_' . variable_get('custom_search_delta', '') . 'node_types_excluded', array())); + if (!empty($excluded_types)) { + $where = " n.type NOT IN ('". join("','", $excluded_types) ."') "; + return array('where' => $where); } - $title = variable_get('custom_search_filter_label', CUSTOM_SEARCH_FILTER_LABEL_DEFAULT); - if ($position == 'above' && count($items) > 2) $variables['search_results'] = '
' . theme('item_list', $items, $title) . '
' . $variables['search_results']; - elseif (count($items) > 2) $variables['search_results'] .= '
' . theme('item_list', $items, $title) . '
'; } } -/* - * Customisation of the results info. - */ -function custom_search_preprocess_search_result(&$variables) { - $infos = array(); - foreach ($variables['info_split'] as $key => $info) { - if (variable_get('custom_search_results_info_' . $key, TRUE)) array_push($infos, $info); - } - $variables['info'] = implode(' - ', $infos); -} - /** * Implementation of hook_init(). */ function custom_search_init() { if (user_access('use custom search')) { - drupal_add_js(drupal_get_path('module', 'custom_search') . '/custom_search.js'); + drupal_add_js(drupal_get_path('module', 'custom_search') . '/js/custom_search.js'); + drupal_add_js(array('custom_search' => array( + 'form_target' => variable_get('custom_search_target', '_self'), + 'solr' => (module_exists('apachesolr_search') && variable_get('apachesolr_search_make_default', 0)) ? 1 : 0, + )), 'setting'); } } @@ -369,99 +435,42 @@ function custom_search_init() { * Implementation of hook_theme(). */ function custom_search_theme() { - if (user_access('use custom search')) { - return array( - 'custom_search_javascript' => array('arguments' => array()), - 'custom_search_sort_form' => array('arguments' => array('form' => NULL)), - ); - } - else return array(); -} - -/** - * Content admin form. - */ -function custom_search_content_admin_form($delta = '') { - if ($delta != '') $delta = 'blocks_' . $delta . '_'; - $form['custom_search_' . $delta . 'node_types'] = array( - '#type' => 'checkboxes', - '#title' => t('Content types'), - '#default_value' => variable_get('custom_search_' . $delta . 'node_types', array()), - '#options' => node_get_types('names'), - ); - // Other searches. - $options = array(); - foreach (module_implements('search') as $module) { - if ($module != 'node' && $name = module_invoke($module, 'search', 'name')) { - $options[$module] = $name; - } - } - if (count($options)) { - $form['custom_search_' . $delta . 'other'] = array( - '#type' => 'checkboxes', - '#title' => t('Other searches'), - '#default_value' => variable_get('custom_search_' . $delta . 'other', array()), - '#options' => $options, - ); - } - $form['custom_search_' . $delta . 'type_selector'] = array( - '#type' => 'select', - '#title' => t('Selector type'), - '#options' => array( - 'select' => t('Drop-down list'), - 'selectmultiple' => t('Drop-down list with multiple choices'), - 'radios' => t('Radio buttons'), - 'checkboxes' => t('Checkboxes'), + $path = drupal_get_path('module', 'custom_search') . '/theme'; + $custom_search_theme_array = array( + 'custom_search_javascript' => array('arguments' => array()), + 'custom_search_sort_form' => array( + 'path' => $path, + 'template' => 'custom_search-sort-form', + 'arguments' => array('form' => NULL), + ), + 'search_results' => array( + 'arguments' => array('results' => NULL, 'type' => NULL), + 'path' => $path, + 'file' => 'custom_search.pages.inc', + 'template' => 'custom_search-results', + ), + 'search_result' => array( + 'arguments' => array('result' => NULL, 'type' => NULL), + 'path' => $path, + 'file' => 'custom_search.pages.inc', + 'template' => 'custom_search-result', ), - '#description' => t('Choose which selector type to use. Note: content types and other searches cannot be combined in a single search.'), - '#default_value' => variable_get('custom_search_' . $delta . 'type_selector', 'select'), - ); - $form['custom_search_' . $delta . 'type_selector_label_visibility'] = array( - '#type' => 'checkbox', - '#title' => t('Display label'), - '#default_value' => variable_get('custom_search_' . $delta . 'type_selector_label_visibility', TRUE), - ); - $form['custom_search_' . $delta . 'type_selector_label'] = array( - '#type' => 'textfield', - '#title' => t('Label text'), - '#default_value' => variable_get('custom_search_' . $delta . 'type_selector_label', CUSTOM_SEARCH_TYPE_SELECTOR_LABEL_DEFAULT), - '#description' => t('Enter the label text for the selector. The default value is "!default".', array('!default' => CUSTOM_SEARCH_TYPE_SELECTOR_LABEL_DEFAULT)), - ); - $form['custom_search_' . $delta . 'type_selector_all'] = array( - '#type' => 'textfield', - '#title' => t('-Any content type- text'), - '#default_value' => variable_get('custom_search_' . $delta . 'type_selector_all', CUSTOM_SEARCH_ALL_TEXT_DEFAULT), - '#required' => TRUE, - '#description' => t('Enter the text for "any content type" choice. The default value is "!default".', array('!default' => CUSTOM_SEARCH_ALL_TEXT_DEFAULT)), - ); - $form['custom_search_' . $delta . 'any_restricts'] = array( - '#type' => 'checkbox', - '#title' => t('Choosing -Any- restricts the search to the selected content types.'), - '#default_value' => variable_get('custom_search_' . $delta . 'any_restricts', FALSE), - '#description' => t('If not checked, choosing -Any- will search in all content types.'), ); - return $form; -} -/** - * Custom paths admin form. - */ -function custom_search_custom_paths_admin_form($delta = '') { - if ($delta != '') $delta = 'blocks_' . $delta . '_'; - $form['custom_search_' . $delta . 'paths'] = array( - '#type' => 'textarea', - '#title' => t('Custom search paths'), - '#default_value' => variable_get('custom_search_' . $delta . 'paths', ''), - '#description' => t('If you want to use a custom search paths, enter them here in the form path|label, one per line. The [key] token will be replaced by what is entered in the search box. Ie: mysearch/[key]|My custom search label. If only one path is specified, the selector will be hidden.'), - ); - return $form; + // Panels integration + $search_results_page_callback = menu_get_item('search/node/%menu_tail'); + if ($search_results_page_callback['page_callback'] == 'page_manager_search_page') { + unset($custom_search_theme_array['search_results'], $custom_search_theme_array['search_result']); + } + + return $custom_search_theme_array; } /** * Filter the types. */ function _custom_search_filter_keys($val) { - return drupal_substr($val, 2); + return (strlen($val) > 2 && $val[1] == '-') ? drupal_substr($val, 2) : $val; } /** @@ -478,4 +487,4 @@ function _custom_search_hide_label($content, $elements) { */ function custom_search_filter_array($value = FALSE) { return $value !== 0; -} \ No newline at end of file +} diff --git a/sites/all/modules/custom_search/includes/apachesolr_search.inc b/sites/all/modules/custom_search/includes/apachesolr_search.inc new file mode 100644 index 00000000..96f0e94d --- /dev/null +++ b/sites/all/modules/custom_search/includes/apachesolr_search.inc @@ -0,0 +1,29 @@ + $type, 'query' => $keys); +} \ No newline at end of file diff --git a/sites/all/modules/custom_search/includes/forms.inc b/sites/all/modules/custom_search/includes/forms.inc new file mode 100644 index 00000000..c89037df --- /dev/null +++ b/sites/all/modules/custom_search/includes/forms.inc @@ -0,0 +1,311 @@ + 'fieldset', + '#title' => t('Search box'), + ); + $form['search_box']['custom_search_' . $delta . 'label_visibility'] = array( + '#type' => 'checkbox', + '#title' => t('Display label'), + '#default_value' => variable_get('custom_search_' . $delta . 'label_visibility', TRUE), + ); + $form['search_box']['custom_search_' . $delta . 'label'] = array( + '#type' => 'textfield', + '#title' => t('Search box label'), + '#default_value' => variable_get('custom_search_' . $delta . 'label', CUSTOM_SEARCH_LABEL_DEFAULT), + '#description' => t('Enter the label text for the search box. The default value is "!default".', array('!default' => CUSTOM_SEARCH_LABEL_DEFAULT)), + ); + $form['search_box']['custom_search_' . $delta . 'text'] = array( + '#type' => 'textfield', + '#title' => t('Search box default text'), + '#default_value' => variable_get('custom_search_' . $delta . 'text', ''), + '#description' => t('This will change the default text inside the search form. Leave blank for no text. This field is blank by default.'), + ); + $form['search_box']['custom_search_' . $delta . 'size'] = array( + '#type' => 'textfield', + '#title' => t('Search box size'), + '#size' => 3, + '#default_value' => variable_get('custom_search_' . $delta . 'size', CUSTOM_SEARCH_SIZE_DEFAULT), + '#description' => t('The default value is "!default".', array('!default' => CUSTOM_SEARCH_SIZE_DEFAULT)), + ); + $form['search_box']['custom_search_' . $delta . 'max_length'] = array( + '#type' => 'textfield', + '#title' => t('Search box maximum length'), + '#size' => 3, + '#default_value' => variable_get('custom_search_' . $delta . 'max_length', CUSTOM_SEARCH_MAX_LENGTH_DEFAULT), + '#description' => t('The default value is "!default".', array('!default' => CUSTOM_SEARCH_MAX_LENGTH_DEFAULT)), + '#required' => TRUE, + ); + + // Submit button. + $form['submit_button'] = array( + '#type' => 'fieldset', + '#title' => t('Submit button'), + ); + $form['submit_button']['custom_search_' . $delta . 'submit_text'] = array( + '#type' => 'textfield', + '#title' => t('Submit button text'), + '#default_value' => variable_get('custom_search_' . $delta . 'submit_text', CUSTOM_SEARCH_SUBMIT_TEXT_DEFAULT), + '#description' => t('Enter the text for the submit button. Leave blank to hide it. The default value is "!default".', array('!default' => CUSTOM_SEARCH_SUBMIT_TEXT_DEFAULT)), + ); + $form['submit_button']['custom_search_' . $delta . 'image_path'] = array( + '#type' => 'textfield', + '#title' => t('Submit image path'), + '#description' => t('The path to the file you would like to use as submit button instead of the default text button.'), + '#default_value' => variable_get('custom_search_' . $delta . 'image_path', ''), + ); + $form['submit_button']['custom_search_image'] = array( + '#type' => 'file', + '#title' => t('Submit image'), + '#description' => t('If you don\'t have direct file access to the server, use this field to upload your image.'), + ); + + // Criteria. + $form['criteria'] = array( + '#type' => 'fieldset', + '#title' => t('Advanced search criteria'), + ); + $form['criteria']['or'] = array( + '#type' => 'fieldset', + '#title' => t('Or'), + '#collapsible' => TRUE, + '#collapsed' => TRUE, + ); + $form['criteria']['or']['custom_search_' . $delta . 'criteria_or_display'] = array( + '#type' => 'checkbox', + '#title' => t('Display'), + '#default_value' => variable_get('custom_search_' . $delta . 'criteria_or_display', FALSE), + ); + $form['criteria']['or']['custom_search_' . $delta . 'criteria_or_label'] = array( + '#type' => 'textfield', + '#title' => t('Label'), + '#default_value' => variable_get('custom_search_' . $delta . 'criteria_or_label', CUSTOM_SEARCH_CRITERIA_OR_LABEL_DEFAULT), + '#description' => t('Enter the label text for this field. The default value is "!default".', array('!default' => CUSTOM_SEARCH_CRITERIA_OR_LABEL_DEFAULT)), + ); + $form['criteria']['phrase'] = array( + '#type' => 'fieldset', + '#title' => t('Phrase'), + '#collapsible' => TRUE, + '#collapsed' => TRUE, + ); + $form['criteria']['phrase']['custom_search_' . $delta . 'criteria_phrase_display'] = array( + '#type' => 'checkbox', + '#title' => t('Display'), + '#default_value' => variable_get('custom_search_' . $delta . 'criteria_phrase_display', FALSE), + ); + $form['criteria']['phrase']['custom_search_' . $delta . 'criteria_phrase_label'] = array( + '#type' => 'textfield', + '#title' => t('Label'), + '#default_value' => variable_get('custom_search_' . $delta . 'criteria_phrase_label', CUSTOM_SEARCH_CRITERIA_PHRASE_LABEL_DEFAULT), + '#description' => t('Enter the label text for this field. The default value is "!default".', array('!default' => CUSTOM_SEARCH_CRITERIA_PHRASE_LABEL_DEFAULT)), + ); + $form['criteria']['negative'] = array( + '#type' => 'fieldset', + '#title' => t('Negative'), + '#collapsible' => TRUE, + '#collapsed' => TRUE, + ); + $form['criteria']['negative']['custom_search_' . $delta . 'criteria_negative_display'] = array( + '#type' => 'checkbox', + '#title' => t('Display'), + '#default_value' => variable_get('custom_search_' . $delta . 'criteria_negative_display', FALSE), + ); + $form['criteria']['negative']['custom_search_' . $delta . 'criteria_negative_label'] = array( + '#type' => 'textfield', + '#title' => t('Label'), + '#default_value' => variable_get('custom_search_' . $delta . 'criteria_negative_label', CUSTOM_SEARCH_CRITERIA_NEGATIVE_LABEL_DEFAULT), + '#description' => t('Enter the label text for this field. The default value is "!default".', array('!default' => CUSTOM_SEARCH_CRITERIA_NEGATIVE_LABEL_DEFAULT)), + ); + + return $form; +} + +/** + * Content admin form. + */ +function _custom_search_content_admin_form($delta = '') { + if ($delta != '') $delta = 'blocks_' . $delta . '_'; + + $form['content_selector'] = array( + '#type' => 'fieldset', + '#title' => t('Content selector'), + '#description' => t('Select the search types to present as search options in the search block. If none is selected, no selector will be displayed. Note: if there\'s only one type checked, the selector won\'t be displayed BUT only this type will be searched.'), + ); + $form['content_selector']['custom_search_' . $delta . 'node_types'] = array( + '#type' => 'checkboxes', + '#title' => t('Content types'), + '#default_value' => variable_get('custom_search_' . $delta . 'node_types', array()), + '#options' => node_get_types('names'), + ); + // Other searches. + $options = array(); + foreach (module_implements('search') as $module) { + if ($module != 'node' && $name = module_invoke($module, 'search', 'name')) { + $options[$module] = $name; + } + } + if (count($options)) { + $form['content_selector']['custom_search_' . $delta . 'other'] = array( + '#type' => 'checkboxes', + '#title' => t('Other searches'), + '#default_value' => variable_get('custom_search_' . $delta . 'other', array()), + '#options' => $options, + ); + } + $form['content_selector']['custom_search_' . $delta . 'type_selector'] = array( + '#type' => 'select', + '#title' => t('Selector type'), + '#options' => array( + 'select' => t('Drop-down list'), + 'selectmultiple' => t('Drop-down list with multiple choices'), + 'radios' => t('Radio buttons'), + 'checkboxes' => t('Checkboxes'), + ), + '#description' => t('Choose which selector type to use. Note: content types and other searches cannot be combined in a single search.'), + '#default_value' => variable_get('custom_search_' . $delta . 'type_selector', 'select'), + ); + $form['content_selector']['custom_search_' . $delta . 'type_selector_label_visibility'] = array( + '#type' => 'checkbox', + '#title' => t('Display label'), + '#default_value' => variable_get('custom_search_' . $delta . 'type_selector_label_visibility', TRUE), + ); + $form['content_selector']['custom_search_' . $delta . 'type_selector_label'] = array( + '#type' => 'textfield', + '#title' => t('Label text'), + '#default_value' => variable_get('custom_search_' . $delta . 'type_selector_label', CUSTOM_SEARCH_TYPE_SELECTOR_LABEL_DEFAULT), + '#description' => t('Enter the label text for the selector. The default value is "!default".', array('!default' => CUSTOM_SEARCH_TYPE_SELECTOR_LABEL_DEFAULT)), + ); + $form['content_selector']['any'] = array( + '#type' => 'fieldset', + '#title' => t('-Any-'), + ); + $form['content_selector']['any']['custom_search_' . $delta . 'type_selector_all'] = array( + '#type' => 'textfield', + '#title' => t('-Any content type- text'), + '#default_value' => variable_get('custom_search_' . $delta . 'type_selector_all', CUSTOM_SEARCH_ALL_TEXT_DEFAULT), + '#required' => TRUE, + '#description' => t('Enter the text for "any content type" choice. The default value is "!default".', array('!default' => CUSTOM_SEARCH_ALL_TEXT_DEFAULT)), + ); + $form['content_selector']['any']['custom_search_' . $delta . 'any_restricts'] = array( + '#type' => 'checkbox', + '#title' => t('Choosing -Any- restricts the search to the selected content types.'), + '#default_value' => variable_get('custom_search_' . $delta . 'any_restricts', FALSE), + '#description' => t('If not checked, choosing -Any- will search in all content types.'), + ); + $form['content_selector']['any']['custom_search_' . $delta . 'any_force'] = array( + '#type' => 'checkbox', + '#title' => t('Force -Any- to be displayed.'), + '#default_value' => variable_get('custom_search_' . $delta . 'any_force', FALSE), + '#description' => t('When only one content type is selected, the default behaviour is to hide the selector. If you need the -Any- option to be displayed, check this.'), + ); + + $form['custom_search_' . $delta . 'node_types_excluded'] = array( + '#type' => 'checkboxes', + '#title' => t('Content exclusion'), + '#description' => t('Select the content types you don\'t want to be displayed as results.'), + '#default_value' => variable_get('custom_search_' . $delta . 'node_types_excluded', array()), + '#options' => node_get_types('names'), + ); + + return $form; +} + +/** + * Custom paths admin form. + */ +function _custom_search_custom_paths_admin_form($delta = '') { + if ($delta != '') $delta = 'blocks_' . $delta . '_'; + $form['custom_search_paths_admin'] = array( + '#type' => 'fieldset', + '#title' => t('Custom search paths'), + '#collapsed' => TRUE, + '#collapsible' => TRUE, + ); + $form['custom_search_paths_admin']['custom_search_' . $delta . 'paths_selector'] = array( + '#type' => 'select', + '#title' => t('Selector type'), + '#options' => array( + 'select' => t('Drop-down list'), + 'radios' => t('Radio buttons'), + ), + '#description' => t('Choose which selector type to use.'), + '#default_value' => variable_get('custom_search_' . $delta . 'paths_selector', 'select'), + ); + $form['custom_search_paths_admin']['custom_search_' . $delta . 'paths_selector_label_visibility'] = array( + '#type' => 'checkbox', + '#title' => t('Display label'), + '#default_value' => variable_get('custom_search_' . $delta . 'paths_selector_label_visibility', TRUE), + ); + $form['custom_search_paths_admin']['custom_search_' . $delta . 'paths_selector_label'] = array( + '#type' => 'textfield', + '#title' => t('Label text'), + '#default_value' => variable_get('custom_search_' . $delta . 'paths_selector_label', CUSTOM_SEARCH_PATHS_SELECTOR_LABEL_DEFAULT), + '#description' => t('Enter the label text for the selector. The default value is "!default".', array('!default' => CUSTOM_SEARCH_PATHS_SELECTOR_LABEL_DEFAULT)), + ); + $form['custom_search_paths_admin']['custom_search_' . $delta . 'paths'] = array( + '#type' => 'textarea', + '#title' => t('Paths'), + '#default_value' => variable_get('custom_search_' . $delta . 'paths', ''), + '#rows' => 3, + '#description' => t('If you want to use custom search paths, enter them here in the form path|label, one per line (if only one path is specified, the selector will be hidden). The [key] token will be replaced by what is entered in the search box. Ie: mysearch/[key]|My custom search label.'), + ); + return $form; +} + +/** + * Ordering admin form + */ +function _custom_search_ordering_admin_form($delta = '') { + drupal_add_css(drupal_get_path('module', 'custom_search') . '/custom_search.css', 'module'); + + if ($delta != '') $delta = 'blocks_' . $delta . '_'; + $form['order'] = array( + '#type' => 'fieldset', + '#title' => t('Elements ordering'), + '#description' => t('Order the form elements as you want them to be displayed. If you put elements in the Popup section, they will only appear when the search field is clicked.') + ); + $form['order']['custom_search_' . $delta . 'order'] = array( + '#tree' => TRUE, + '#theme' => 'custom_search_sort_form', + ); + + $elements = array( + 'search_box' => array('title' => t('Search box'), 'default_weight' => -1), + 'criteria_or' => array('title' => t('Advanced search criterion: Or'), 'default_weight' => 6), + 'criteria_phrase' => array('title' => t('Advanced search criterion: Phrase'), 'default_weight' => 7), + 'criteria_negative' => array('title' => t('Advanced search criterion: Negative'), 'default_weight' => 8), + 'custom_paths' => array('title' => t('Custom search paths'), 'default_weight' => 9), + 'submit_button' => array('title' => t('Submit button'), 'default_weight' => 10), + ); + if (count(array_filter(array_merge(variable_get('custom_search_' . $delta . 'node_types', array()), variable_get('custom_search_' . $delta . 'other', array()))))) + $elements['content_types'] = array('title' => t('Content Types'), 'default_weight' => 0); + + foreach ($elements as $element => $data) { + $form['order']['custom_search_' . $delta . 'order'][$element] = array( + '#title' => $data['title'], + '#weight' => variable_get('custom_search_' . $delta . $element . '_weight', $data['default_weight']), + ); + $form['order']['custom_search_' . $delta . 'order'][$element]['sort'] = array( + '#type' => 'weight', + '#default_value' => variable_get('custom_search_' . $delta . $element . '_weight', $data['default_weight']), + '#attributes' => array('class' => 'sort-select sort-select-' . variable_get('custom_search_' . $delta . $element . '_region', 'block')), + ); + $form['order']['custom_search_' . $delta . 'order'][$element]['region'] = array( + '#type' => 'select', + '#options' => array( + 'block' => t('Block'), + 'popup' => t('Popup') + ), + '#default_value' => variable_get('custom_search_' . $delta . $element . '_region', 'block'), + '#attributes' => array('class' => 'region-select region-select-' . variable_get('custom_search_' . $delta . $element . '_region', 'block')), + ); + } + return $form; +} \ No newline at end of file diff --git a/sites/all/modules/custom_search/includes/google_appliance.inc b/sites/all/modules/custom_search/includes/google_appliance.inc new file mode 100644 index 00000000..ce3b4af1 --- /dev/null +++ b/sites/all/modules/custom_search/includes/google_appliance.inc @@ -0,0 +1,21 @@ + $type . '/' . $variables['keys'], 'query' => ''); +} \ No newline at end of file diff --git a/sites/all/modules/custom_search/includes/luceneapi_node.inc b/sites/all/modules/custom_search/includes/luceneapi_node.inc new file mode 100644 index 00000000..ff5b0f87 --- /dev/null +++ b/sites/all/modules/custom_search/includes/luceneapi_node.inc @@ -0,0 +1,33 @@ + $type, 'query' => $keys); +} \ No newline at end of file diff --git a/sites/all/modules/custom_search/js/custom_search.js b/sites/all/modules/custom_search/js/custom_search.js new file mode 100644 index 00000000..24ca84b9 --- /dev/null +++ b/sites/all/modules/custom_search/js/custom_search.js @@ -0,0 +1,113 @@ +;(function($) { + + Drupal.behaviors.custom_search = function (context) { + + if (!Drupal.settings.custom_search.solr) { + // Check if the search box is not empty on submit + $('form.search-form', context).submit(function(){ + var box = $(this).find('input.custom-search-box'); + if (box.val() != undefined && (box.val() == '' || box.val() == $(this).find('input.default-text').val())) { + $(this).find('input.custom-search-box').addClass('error'); + return false; + } + // If basic search is hidden, copy or value to the keys + if ($(this).find('#edit-keys').parents('div.element-invisible').attr('class') == 'element-invisible') { + $(this).find('#edit-keys').val($(this).find('#edit-or').val()); + $(this).find('#edit-or').val(''); + } + return true; + }); + } + + // Search from target + $('form.search-form').attr('target', Drupal.settings.custom_search.form_target); + + // Clear default text on focus, and put it back on blur. Also displays Popup. + $('input.custom-search-box', context) + .blur(function(e){ + var $this = $(this); + var $parentForm = $this.parents('form'); + if ($this.val() == '') { + $this.addClass('custom-search-default-value'); + $this.val($parentForm.find('input.default-text').val()); + } + }) + .bind('click focus', function(e){ + var $this = $(this); + var $parentForm = $this.parents('form'); + if ($this.val() == $parentForm.find('input.default-text').val()) $this.val(''); + $this.removeClass('custom-search-default-value'); + // check if there's something in the popup and displays it + var popup = $parentForm.find('fieldset.custom_search-popup'); + if (popup.find('input,select').length && !popup.hasClass('opened')) popup.fadeIn().addClass('opened'); + e.stopPropagation(); + } + ); + $(document).bind('click focus', function(){ + $('fieldset.custom_search-popup').hide().removeClass('opened'); + }); + + // Handle checkboxes + $('.custom-search-selector input:checkbox', context).each(function(){ + var el = $(this); + if (el.val() == 'c-all') { + el.change(function(){ + $(this).parents('.custom-search-selector').find('input:checkbox[value!=c-all]').attr('checked', false); + }); + } + else { + if (el.val().substr(0,2) == 'c-') { + el.change(function(){ + $('.custom-search-selector input:checkbox').each(function(){ + if ($(this).val().substr(0,2) == 'o-') $(this).attr('checked', false); + }); + $(this).parents('.custom-search-selector').find('input:checkbox[value=c-all]').attr('checked', false); + }); + } else { + el.change(function(){ + $(this).parents('.custom-search-selector').find('input:checkbox[value!='+el.val()+']').attr('checked', false); + }); + } + } + }); + + // Reselect types and terms in advanced search + var edit_keys = $('#edit-keys').val(); + if(edit_keys) { + // types + var pos = edit_keys.indexOf('type:'); + if (pos) { + var pos2 = edit_keys.indexOf(' ',pos); + if (pos2==-1) pos2 = edit_keys.length; + var types = edit_keys.substring(pos+5,pos2); + types = types.split(','); + for (var i=0; i' + Drupal.t('Close') + ''); + $('a.custom_search-popup-close').click(function(e){ + $('fieldset.custom_search-popup.opened').hide().removeClass('opened'); + e.preventDefault(); + }); + + } + +}(jQuery)); diff --git a/sites/all/modules/custom_search/js/custom_search_sort.js b/sites/all/modules/custom_search/js/custom_search_sort.js new file mode 100644 index 00000000..35e17d27 --- /dev/null +++ b/sites/all/modules/custom_search/js/custom_search_sort.js @@ -0,0 +1,92 @@ +;(function($) { + + /** + * Move a block in the blocks table from one region to another via select list. + * + * This behavior is dependent on the tableDrag behavior, since it uses the + * objects initialized in that behavior to update the row. + */ + Drupal.behaviors.customSearchSort = function(context) { + var table = $('table#elements'); + var tableDrag = Drupal.tableDrag.elements; // Get the blocks tableDrag object. + + // Add a handler for when a row is swapped, update empty regions. + tableDrag.row.prototype.onSwap = function(swappedRow) { + checkEmptyRegions(table, this); + }; + + // Add a handler so when a row is dropped, update fields dropped into new regions. + tableDrag.onDrop = function() { + var dragObject = this; + if ($(dragObject.rowObject.element).prev('tr').is('.region-message')) { + var regionRow = $(dragObject.rowObject.element).prev('tr').get(0); + var regionName = regionRow.className.replace(/([^ ]+[ ]+)*region-([^ ]+)-message([ ]+[^ ]+)*/, '$2'); + var regionField = $('select.region-select', dragObject.rowObject.element); + var weightField = $('select.sort-select', dragObject.rowObject.element); + var oldRegionName = weightField[0].className.replace(/([^ ]+[ ]+)*sort-select-([^ ]+)([ ]+[^ ]+)*/, '$2'); + + if (!regionField.is('.region-select-'+ regionName)) { + regionField.removeClass('region-select-' + oldRegionName).addClass('region-select-' + regionName); + weightField.removeClass('sort-select-' + oldRegionName).addClass('sort-select-' + regionName); + regionField.val(regionName); + } + } + }; + + // Add the behavior to each region select list. + $('select.region-select:not(.regionselect-processed)', context).each(function() { + $(this).change(function(event) { + // Make our new row and select field. + var row = $(this).parents('tr:first'); + var select = $(this); + tableDrag.rowObject = new tableDrag.row(row); + + // Find the correct region and insert the row as the first in the region. + $('tr.region-message', table).each(function() { + if ($(this).is('.region-' + select[0].value + '-message')) { + // Add the new row and remove the old one. + $(this).after(row); + // Manually update weights and restripe. + tableDrag.updateFields(row.get(0)); + tableDrag.rowObject.changed = true; + if (tableDrag.oldRowElement) { + $(tableDrag.oldRowElement).removeClass('drag-previous'); + } + tableDrag.oldRowElement = row.get(0); + tableDrag.restripeTable(); + tableDrag.rowObject.markChanged(); + tableDrag.oldRowElement = row; + $(row).addClass('drag-previous'); + } + }); + + // Modify empty regions with added or removed fields. + checkEmptyRegions(table, row); + // Remove focus from selectbox. + select.get(0).blur(); + }); + $(this).addClass('regionselect-processed'); + }); + + var checkEmptyRegions = function(table, rowObject) { + $('tr.region-message', table).each(function() { + // If the dragged row is in this region, but above the message row, swap it down one space. + if ($(this).prev('tr').get(0) == rowObject.element) { + // Prevent a recursion problem when using the keyboard to move rows up. + if ((rowObject.method != 'keyboard' || rowObject.direction == 'down')) { + rowObject.swap('after', this); + } + } + // This region has become empty + if ($(this).next('tr').is(':not(.draggable)') || $(this).next('tr').size() == 0) { + $(this).removeClass('region-populated').addClass('region-empty'); + } + // This region has become populated. + else if ($(this).is('.region-empty')) { + $(this).removeClass('region-empty').addClass('region-populated'); + } + }); + }; + }; + +}(jQuery)); diff --git a/sites/all/modules/custom_search/modules/custom_search_blocks/custom_search_blocks.admin.inc b/sites/all/modules/custom_search/modules/custom_search_blocks/custom_search_blocks.admin.inc index 080299b1..05c13af7 100644 --- a/sites/all/modules/custom_search/modules/custom_search_blocks/custom_search_blocks.admin.inc +++ b/sites/all/modules/custom_search/modules/custom_search_blocks/custom_search_blocks.admin.inc @@ -1,5 +1,4 @@ block page to place them in a region.', array('@link' => url('admin/build/block'))); + $output = t('If you want custom search blocks, enable them here. Then go to the block page to place them in a region.', array('@link' => url('admin/build/block'))); break; } return $output; diff --git a/sites/all/modules/custom_search/modules/custom_search_blocks/custom_search_blocks.info b/sites/all/modules/custom_search/modules/custom_search_blocks/custom_search_blocks.info index bc4a72d6..da6139c7 100644 --- a/sites/all/modules/custom_search/modules/custom_search_blocks/custom_search_blocks.info +++ b/sites/all/modules/custom_search/modules/custom_search_blocks/custom_search_blocks.info @@ -1,34 +1,11 @@ -; $Id: custom_search_blocks.info,v 1.1.2.6 2010/05/04 17:04:48 jdanthinne Exp $ name = Custom Search Blocks description = Provides additional search blocks. core = 6.x package = Custom Search dependencies[] = custom_search - -; Information added by drupal.org packaging script on 2010-04-30 -version = "6.x-1.x-dev" -core = "6.x" -project = "custom_search" -datestamp = "1272629076" - - -; Information added by drupal.org packaging script on 2010-05-02 -version = "6.x-1.x-dev" -core = "6.x" -project = "custom_search" -datestamp = "1272758640" - - -; Information added by drupal.org packaging script on 2010-05-03 -version = "6.x-1.x-dev" -core = "6.x" -project = "custom_search" -datestamp = "1272845023" - - -; Information added by drupal.org packaging script on 2010-06-07 -version = "6.x-1.4" +; Information added by Drupal.org packaging script on 2014-04-02 +version = "6.x-1.12" core = "6.x" project = "custom_search" -datestamp = "1275894013" +datestamp = "1396449571" diff --git a/sites/all/modules/custom_search/modules/custom_search_blocks/custom_search_blocks.install b/sites/all/modules/custom_search/modules/custom_search_blocks/custom_search_blocks.install index d0bce398..cef3e36c 100644 --- a/sites/all/modules/custom_search/modules/custom_search_blocks/custom_search_blocks.install +++ b/sites/all/modules/custom_search/modules/custom_search_blocks/custom_search_blocks.install @@ -1,5 +1,4 @@ vid . '_selector_label'); variable_del('custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector_all'); variable_del('custom_search_blocks_' . $delta . '_taxonomy' . $voc->vid . '_weight'); + variable_del('custom_search_blocks_' . $delta . '_taxonomy' . $voc->vid . '_region'); } + variable_del('custom_search_blocks_' . $delta . '_paths_terms_separator'); } } variable_del('custom_search_blocks_number'); +} + +function custom_search_blocks_update_6100() { + $ret = array(); + $blocks = variable_get('custom_search_blocks_number', 1); + for ($delta=1 ; $delta<=$blocks ; $delta++) { + variable_set('custom_search_blocks_' . $delta . '_submit_text', variable_get('custom_search_submit_text', CUSTOM_SEARCH_SUBMIT_TEXT_DEFAULT)); + variable_set('custom_search_blocks_' . $delta . '_image_path', variable_get('custom_search_image_path', '')); + variable_set('custom_search_blocks_' . $delta . '_criteria_or_display', variable_get('custom_search_criteria_or_display', FALSE)); + variable_set('custom_search_blocks_' . $delta . '_criteria_or_label', variable_get('custom_search_criteria_or_label', CUSTOM_SEARCH_CRITERIA_OR_LABEL_DEFAULT)); + variable_set('custom_search_blocks_' . $delta . '_criteria_phrase_display', variable_get('custom_search_criteria_phrase_display', FALSE)); + variable_set('custom_search_blocks_' . $delta . '_criteria_phrase_label', variable_get('custom_search_criteria_phrase_label', CUSTOM_SEARCH_CRITERIA_PHRASE_LABEL_DEFAULT)); + variable_set('custom_search_blocks_' . $delta . '_criteria_negative_display', variable_get('custom_search_criteria_negative_display', FALSE)); + variable_set('custom_search_blocks_' . $delta . '_criteria_negative_label', variable_get('custom_search_criteria_negative_label', CUSTOM_SEARCH_CRITERIA_NEGATIVE_LABEL_DEFAULT)); + } + return $ret; } \ No newline at end of file diff --git a/sites/all/modules/custom_search/modules/custom_search_blocks/custom_search_blocks.module b/sites/all/modules/custom_search/modules/custom_search_blocks/custom_search_blocks.module index 7417d7d6..c32628e8 100644 --- a/sites/all/modules/custom_search/modules/custom_search_blocks/custom_search_blocks.module +++ b/sites/all/modules/custom_search/modules/custom_search_blocks/custom_search_blocks.module @@ -1,5 +1,4 @@ 'multipart/form-data'); + } +} + /** * Implementation of hook_block() to provide additional blocks. */ @@ -38,64 +47,21 @@ function custom_search_blocks_block($op = 'list', $delta = 0, $edit = array()) { switch ($op) { case 'configure': - $form['custom_search_blocks_' . $delta . '_label_visibility'] = array( - '#type' => 'checkbox', - '#title' => t('Display label'), - '#default_value' => variable_get('custom_search_blocks_' . $delta . '_label_visibility', TRUE), - ); - $form['custom_search_blocks_' . $delta . '_label'] = array( - '#type' => 'textfield', - '#title' => t('Label text'), - '#default_value' => variable_get('custom_search_blocks_' . $delta . '_label', CUSTOM_SEARCH_LABEL_DEFAULT), - '#description' => t('Enter the label text for the search box. The default value is "!default".', array('!default' => CUSTOM_SEARCH_LABEL_DEFAULT)), - ); + // Basic settings. + $form = _custom_search_default_admin_form($delta); // Content. $form['content'] = array( '#type' => 'fieldset', '#title' => t('Content'), - '#description' => t('Select the search types to present as search options in the search block. If none is selected, no selector will be displayed. Note: if there\'s only one type checked, the selector won\'t be displayed BUT only this type will be searched.'), '#collapsible' => TRUE, '#collapsed' => TRUE, ); - $form['content'] = array_merge($form['content'], custom_search_content_admin_form($delta)); + $form['content'] = array_merge($form['content'], _custom_search_content_admin_form($delta)); // Custom search paths - $form['custom_search_paths'] = array( - '#type' => 'fieldset', - '#title' => t('Custom search paths'), - '#collapsible' => TRUE, - '#collapsed' => TRUE, - ); - $form['custom_search_paths'] = array_merge($form['custom_search_paths'], custom_search_custom_paths_admin_form($delta)); - // Ordering. - $form['order'] = array( - '#type' => 'fieldset', - '#title' => t('Elements ordering'), - '#weight' => 50 - ); - $form['order']['custom_search_blocks_order'] = array( - '#tree' => TRUE, - '#theme' => 'custom_search_blocks_sort_form', - ); - $form['order']['custom_search_blocks_order']['search_box'] = array( - '#title' => t('Search Box'), - 'sort' => array('#type' => 'weight', '#default_value' => variable_get('custom_search_blocks_' . $delta . '_search_box_weight', -1)), - '#weight' => variable_get('custom_search_blocks_' . $delta . '_search_box_weight', -1), - ); - $form['order']['custom_search_blocks_order']['content_types'] = array( - '#title' => t('Content Types'), - 'sort' => array('#type' => 'weight', '#default_value' => variable_get('custom_search_blocks_' . $delta . '_content_types_weight', 0)), - '#weight' => variable_get('custom_search_blocks_' . $delta . '_content_types_weight', 0), - ); - $form['order']['custom_search_blocks_order']['custom_paths'] = array( - '#title' => t('Custom search paths'), - 'sort' => array('#type' => 'weight', '#default_value' => variable_get('custom_search_blocks_' . $delta . '_custom_paths_weight', 9)), - '#weight' => variable_get('custom_search_blocks_' . $delta . '_custom_paths_weight', 9), - ); - $form['order']['custom_search_blocks_order']['submit_button'] = array( - '#title' => t('Submit button'), - 'sort' => array('#type' => 'weight', '#default_value' => variable_get('custom_search_blocks_' . $delta . '_submit_button_weight', 10)), - '#weight' => variable_get('custom_search_blocks_' . $delta . '_submit_button_weight', 10), - ); + $form = array_merge($form, _custom_search_custom_paths_admin_form($delta)); + // Ordering + $form = array_merge($form, _custom_search_ordering_admin_form($delta)); + $form['order']['#weight'] = 50; return $form; break; @@ -104,8 +70,18 @@ function custom_search_blocks_block($op = 'list', $delta = 0, $edit = array()) { foreach ($edit as $key => $value) { if (drupal_substr($key, 0, 20) == 'custom_search_blocks') variable_set($key, $value); } - foreach ($edit['custom_search_blocks_order'] as $key => $data) { + foreach ($edit['custom_search_blocks_' . $delta . '_order'] as $key => $data) { variable_set('custom_search_blocks_' . $delta . '_' . $key . '_weight', $data['sort']); + variable_set('custom_search_blocks_' . $delta . '_' . $key . '_region', $data['region']); + } + // Submit image? + $directory_path = file_directory_path() . '/custom_search'; + file_check_directory($directory_path, FILE_CREATE_DIRECTORY); + // Check for a new uploaded image. + if ($file = file_save_upload('custom_search_image', array('file_validate_is_image' => array()))) { + if (file_copy($file, $directory_path)) { + variable_set('custom_search_blocks_' . $delta . '_image_path', $file->filepath); + } } break; @@ -120,7 +96,7 @@ function custom_search_blocks_block($op = 'list', $delta = 0, $edit = array()) { case 'view': if (user_access('use custom search blocks')) { - $block['content'] = drupal_get_form('custom_search_blocks_form', $delta); + $block['content'] = drupal_get_form('custom_search_blocks_form_' . $delta, $delta); $block['subject'] = "Custom Search $delta"; return $block; } @@ -130,52 +106,42 @@ function custom_search_blocks_block($op = 'list', $delta = 0, $edit = array()) { } /** - * Theme the re-ordering form. + * Implementation of hook_forms() to generate a unique form_id with the same form builder function */ -function theme_custom_search_blocks_sort_form($form) { - drupal_add_tabledrag('custom-search-sort', 'order', 'sibling', 'sort'); - $header = array(t('Elements'), 'sort'); - foreach (element_children($form) as $key) { - // Add class to group weight fields for drag and drop. - $form[$key]['sort']['#attributes']['class'] = 'sort'; - $row = array(); - $row[] = $form[$key]['#title']; - $row[] = drupal_render($form[$key]['sort']); - $rows[] = array('data' => $row, 'class' => 'draggable'); +function custom_search_blocks_forms($form_id, $args) { + for ($a = 1 ; $a <= variable_get('custom_search_blocks_number', 1) ; $a++) { + $forms['custom_search_blocks_form_' . $a] = array( + 'callback' => 'custom_search_blocks_form', + 'callback arguments' => array($a), + ); } - $output = theme('table', $header, $rows, array('id' => 'custom-search-sort')); - $output .= drupal_render($form); - return $output; + return $forms; } /** * Form builder; Output a search form for the additional search blocks. */ function custom_search_blocks_form(&$form_state, $delta) { - $form['custom_search_blocks_form'] = array( - '#title' => variable_get('custom_search_blocks_' . $delta . '_label', CUSTOM_SEARCH_LABEL_DEFAULT), + $form['custom_search_blocks_form_' . $delta] = array( '#type' => 'textfield', '#size' => 15, '#default_value' => '', '#attributes' => array('title' => t('Enter the terms you wish to search for.')), ); - if (!variable_get('custom_search_blocks_' . $delta . '_label_visibility', TRUE)) $form['custom_search_blocks_form']['#post_render'] = array('_custom_search_hide_label'); $form['delta'] = array('#type' => 'hidden', '#value' => $delta); $form['submit'] = array('#type' => 'submit', '#value' => t('Search')); $form['#submit'][] = 'search_box_form_submit'; - return $form; -} - -/** - * Implementation of hook_theme(). - */ -function custom_search_blocks_theme() { - if (user_access('use custom search blocks')) { - return array( - 'custom_search_blocks_sort_form' => array('arguments' => array('form' => NULL)), - ); + if (function_exists('apachesolr_autocomplete_variable_get_widget')) { + // support for apachesolr_autocomplete module + if (apachesolr_autocomplete_variable_get_widget() == 'custom') { + $form['custom_search_blocks_form_' . $delta]['#attributes']['class'] = 'apachesolr-autocomplete unprocessed'; + } + else { + $form['custom_search_blocks_form_' . $delta]['#autocomplete_path'] = 'apachesolr_autocomplete'; + } } - else return array(); + + return $form; } \ No newline at end of file diff --git a/sites/all/modules/custom_search/modules/custom_search_i18n/custom_search_i18n.info b/sites/all/modules/custom_search/modules/custom_search_i18n/custom_search_i18n.info index 336cf920..6d3357fc 100644 --- a/sites/all/modules/custom_search/modules/custom_search_i18n/custom_search_i18n.info +++ b/sites/all/modules/custom_search/modules/custom_search_i18n/custom_search_i18n.info @@ -1,13 +1,12 @@ -; $Id: custom_search_i18n.info,v 1.1.2.2 2010/05/04 17:04:48 jdanthinne Exp $ name = Custom Search Internationalization description = Provides Internationalization to Custom Search. core = 6.x package = Custom Search dependencies[] = custom_search dependencies[] = i18nstrings -; Information added by drupal.org packaging script on 2010-06-07 -version = "6.x-1.4" +; Information added by Drupal.org packaging script on 2014-04-02 +version = "6.x-1.12" core = "6.x" project = "custom_search" -datestamp = "1275894013" +datestamp = "1396449571" diff --git a/sites/all/modules/custom_search/modules/custom_search_i18n/custom_search_i18n.install b/sites/all/modules/custom_search/modules/custom_search_i18n/custom_search_i18n.install index 5c4a1e14..05b67849 100644 --- a/sites/all/modules/custom_search/modules/custom_search_i18n/custom_search_i18n.install +++ b/sites/all/modules/custom_search/modules/custom_search_i18n/custom_search_i18n.install @@ -1,5 +1,4 @@ 'display:none;'); + // Submit button + $form['submit']['#value'] = i18nstrings('custom_search:common:1:' . $delta . 'submit_text', variable_get('custom_search_' . $delta . 'submit_text', CUSTOM_SEARCH_SUBMIT_TEXT_DEFAULT)); + if ($form['submit']['#value'] == '') $form['submit']['#attributes'] = array('style' => 'display:none;'); - // Type selector - if (is_array($form['custom_search_types'])) { - $form['custom_search_types']['#title'] = i18nstrings('custom_search:content_types:1:' . $delta . 'selector_label', variable_get('custom_search_' . $delta . 'type_selector_label', CUSTOM_SEARCH_TYPE_SELECTOR_LABEL_DEFAULT)); - if (array_key_exists('c-all', $form['custom_search_types']['#options'])) { - $form['custom_search_types']['#options']['c-all'] = i18nstrings('custom_search:content_types:1:' . $delta . 'selector_all', variable_get('custom_search_' . $delta . 'type_selector_all', CUSTOM_SEARCH_ALL_TEXT_DEFAULT)); + // Type selector + if ((!empty($form['custom_search_types']) && is_array($form['custom_search_types'])) || (!empty($form['popup']['custom_search_types']) && is_array($form['popup']['custom_search_types']))) { + if (variable_get('custom_search_' . $delta . 'content_types_region', 'block') == 'popup') { + $form['popup']['custom_search_types']['#title'] = i18nstrings('custom_search:content_types:1:' . $delta . 'selector_label', variable_get('custom_search_' . $delta . 'type_selector_label', CUSTOM_SEARCH_TYPE_SELECTOR_LABEL_DEFAULT)); + if (array_key_exists('c-all', $form['popup']['custom_search_types']['#options'])) { + $form['popup']['custom_search_types']['#options']['c-all'] = i18nstrings('custom_search:content_types:1:' . $delta . 'selector_all', variable_get('custom_search_' . $delta . 'type_selector_all', CUSTOM_SEARCH_ALL_TEXT_DEFAULT)); + } + } + else { + $form['custom_search_types']['#title'] = i18nstrings('custom_search:content_types:1:' . $delta . 'selector_label', variable_get('custom_search_' . $delta . 'type_selector_label', CUSTOM_SEARCH_TYPE_SELECTOR_LABEL_DEFAULT)); + if (array_key_exists('c-all', $form['custom_search_types']['#options'])) { + $form['custom_search_types']['#options']['c-all'] = i18nstrings('custom_search:content_types:1:' . $delta . 'selector_all', variable_get('custom_search_' . $delta . 'type_selector_all', CUSTOM_SEARCH_ALL_TEXT_DEFAULT)); + } + } } - } - if (module_exists('custom_search_taxonomy')) { - $vocabularies = taxonomy_get_vocabularies(); - foreach ($vocabularies as $voc) { - if (is_array($form['custom_search_vocabulary_' . $voc->vid])) { - $form['custom_search_vocabulary_' . $voc->vid]['#title'] = i18nstrings('custom_search:vocabulary:' . $voc->vid . ':' . $delta . 'selector_label', variable_get('custom_search_' . $delta . 'voc' . $voc->vid . '_selector_label', $voc->name)); - if (array_key_exists('c-all', $form['custom_search_vocabulary_' . $voc->vid]['#options'])) { - $form['custom_search_vocabulary_' . $voc->vid]['#options']['c-all'] = i18nstrings('custom_search:vocabulary:' . $voc->vid . ':' . $delta . 'selector_all', variable_get('custom_search_' . $delta . 'voc' . $voc->vid . '_selector_all', CUSTOM_SEARCH_ALL_TEXT_DEFAULT)); + // Taxonomy + if (module_exists('custom_search_taxonomy')) { + $vocabularies = taxonomy_get_vocabularies(); + // Translate label and -all- + foreach ($vocabularies as $voc) { + if ((!empty($form['custom_search_vocabulary_' . $voc->vid]) && is_array($form['custom_search_vocabulary_' . $voc->vid])) || (!empty($form['popup']['custom_search_vocabulary_' . $voc->vid]) && is_array($form['popup']['custom_search_vocabulary_' . $voc->vid]))) { + if (variable_get('custom_search_' . $delta . 'taxonomy'. $voc->vid . '_region', 'block') == 'popup') { + $form['popup']['custom_search_vocabulary_' . $voc->vid]['#title'] = i18nstrings('custom_search:vocabulary:' . $voc->vid . ':' . $delta . 'selector_label', variable_get('custom_search_' . $delta . 'voc' . $voc->vid . '_selector_label', $voc->name)); + if (is_array($form['popup']['custom_search_vocabulary_' . $voc->vid]['#options']) && array_key_exists('c-all', $form['popup']['custom_search_vocabulary_' . $voc->vid]['#options'])) { + $form['popup']['custom_search_vocabulary_' . $voc->vid]['#options']['c-all'] = i18nstrings('custom_search:vocabulary:' . $voc->vid . ':' . $delta . 'selector_all', variable_get('custom_search_' . $delta . 'voc' . $voc->vid . '_selector_all', CUSTOM_SEARCH_ALL_TEXT_DEFAULT)); + } + } + else { + $form['custom_search_vocabulary_' . $voc->vid]['#title'] = i18nstrings('custom_search:vocabulary:' . $voc->vid . ':' . $delta . 'selector_label', variable_get('custom_search_' . $delta . 'voc' . $voc->vid . '_selector_label', $voc->name)); + if (is_array($form['custom_search_vocabulary_' . $voc->vid]['#options']) && array_key_exists('c-all', $form['custom_search_vocabulary_' . $voc->vid]['#options'])) { + $form['custom_search_vocabulary_' . $voc->vid]['#options']['c-all'] = i18nstrings('custom_search:vocabulary:' . $voc->vid . ':' . $delta . 'selector_all', variable_get('custom_search_' . $delta . 'voc' . $voc->vid . '_selector_all', CUSTOM_SEARCH_ALL_TEXT_DEFAULT)); + } + } + } + } + // Translate terms + if (module_exists('i18ntaxonomy')) { + foreach ($vocabularies as $voc) { + if ((!empty($form['custom_search_vocabulary_' . $voc->vid]) && is_array($form['custom_search_vocabulary_' . $voc->vid]['#options'])) || (!empty($form['popup']['custom_search_vocabulary_' . $voc->vid]) && is_array($form['popup']['custom_search_vocabulary_' . $voc->vid]['#options']))) { + if (variable_get('custom_search_' . $delta . 'taxonomy'. $voc->vid . '_region', 'block') == 'popup') { + foreach ($form['popup']['custom_search_vocabulary_' . $voc->vid]['#options'] as $tid => $name) { + if ($tid != 'c-all') { + $real_tid = substr($tid, 2); + $translated_term = i18nstrings('taxonomy:term:' . $real_tid . ':name', $name); + $form['popup']['custom_search_vocabulary_' . $voc->vid]['#options'][$tid] = ($translated_term[0] != '-') ? str_repeat('-', _custom_search_i18n_term_depth($real_tid)) . ' ' . $translated_term : $translated_term ; + } + } + } + else { + foreach ($form['custom_search_vocabulary_' . $voc->vid]['#options'] as $tid => $name) { + if ($tid != 'c-all') { + $real_tid = substr($tid, 2); + $translated_term = i18nstrings('taxonomy:term:' . $real_tid . ':name', $name); + $form['custom_search_vocabulary_' . $voc->vid]['#options'][$tid] = ($translated_term[0] != '-') ? str_repeat('-', _custom_search_i18n_term_depth($real_tid)) . ' ' . $translated_term : $translated_term ; + } + } + } + } } } } + + // Custom Paths + if ((!empty($form['custom_search_paths']) && is_array($form['custom_search_paths'])) || (!empty($form['popup']['custom_search_paths']) && is_array($form['popup']['custom_search_paths']))) { + if (variable_get('custom_search_' . $delta . 'custom_paths_region', 'block') == 'popup') { + $form['popup']['custom_search_paths']['#title'] = i18nstrings('custom_search:paths:1:' . $delta . 'selector_label', variable_get('custom_search_' . $delta . 'paths_selector_label', CUSTOM_SEARCH_PATHS_SELECTOR_LABEL_DEFAULT)); + } + else { + $form['custom_search_paths']['#title'] = i18nstrings('custom_search:paths:1:' . $delta . 'selector_label', variable_get('custom_search_' . $delta . 'paths_selector_label', CUSTOM_SEARCH_PATHS_SELECTOR_LABEL_DEFAULT)); + } + } } + break; case 'custom_search_admin': $form['#submit'][] = 'custom_search_i18n_admin_submit'; break; @@ -74,10 +138,7 @@ function custom_search_i18n_form_alter(&$form, $form_state, $form_id) { function custom_search_i18n_preprocess_search_results(&$variables) { if (user_access('use custom search') && variable_get('custom_search_filter', 'disabled') != 'disabled') { - $title = i18nstrings('custom_search:filter:1:label', variable_get('custom_search_filter_label', CUSTOM_SEARCH_FILTER_LABEL_DEFAULT)); - $start = strpos($variables['search_results'], '

'); - $stop = strpos($variables['search_results'], '

', $start); - $variables['search_results'] = substr($variables['search_results'], 0, $start) . '

' . $title . substr($variables['search_results'], $stop); + $variables['filter-title'] = i18nstrings('custom_search:filter:1:label', variable_get('custom_search_filter_label', CUSTOM_SEARCH_FILTER_LABEL_DEFAULT)); } } @@ -91,6 +152,7 @@ function custom_search_i18n_admin_submit($form, &$form_state) { i18nstrings_update('custom_search:criterion:1:or_label', $form_state['values']['custom_search_criteria_or_label']); i18nstrings_update('custom_search:criterion:1:phrase_label', $form_state['values']['custom_search_criteria_phrase_label']); i18nstrings_update('custom_search:criterion:1:negative_label', $form_state['values']['custom_search_criteria_negative_label']); + i18nstrings_update('custom_search:paths:1:selector_label', $form_state['values']['custom_search_paths_selector_label']); } function custom_search_i18n_content_admin_submit($form, &$form_state) { @@ -113,8 +175,14 @@ function custom_search_i18n_results_admin_submit($form, &$form_state) { function custom_search_i18n_block_admin_configure_submit($form, &$form_state) { $delta = $form_state['values']['delta']; i18nstrings_update('custom_search:common:1:blocks_' . $delta . '_label', $form_state['values']['custom_search_blocks_' . $delta . '_label']); + i18nstrings_update('custom_search:common:1:blocks_' . $delta . '_text', $form_state['values']['custom_search_blocks_' . $delta . '_text']); + i18nstrings_update('custom_search:common:1:blocks_' . $delta . '_submit_text', $form_state['values']['custom_search_blocks_' . $delta . '_submit_text']); + i18nstrings_update('custom_search:criterion:1:blocks_' . $delta . '_or_label', $form_state['values']['custom_search_blocks_' . $delta . '_criteria_or_label']); + i18nstrings_update('custom_search:criterion:1:blocks_' . $delta . '_phrase_label', $form_state['values']['custom_search_blocks_' . $delta . '_criteria_phrase_label']); + i18nstrings_update('custom_search:criterion:1:blocks_' . $delta . '_negative_label', $form_state['values']['custom_search_blocks_' . $delta . '_criteria_negative_label']); i18nstrings_update('custom_search:content_types:1:blocks_' . $delta . '_selector_label', $form_state['values']['custom_search_blocks_' . $delta . '_type_selector_label']); i18nstrings_update('custom_search:content_types:1:blocks_' . $delta . '_selector_all', $form_state['values']['custom_search_blocks_' . $delta . '_type_selector_all']); + i18nstrings_update('custom_search:paths:1:blocks_' . $delta . '_selector_label', $form_state['values']['custom_search_blocks_' . $delta . '_paths_selector_label']); if (module_exists('custom_search_taxonomy')) { $vocabularies = taxonomy_get_vocabularies(); foreach ($vocabularies as $voc) { @@ -145,6 +213,7 @@ function custom_search_i18n_locale_refresh() { i18nstrings_update('custom_search:common:1:submit_text', variable_get('custom_search_submit_text', CUSTOM_SEARCH_SUBMIT_TEXT_DEFAULT)); i18nstrings_update('custom_search:content_types:1:selector_label', variable_get('custom_search_type_selector_label', CUSTOM_SEARCH_TYPE_SELECTOR_LABEL_DEFAULT)); i18nstrings_update('custom_search:content_types:1:selector_all', variable_get('custom_search_type_selector_all', CUSTOM_SEARCH_ALL_TEXT_DEFAULT)); + i18nstrings_update('custom_search:paths:1:selector_label', variable_get('custom_search_paths_selector_label', CUSTOM_SEARCH_PATHS_SELECTOR_LABEL_DEFAULT)); i18nstrings_update('custom_search:criterion:1:or_label', variable_get('custom_search_criteria_or_label', CUSTOM_SEARCH_CRITERIA_OR_LABEL_DEFAULT)); i18nstrings_update('custom_search:criterion:1:phrase_label', variable_get('custom_search_criteria_phrase_label', CUSTOM_SEARCH_CRITERIA_PHRASE_LABEL_DEFAULT)); i18nstrings_update('custom_search:criterion:1:negative_label', variable_get('custom_search_criteria_negative_label', CUSTOM_SEARCH_CRITERIA_NEGATIVE_LABEL_DEFAULT)); @@ -165,9 +234,28 @@ function custom_search_i18n_locale_refresh() { if (module_exists('custom_search_blocks')) { for ($a = 1 ; $a <= variable_get('custom_search_blocks_number', 1) ; $a++) { i18nstrings_update('custom_search:common:1:blocks_' . $a . '_label', variable_get('custom_search_blocks_' . $a . '_label', CUSTOM_SEARCH_LABEL_DEFAULT)); + i18nstrings_update('custom_search:common:1:blocks_' . $a . '_text', $form_state['values']['custom_search_blocks_' . $a . '_text']); + i18nstrings_update('custom_search:common:1:blocks_' . $a . '_submit_text', $form_state['values']['custom_search_blocks_' . $a . '_submit_text']); + i18nstrings_update('custom_search:criterion:1:blocks_' . $a . '_or_label', $form_state['values']['custom_search_blocks_' . $a . '_criteria_or_label']); + i18nstrings_update('custom_search:criterion:1:blocks_' . $a . '_phrase_label', $form_state['values']['custom_search_blocks_' . $a . '_criteria_phrase_label']); + i18nstrings_update('custom_search:criterion:1:blocks_' . $a . '_negative_label', $form_state['values']['custom_search_blocks_' . $a . '_criteria_negative_label']); i18nstrings_update('custom_search:content_types:1:blocks_' . $a . '_selector_label', variable_get('custom_search_blocks_' . $a . '_type_selector_label', CUSTOM_SEARCH_TYPE_SELECTOR_LABEL_DEFAULT)); i18nstrings_update('custom_search:content_types:1:blocks_' . $a . '_selector_all', variable_get('custom_search_blocks_' . $a . '_type_selector_all', CUSTOM_SEARCH_ALL_TEXT_DEFAULT)); + i18nstrings_update('custom_search:paths:1:blocks_' . $a . '_selector_label', variable_get('custom_search_blocks_' . $a . '_paths_selector_label', CUSTOM_SEARCH_PATHS_SELECTOR_LABEL_DEFAULT)); } } return TRUE; +} + +function _custom_search_i18n_term_depth($tid) { + $limit = 99; + $depth = 0; + while ($parent = db_result(db_query("SELECT parent FROM {term_hierarchy} WHERE tid=%d", $tid))) { + $depth++; + $tid = $parent; + if ($depth > $limit) { + break; + } + } + return $depth; } \ No newline at end of file diff --git a/sites/all/modules/custom_search/modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc b/sites/all/modules/custom_search/modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc index 456ac20f..a7a08612 100644 --- a/sites/all/modules/custom_search/modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc +++ b/sites/all/modules/custom_search/modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc @@ -1,5 +1,4 @@ t('Choose which selector type to use.'), '#default_value' => variable_get('custom_search_voc' . $voc->vid . '_selector', 'disabled'), ); + if (module_exists('hs_taxonomy')) $form[$voc->name]['custom_search_voc' . $voc->vid . '_selector']['#options']['hierarchical_select'] = t('Hierarchical selector'); + $form[$voc->name]['custom_search_voc' . $voc->vid . '_selector_depth'] = array( + '#type' => 'textfield', + '#title' => t('Depth'), + '#size' => 2, + '#default_value' => variable_get('custom_search_voc' . $voc->vid . '_selector_depth', 0), + '#description' => t('Define the maximum depth of terms being displayed. The default value is "0" which disables the limit.'), + ); $form[$voc->name]['custom_search_voc' . $voc->vid . '_selector_label_visibility'] = array( '#type' => 'checkbox', '#title' => t('Display label'), diff --git a/sites/all/modules/custom_search/modules/custom_search_taxonomy/custom_search_taxonomy.info b/sites/all/modules/custom_search/modules/custom_search_taxonomy/custom_search_taxonomy.info index 9f87cf4f..ef044b16 100644 --- a/sites/all/modules/custom_search/modules/custom_search_taxonomy/custom_search_taxonomy.info +++ b/sites/all/modules/custom_search/modules/custom_search_taxonomy/custom_search_taxonomy.info @@ -1,35 +1,12 @@ -; $Id: custom_search_taxonomy.info,v 1.1.2.5 2010/05/04 17:04:48 jdanthinne Exp $ name = Custom Search Taxonomy description = Adds taxonomy selectors to Custom Search. core = 6.x package = Custom Search dependencies[] = custom_search dependencies[] = taxonomy - -; Information added by drupal.org packaging script on 2010-04-30 -version = "6.x-1.x-dev" -core = "6.x" -project = "custom_search" -datestamp = "1272629076" - - -; Information added by drupal.org packaging script on 2010-05-02 -version = "6.x-1.x-dev" -core = "6.x" -project = "custom_search" -datestamp = "1272758640" - - -; Information added by drupal.org packaging script on 2010-05-03 -version = "6.x-1.x-dev" -core = "6.x" -project = "custom_search" -datestamp = "1272845023" - - -; Information added by drupal.org packaging script on 2010-06-07 -version = "6.x-1.4" +; Information added by Drupal.org packaging script on 2014-04-02 +version = "6.x-1.12" core = "6.x" project = "custom_search" -datestamp = "1275894013" +datestamp = "1396449571" diff --git a/sites/all/modules/custom_search/modules/custom_search_taxonomy/custom_search_taxonomy.install b/sites/all/modules/custom_search/modules/custom_search_taxonomy/custom_search_taxonomy.install index 4a357b4d..77930003 100644 --- a/sites/all/modules/custom_search/modules/custom_search_taxonomy/custom_search_taxonomy.install +++ b/sites/all/modules/custom_search/modules/custom_search_taxonomy/custom_search_taxonomy.install @@ -1,5 +1,4 @@ vid . '_selector'); + variable_del('custom_search_voc' . $voc->vid . '_selector_depth'); variable_del('custom_search_voc' . $voc->vid . '_selector_label_visibility'); variable_del('custom_search_voc' . $voc->vid . '_selector_label'); variable_del('custom_search_voc' . $voc->vid . '_selector_all'); variable_del('custom_search_taxonomy' . $voc->vid . '_weight'); + variable_del('custom_search_taxonomy' . $voc->vid . '_region'); if (module_exists('custom_search_blocks')) { $blocks = variable_get('custom_search_blocks_number', 1); for ($delta=1 ; $delta<=$blocks ; $delta++) { variable_del('custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector'); + variable_del('custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector_depth'); variable_del('custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector_label_visibility'); variable_del('custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector_label'); variable_del('custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector_all'); variable_del('custom_search_blocks_' . $delta . '_taxonomy' . $voc->vid . '_weight'); + variable_del('custom_search_blocks_' . $delta . '_taxonomy' . $voc->vid . '_region'); + variable_del('custom_search_blocks_' . $delta . '_paths_terms_separator'); } } } diff --git a/sites/all/modules/custom_search/modules/custom_search_taxonomy/custom_search_taxonomy.module b/sites/all/modules/custom_search/modules/custom_search_taxonomy/custom_search_taxonomy.module index dd199037..1bfae0c6 100644 --- a/sites/all/modules/custom_search/modules/custom_search_taxonomy/custom_search_taxonomy.module +++ b/sites/all/modules/custom_search/modules/custom_search_taxonomy/custom_search_taxonomy.module @@ -1,5 +1,4 @@ vid . '_display', TRUE)) unset($form['advanced']['category']['#options'][$voc->name]); - } - if (!count($form['advanced']['category']['#options'])) unset($form['advanced']['category']); - - break; + // Filter the form_id value to identify all the custom blocks + $form_id_processed = $form_id; + $delta = ''; + for ($a = 1 ; $a <= variable_get('custom_search_blocks_number', 1) ; $a++) { + if ($form_id == 'custom_search_blocks_form_' . $a) { + $form_id_processed = 'custom_search_blocks_form'; + $delta = 'blocks_' . $a . '_'; + } + } - case 'search_theme_form': - case 'search_block_form': - case 'custom_search_blocks_form': + switch ($form_id_processed) { - $delta = ($form_id == 'custom_search_blocks_form') ? 'blocks_' . $form['delta']['#value'] . '_' : ''; + case 'search_theme_form': + case 'search_block_form': + case 'custom_search_blocks_form': + if (user_access('use custom search')) { $vocabularies = taxonomy_get_vocabularies(); foreach ($vocabularies as $voc) { if (variable_get('custom_search_' . $delta . 'voc' . $voc->vid . '_selector', 'disabled') != 'disabled') { $options = array(); $options['c-all'] = variable_get('custom_search_' . $delta . 'voc' . $voc->vid . '_selector_all', CUSTOM_SEARCH_ALL_TEXT_DEFAULT); - $terms = taxonomy_get_tree($voc->vid); + $vocabulary_depth = (!variable_get('custom_search_' . $delta . 'voc' . $voc->vid . '_selector_depth', 0)) ? NULL : variable_get('custom_search_' . $delta . 'voc' . $voc->vid . '_selector_depth', 0); + $terms = taxonomy_get_tree($voc->vid, 0, -1, $vocabulary_depth); foreach ($terms as $term) { - $options['c-' . $term->tid] = (drupal_substr(variable_get('custom_search_' . $delta . 'voc' . $voc->vid . '_selector', 'disabled'), 0, 6) == 'select') ? str_repeat('- ', $term->depth) . $term->name : $term->name ; + $options['c-' . $term->tid] = (drupal_substr(variable_get('custom_search_' . $delta . 'voc' . $voc->vid . '_selector', 'disabled'), 0, 6) == 'select') ? str_repeat('-', $term->depth) . ' ' . $term->name : $term->name ; } $selector_type = variable_get('custom_search_' . $delta . 'voc' . $voc->vid . '_selector', 'select'); if ($selector_type == 'selectmultiple') { @@ -68,120 +66,176 @@ function custom_search_taxonomy_form_alter(&$form, $form_state, $form_id) { '#multiple' => $multiple, '#title' => variable_get('custom_search_' . $delta . 'voc' . $voc->vid . '_selector_label', $voc->name), '#options' => $options, - '#default_value' => ((variable_get('custom_search' . $delta . '_voc' . $voc->vid . '_selector', 'select') == 'checkboxes') ? array('c-all') : 'c-all'), - '#attributes' => array('class' => 'custom-search-selector custom-search-vocabulary'), + '#default_value' => ($selector_type == 'checkboxes') ? array('c-all') : 'c-all', + '#attributes' => ($selector_type != 'radios' && $selector_type != 'checkboxes') ? array('class' => 'custom-search-selector custom-search-vocabulary custom-search-vocabulary-' . $voc->vid) : array(), + '#prefix' => ($selector_type == 'radios' || $selector_type == 'checkboxes') ? '
' : '', + '#suffix' => ($selector_type == 'radios' || $selector_type == 'checkboxes') ? '
' : '', '#weight' => variable_get('custom_search_' . $delta . 'taxonomy' . $voc->vid . '_weight', 2), ); + + if ($selector_type == "hierarchical_select") { + $form['custom_search_vocabulary_' . $voc->vid]['#config'] = array ( + 'module' => 'hs_taxonomy', + 'params' => array('vid' => $voc->vid), + ); + unset($form['custom_search_vocabulary_' . $voc->vid]['#options']); + $form['#after_build'][] = 'hierarchical_select_after_build'; + } + + if (variable_get('custom_search_' . $delta . 'taxonomy' . $voc->vid . '_region', 'block') == 'popup') { + $form['popup']['custom_search_vocabulary_' . $voc->vid] = $form['custom_search_vocabulary_' . $voc->vid]; + unset($form['custom_search_vocabulary_' . $voc->vid]); + } if (!variable_get('custom_search_' . $delta . 'voc' . $voc->vid . '_selector_label_visibility', TRUE)) $form['custom_search_vocabulary_' . $voc->vid]['#post_render'] = array('_custom_search_hide_label'); } } - break; + // Custom paths + if (variable_get('custom_search_' . $delta . 'paths', '') != '') { + $form['custom_search_paths_terms_separator'] = array( + '#type' => 'hidden', + '#default_value' => variable_get('custom_search_' . $delta . 'paths_terms_separator', CUSTOM_SEARCH_PATHS_TERMS_SEPARATOR_DEFAULT), + ); + } + } + + break; - case 'block_admin_configure': - if ($form['module']['#value'] == 'custom_search_blocks') { + case 'block_admin_configure': + if (isset($form['module']) && $form['module']['#value'] == 'custom_search_blocks') { - $delta = $form['delta']['#value']; + $delta = $form['delta']['#value']; - $vocabularies = taxonomy_get_vocabularies(); - if (count($vocabularies)) { - $form['block_settings']['taxonomy'] = array( + $vocabularies = taxonomy_get_vocabularies(); + if (count($vocabularies)) { + $form['block_settings']['taxonomy'] = array( + '#type' => 'fieldset', + '#title' => t('Taxonomy'), + '#description' => t('Select the vocabularies to present as search options in the search block. If none is selected, no selector will be displayed.'), + '#collapsible' => TRUE, + ); + $w = 1; + $collapsed = TRUE; + foreach ($vocabularies as $voc) { + // Selectors + if (variable_get('custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector', 'disabled') != 'disabled') { + $collapsed = FALSE; + $voc_collapsed = FALSE; + } + else $voc_collapsed = TRUE; + $form['block_settings']['taxonomy'][$voc->name] = array( '#type' => 'fieldset', - '#title' => t('Taxonomy'), - '#description' => t('Select the vocabularies to present as search options in the search block. If none is selected, no selector will be displayed.'), + '#title' => $voc->name, '#collapsible' => TRUE, + '#collapsed' => $voc_collapsed, ); - $w = 1; - $collapsed = TRUE; - foreach ($vocabularies as $voc) { - // Selectors - if (variable_get('custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector', 'disabled') != 'disabled') { - $collapsed = FALSE; - $voc_collapsed = FALSE; - } - else $voc_collapsed = TRUE; - $form['block_settings']['taxonomy'][$voc->name] = array( - '#type' => 'fieldset', - '#title' => $voc->name, - '#collapsible' => TRUE, - '#collapsed' => $voc_collapsed, - ); - $form['block_settings']['taxonomy'][$voc->name]['custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector'] = array( - '#type' => 'select', - '#title' => t('Selector type'), - '#options' => array( - 'disabled' => t('Disabled'), - 'select' => t('Drop-down list'), - 'selectmultiple' => t('Drop-down list with multiple choices'), - 'radios' => t('Radio buttons'), - 'checkboxes' => t('Checkboxes'), - ), - '#description' => t('Choose which selector type to use.'), - '#default_value' => variable_get('custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector', 'disabled'), - ); - $form['block_settings']['taxonomy'][$voc->name]['custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector_label_visibility'] = array( - '#type' => 'checkbox', - '#title' => t('Display label'), - '#default_value' => variable_get('custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector_label_visibility', TRUE), - ); - $form['block_settings']['taxonomy'][$voc->name]['custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector_label'] = array( - '#type' => 'textfield', - '#title' => t('Label text'), - '#default_value' => variable_get('custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector_label', $voc->name), - '#description' => t('Enter the label text for the selector. The default value is "!default".', array('!default' => $voc->name)), - ); - $form['block_settings']['taxonomy'][$voc->name]['custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector_all'] = array( - '#type' => 'textfield', - '#title' => t('-Any- text'), - '#default_value' => variable_get('custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector_all', CUSTOM_SEARCH_ALL_TEXT_DEFAULT), - '#required' => TRUE, - '#description' => t('Enter the text for "any term" choice. The default value is "!default".', array('!default' => CUSTOM_SEARCH_ALL_TEXT_DEFAULT)), - ); - // Ordering - $form['block_settings']['order']['custom_search_blocks_order']['taxonomy' . $voc->vid] = array( - '#title' => t('Taxonomy') . ': ' . $voc->name, - 'sort' => array('#type' => 'weight', '#default_value' => variable_get('custom_search_blocks_' . $delta . '_taxonomy' . $voc->vid . '_weight', $w)), - '#weight' => variable_get('custom_search_blocks_' . $delta . '_taxonomy' . $voc->vid . '_weight', $w), - ); - $w++; - } - $form['block_settings']['taxonomy']['#collapsed'] = $collapsed; + $form['block_settings']['taxonomy'][$voc->name]['custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector'] = array( + '#type' => 'select', + '#title' => t('Selector type'), + '#options' => array( + 'disabled' => t('Disabled'), + 'select' => t('Drop-down list'), + 'selectmultiple' => t('Drop-down list with multiple choices'), + 'radios' => t('Radio buttons'), + 'checkboxes' => t('Checkboxes'), + ), + '#description' => t('Choose which selector type to use.'), + '#default_value' => variable_get('custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector', 'disabled'), + ); + $form['block_settings']['taxonomy'][$voc->name]['custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector_depth'] = array( + '#type' => 'textfield', + '#title' => t('Depth'), + '#size' => 2, + '#default_value' => variable_get('custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector_depth', 0), + '#description' => t('Define the maximum depth of terms being displayed. The default value is "0" which disables the limit.'), + ); + $form['block_settings']['taxonomy'][$voc->name]['custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector_label_visibility'] = array( + '#type' => 'checkbox', + '#title' => t('Display label'), + '#default_value' => variable_get('custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector_label_visibility', TRUE), + ); + $form['block_settings']['taxonomy'][$voc->name]['custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector_label'] = array( + '#type' => 'textfield', + '#title' => t('Label text'), + '#default_value' => variable_get('custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector_label', $voc->name), + '#description' => t('Enter the label text for the selector. The default value is "!default".', array('!default' => $voc->name)), + ); + $form['block_settings']['taxonomy'][$voc->name]['custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector_all'] = array( + '#type' => 'textfield', + '#title' => t('-Any- text'), + '#default_value' => variable_get('custom_search_blocks_' . $delta . '_voc' . $voc->vid . '_selector_all', CUSTOM_SEARCH_ALL_TEXT_DEFAULT), + '#required' => TRUE, + '#description' => t('Enter the text for "any term" choice. The default value is "!default".', array('!default' => CUSTOM_SEARCH_ALL_TEXT_DEFAULT)), + ); + // Ordering + $form['block_settings']['order']['custom_search_blocks_' . $delta . '_order']['taxonomy' . $voc->vid] = array( + '#title' => t('Taxonomy') . ': ' . $voc->name, + '#weight' => variable_get('custom_search_blocks_' . $delta . '_taxonomy' . $voc->vid . '_weight', $w), + ); + $form['block_settings']['order']['custom_search_blocks_' . $delta . '_order']['taxonomy' . $voc->vid]['sort'] = array( + '#type' => 'weight', + '#default_value' => variable_get('custom_search_blocks_' . $delta . '_taxonomy' . $voc->vid . '_weight', $w), + '#attributes' => array('class' => 'sort-select sort-select-' . variable_get('custom_search_blocks_' . $delta . '_taxonomy' . $voc->vid . '_region', 'block')), + ); + $form['block_settings']['order']['custom_search_blocks_' . $delta . '_order']['taxonomy' . $voc->vid]['region'] = array( + '#type' => 'select', + '#options' => array( + 'block' => t('Block'), + 'popup' => t('Popup') + ), + '#default_value' => variable_get('custom_search_blocks_' . $delta . '_taxonomy' . $voc->vid . '_region', 'block'), + '#attributes' => array('class' => 'region-select region-select-' . variable_get('custom_search_blocks_' . $delta . '_taxonomy' . $voc->vid . '_region', 'block')), + ); + $w++; } + $form['block_settings']['taxonomy']['#collapsed'] = $collapsed; } - break; + $form['block_settings']['custom_search_paths_admin']['custom_search_blocks_' . $delta . '_paths']['#description'] = t('If you want to use custom search paths, enter them here in the form path|label, one per line (if only one path is specified, the selector will be hidden). The [key] token will be replaced by what is entered in the search box, and the [terms] token will be replaced by the selected taxonomy term id(s). Ie: mysearch/[key]/[terms]|My custom search label.'); + $form['block_settings']['custom_search_paths_admin']['custom_search_blocks_' . $delta . '_paths_terms_separator'] = array( + '#type' => 'textfield', + '#title' => t('Taxonomy terms separator'), + '#default_value' => variable_get('custom_search_blocks_' . $delta . '_paths_terms_separator', CUSTOM_SEARCH_PATHS_TERMS_SEPARATOR_DEFAULT), + '#size' => 2 + ); - case 'custom_search_admin': - $vocabularies = taxonomy_get_vocabularies(); - $w = 1; - foreach ($vocabularies as $voc) { - $form['order']['custom_search_order']['taxonomy' . $voc->vid] = array( - '#title' => t('Taxonomy') . ': ' . $voc->name, - 'sort' => array('#type' => 'weight', '#default_value' => variable_get('custom_search_taxonomy' . $voc->vid . '_weight', $w)), - '#weight' => variable_get('custom_search_taxonomy' . $voc->vid . '_weight', $w), - ); - $w++; - } - break; - - case 'custom_search_results_admin': - $form['search_form']['advanced']['taxonomy'] = array( - '#type' => 'fieldset', - '#title' => t('Taxonomy'), - '#description' => t('Select the vocabularies to display on the advanced search form.'), - '#collapsible' => TRUE, - '#collapsed' => TRUE, + } + + break; + + case 'custom_search_admin': + $vocabularies = taxonomy_get_vocabularies(); + $w = 1; + foreach ($vocabularies as $voc) { + $form['order']['custom_search_order']['taxonomy' . $voc->vid] = array( + '#title' => t('Taxonomy') . ': ' . $voc->name, + '#weight' => variable_get('custom_search_taxonomy' . $voc->vid . '_weight', $w), ); - $vocabularies = taxonomy_get_vocabularies(); - foreach ($vocabularies as $voc) { - $form['search_form']['advanced']['taxonomy']['custom_search_advanced_voc' . $voc->vid . '_display'] = array( - '#type' => 'checkbox', - '#title' => $voc->name, - '#default_value' => variable_get('custom_search_advanced_voc' . $voc->vid . '_display', TRUE), - ); - } - break; + $form['order']['custom_search_order']['taxonomy' . $voc->vid]['sort'] = array( + '#type' => 'weight', + '#default_value' => variable_get('custom_search_taxonomy' . $voc->vid . '_weight', $w), + '#attributes' => array('class' => 'sort-select sort-select-' . variable_get('custom_search_taxonomy' . $voc->vid . '_region', 'block')), + ); + $form['order']['custom_search_order']['taxonomy' . $voc->vid]['region'] = array( + '#type' => 'select', + '#options' => array( + 'block' => t('Block'), + 'popup' => t('Popup') + ), + '#default_value' => variable_get('custom_search_taxonomy' . $voc->vid . '_region', 'block'), + '#attributes' => array('class' => 'region-select region-select-' . variable_get('custom_search_taxonomy' . $voc->vid . '_region', 'block')), + ); + $w++; + } + $form['custom_search_paths_admin']['custom_search_paths']['#description'] = t('If you want to use custom search paths, enter them here in the form path|label, one per line (if only one path is specified, the selector will be hidden). The [key] token will be replaced by what is entered in the search box, and the [terms] token will be replaced by the selected taxonomy term id(s). Ie: mysearch/[key]/[terms]|My custom search label.'); + $form['custom_search_paths_admin']['custom_search_paths_terms_separator'] = array( + '#type' => 'textfield', + '#title' => t('Taxonomy terms separator'), + '#default_value' => variable_get('custom_search_paths_terms_separator', CUSTOM_SEARCH_PATHS_TERMS_SEPARATOR_DEFAULT), + '#size' => 2 + ); + break; - } } + } \ No newline at end of file diff --git a/sites/all/modules/custom_search/theme/custom_search-result.tpl.php b/sites/all/modules/custom_search/theme/custom_search-result.tpl.php new file mode 100644 index 00000000..a3c24446 --- /dev/null +++ b/sites/all/modules/custom_search/theme/custom_search-result.tpl.php @@ -0,0 +1,58 @@ + + * + * + * + * + * + * To check for all available data within $info_split, use the code below. + * + * '. check_plain(print_r($info_split, 1)) .''; ?> + * + * @see template_preprocess_custom_search_result() + */ +?> +
+ +
+
+ +

+ + +

+ +
diff --git a/sites/all/modules/custom_search/theme/custom_search-results.tpl.php b/sites/all/modules/custom_search/theme/custom_search-results.tpl.php new file mode 100644 index 00000000..dbac37fe --- /dev/null +++ b/sites/all/modules/custom_search/theme/custom_search-results.tpl.php @@ -0,0 +1,37 @@ + + +
+ +
+ +
+ +
+ +
+ +
+ + \ No newline at end of file diff --git a/sites/all/modules/custom_search/theme/custom_search-sort-form.tpl.php b/sites/all/modules/custom_search/theme/custom_search-sort-form.tpl.php new file mode 100644 index 00000000..a82ef9ee --- /dev/null +++ b/sites/all/modules/custom_search/theme/custom_search-sort-form.tpl.php @@ -0,0 +1,52 @@ + array('title' => t('Block'), 'count' => 0), + 'popup' => array('title' => t('Popup'), 'count' => 0), + ); + foreach (element_children($form) as $element) $element_regions[$form[$element]['region']['#value']]['count']++; + + // Add table javascript. + drupal_add_js('misc/tableheader.js'); + drupal_add_js(drupal_get_path('module', 'custom_search') .'/js/custom_search_sort.js'); + foreach ($element_regions as $region => $title) { + drupal_add_tabledrag('elements', 'match', 'sibling', 'region-select', 'region-select-'. $region, NULL, FALSE); + drupal_add_tabledrag('elements', 'order', 'sibling', 'sort-select', 'sort-select-'. $region); + } +?> + + + + + + + + + + + $region_data): ?> + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/sites/all/modules/custom_search/theme/custom_search.pages.inc b/sites/all/modules/custom_search/theme/custom_search.pages.inc new file mode 100644 index 00000000..a1a6b1f6 --- /dev/null +++ b/sites/all/modules/custom_search/theme/custom_search.pages.inc @@ -0,0 +1,68 @@ +type == $node_type['type']) $nbresults++; + } + if ($nbresults) $items[] = l($node_type['name'], 'search/node/' . $keys . ' type:' . $node_type['type']); + } + if (!isset($variables['filter-title'])) { + $variables['filter-title'] = filter_xss(variable_get('custom_search_filter_label', CUSTOM_SEARCH_FILTER_LABEL_DEFAULT)); + } + if (count($items) > 2) $variables['filter'] = theme('item_list', $items, $variables['filter-title']); + } + } +} + +/* + * Customisation of the results info. + */ +function custom_search_preprocess_search_result(&$variables) { + // used to identify the correct info string + $comment_str = preg_replace("/[0-9] (\b[a-z]*\b).*/", "$1", t('1 comment')); + $attachment_str = preg_replace("/@*[a-z0-9]* (\b[a-z]*\b).*/", "$1", t('1 attachment')); + + $infos = array(); + if (isset($variables['info_split'])) { + foreach ($variables['info_split'] as $key => $info) { + if (!is_numeric($key)) { + if (variable_get('custom_search_results_info_' . $key, TRUE)) array_push($infos, $info); + } + else { + if (variable_get('custom_search_results_info_comment', TRUE) && !empty($comment_str) && strpos($info, $comment_str) !== FALSE) array_push($infos, $info); + if (variable_get('custom_search_results_info_upload', TRUE) && !empty($attachment_str) && strpos($info, $attachment_str) !== FALSE) array_push($infos, $info); + } + } + } + $variables['info'] = implode(' - ', $infos); +} \ No newline at end of file diff --git a/sites/all/modules/custom_search/translations/custom_search.pot b/sites/all/modules/custom_search/translations/custom_search.pot deleted file mode 100644 index 604c2d25..00000000 --- a/sites/all/modules/custom_search/translations/custom_search.pot +++ /dev/null @@ -1,451 +0,0 @@ -# $Id: custom_search.pot,v 1.1.2.13 2010/05/31 13:54:05 jdanthinne Exp $ -# -# LANGUAGE translation of Drupal (general) -# Copyright YEAR NAME -# Generated from files: -# custom_search.admin.inc,v 1.1.2.15 2010/05/25 12:01:15 jdanthinne -# custom_search_blocks.module,v 1.1.2.7 2010/05/25 12:01:15 jdanthinne -# custom_search.module,v 1.1.2.44 2010/05/25 13:07:14 jdanthinne -# custom_search_taxonomy.admin.inc,v 1.1.2.1 2010/04/29 21:12:09 jdanthinne -# custom_search_taxonomy.module,v 1.1.2.5 2010/05/04 17:04:48 jdanthinne -# custom_search.info,v 1.1.2.9 2010/05/04 17:04:48 jdanthinne -# custom_search_blocks.info,v 1.1.2.6 2010/05/04 17:04:48 jdanthinne -# custom_search_i18n.module,v 1.1.2.5 2010/05/11 09:31:44 jdanthinne -# custom_search_i18n.info,v 1.1.2.2 2010/05/04 17:04:48 jdanthinne -# custom_search_taxonomy.info,v 1.1.2.5 2010/05/04 17:04:48 jdanthinne -# custom_search.install,v 1.1.2.6 2010/05/25 12:01:15 jdanthinne -# custom_search_blocks.admin.inc,v 1.1.2.3 2010/05/02 14:55:31 jdanthinne -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2010-05-31 15:45+0200\n" -"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n" -"Last-Translator: NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" - -#: custom_search.admin.inc:15 modules/custom_search_blocks/custom_search_blocks.module:56 -msgid "Select the search types to present as search options in the search block. If none is selected, no selector will be displayed. Note: if there's only one type checked, the selector won't be displayed BUT only this type will be searched." -msgstr "" - -#: custom_search.admin.inc:34 -msgid "Search box" -msgstr "" - -#: custom_search.admin.inc:38 custom_search.module:420 modules/custom_search_blocks/custom_search_blocks.module:43 modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:47 modules/custom_search_taxonomy/custom_search_taxonomy.module:124 -msgid "Display label" -msgstr "" - -#: custom_search.admin.inc:43 -msgid "Search box label" -msgstr "" - -#: custom_search.admin.inc:45 modules/custom_search_blocks/custom_search_blocks.module:50 -msgid "Enter the label text for the search box. The default value is \"!default\"." -msgstr "" - -#: custom_search.admin.inc:49 -msgid "Search box default text" -msgstr "" - -#: custom_search.admin.inc:51 -msgid "This will change the default text inside the search form. Leave blank for no text. This field is blank by default." -msgstr "" - -#: custom_search.admin.inc:57;179 modules/custom_search_blocks/custom_search_blocks.module:95 -msgid "Submit button" -msgstr "" - -#: custom_search.admin.inc:61 -msgid "Submit button text" -msgstr "" - -#: custom_search.admin.inc:63 -msgid "Enter the text for the submit button. Leave blank to hide it. The default value is \"!default\"." -msgstr "" - -#: custom_search.admin.inc:67 -msgid "Submit image path" -msgstr "" - -#: custom_search.admin.inc:68 -msgid "The path to the file you would like to use as submit button instead of the default text button." -msgstr "" - -#: custom_search.admin.inc:73 -msgid "Submit image" -msgstr "" - -#: custom_search.admin.inc:74 -msgid "If you don't have direct file access to the server, use this field to upload your image." -msgstr "" - -#: custom_search.admin.inc:80 -msgid "Advanced search criteria" -msgstr "" - -#: custom_search.admin.inc:84;252 -msgid "Or" -msgstr "" - -#: custom_search.admin.inc:90;107;124 -msgid "Display" -msgstr "" - -#: custom_search.admin.inc:95;112;129 -msgid "Label" -msgstr "" - -#: custom_search.admin.inc:97;114;131 -msgid "Enter the label text for this field. The default value is \"!default\"." -msgstr "" - -#: custom_search.admin.inc:101;257 -msgid "Phrase" -msgstr "" - -#: custom_search.admin.inc:118;262 -msgid "Negative" -msgstr "" - -#: custom_search.admin.inc:140 modules/custom_search_blocks/custom_search_blocks.module:72 -msgid "Elements ordering" -msgstr "" - -#: custom_search.admin.inc:147 modules/custom_search_blocks/custom_search_blocks.module:80 -msgid "Search Box" -msgstr "" - -#: custom_search.admin.inc:153 modules/custom_search_blocks/custom_search_blocks.module:85 -msgid "Content Types" -msgstr "" - -#: custom_search.admin.inc:159 -msgid "Advanced search criterion: Or" -msgstr "" - -#: custom_search.admin.inc:164 -msgid "Advanced search criterion: Phrase" -msgstr "" - -#: custom_search.admin.inc:169 -msgid "Advanced search criterion: Negative" -msgstr "" - -#: custom_search.admin.inc:174 custom_search.module:452 modules/custom_search_blocks/custom_search_blocks.module:64;90 -msgid "Custom search paths" -msgstr "" - -#: custom_search.admin.inc:203 modules/custom_search_blocks/custom_search_blocks.module:137 -msgid "Elements" -msgstr "" - -#: custom_search.admin.inc:225 -msgid "Search forms" -msgstr "" - -#: custom_search.admin.inc:229 -msgid "Display basic search" -msgstr "" - -#: custom_search.admin.inc:234 -msgid "Advanced search" -msgstr "" - -#: custom_search.admin.inc:240 -msgid "Display advanced search" -msgstr "" - -#: custom_search.admin.inc:245 -msgid "Criteria" -msgstr "" - -#: custom_search.admin.inc:246 -msgid "Select the criteria to display on the advanced search form." -msgstr "" - -#: custom_search.admin.inc:267 custom_search.module:387 -msgid "Content types" -msgstr "" - -#: custom_search.admin.inc:268 -msgid "Select the content types to display on the advanced search form." -msgstr "" - -#: custom_search.admin.inc:283 -msgid "Results" -msgstr "" - -#: custom_search.admin.inc:284 -msgid "Select data to display below each result." -msgstr "" - -#: custom_search.admin.inc:288 -msgid "Content type" -msgstr "" - -#: custom_search.admin.inc:293 -msgid "User" -msgstr "" - -#: custom_search.admin.inc:298 -msgid "Date" -msgstr "" - -#: custom_search.admin.inc:304 -msgid "Comments" -msgstr "" - -#: custom_search.admin.inc:311 -msgid "Uploads" -msgstr "" - -#: custom_search.admin.inc:318 -msgid "Filter" -msgstr "" - -#: custom_search.admin.inc:319 -msgid "Add links to filter the results by content type." -msgstr "" - -#: custom_search.admin.inc:323 -msgid "Position" -msgstr "" - -#: custom_search.admin.inc:325 modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:36 modules/custom_search_taxonomy/custom_search_taxonomy.module:113 -msgid "Disabled" -msgstr "" - -#: custom_search.admin.inc:326 -msgid "Above results" -msgstr "" - -#: custom_search.admin.inc:327 -msgid "Below results" -msgstr "" - -#: custom_search.admin.inc:333 custom_search.module:425 modules/custom_search_blocks/custom_search_blocks.module:48 modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:52 modules/custom_search_taxonomy/custom_search_taxonomy.module:129 -msgid "Label text" -msgstr "" - -#: custom_search.admin.inc:335 -msgid "Enter the label text for the list. The default value is \"!default\"." -msgstr "" - -#: custom_search.module:11 -msgid "Search this site" -msgstr "" - -#: custom_search.module:12 modules/custom_search_blocks/custom_search_blocks.module:165 -msgid "Search" -msgstr "" - -#: custom_search.module:13 -msgid "Search for" -msgstr "" - -#: custom_search.module:14 -msgid "-Any-" -msgstr "" - -#: custom_search.module:15 -msgid "Containing any of the words" -msgstr "" - -#: custom_search.module:16 -msgid "Containing the phrase" -msgstr "" - -#: custom_search.module:17 -msgid "Containing none of the words" -msgstr "" - -#: custom_search.module:18 -msgid "Filter the results" -msgstr "" - -#: custom_search.module:401 -msgid "Other searches" -msgstr "" - -#: custom_search.module:408 modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:34 modules/custom_search_taxonomy/custom_search_taxonomy.module:111 -msgid "Selector type" -msgstr "" - -#: custom_search.module:410 modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:37 modules/custom_search_taxonomy/custom_search_taxonomy.module:114 -msgid "Drop-down list" -msgstr "" - -#: custom_search.module:411 modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:38 modules/custom_search_taxonomy/custom_search_taxonomy.module:115 -msgid "Drop-down list with multiple choices" -msgstr "" - -#: custom_search.module:412 modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:39 modules/custom_search_taxonomy/custom_search_taxonomy.module:116 -msgid "Radio buttons" -msgstr "" - -#: custom_search.module:413 modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:40 modules/custom_search_taxonomy/custom_search_taxonomy.module:117 -msgid "Checkboxes" -msgstr "" - -#: custom_search.module:415 -msgid "Choose which selector type to use. Note: content types and other searches cannot be combined in a single search." -msgstr "" - -#: custom_search.module:427 modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:54 modules/custom_search_taxonomy/custom_search_taxonomy.module:131 -msgid "Enter the label text for the selector. The default value is \"!default\"." -msgstr "" - -#: custom_search.module:431 -msgid "-Any content type- text" -msgstr "" - -#: custom_search.module:434 -msgid "Enter the text for \"any content type\" choice. The default value is \"!default\"." -msgstr "" - -#: custom_search.module:438 -msgid "Choosing -Any- restricts the search to the selected content types." -msgstr "" - -#: custom_search.module:440 -msgid "If not checked, choosing -Any- will search in all content types." -msgstr "" - -#: custom_search.module:454 -msgid "If you want to use a custom search paths, enter them here in the form path|label, one per line. The [key] token will be replaced by what is entered in the search box. Ie: mysearch/[key]|My custom search label. If only one path is specified, the selector will be hidden." -msgstr "" - -#: custom_search.module:64 -msgid "administer custom search" -msgstr "" - -#: custom_search.module:64 -msgid "use custom search" -msgstr "" - -#: custom_search.module:25 custom_search.info:0;0 modules/custom_search_blocks/custom_search_blocks.info:0 modules/custom_search_i18n/custom_search_i18n.module:133 modules/custom_search_i18n/custom_search_i18n.info:0 modules/custom_search_taxonomy/custom_search_taxonomy.info:0 -msgid "Custom Search" -msgstr "" - -#: custom_search.module:26 custom_search.info:0 -msgid "Customize the default search, change labels, default texts, ordering, and display content types and taxonomy selectors." -msgstr "" - -#: custom_search.module:33 -msgid "Settings" -msgstr "" - -#: custom_search.module:34 -msgid "Change the labels, the default texts and the ordering of elements." -msgstr "" - -#: custom_search.module:40 modules/custom_search_blocks/custom_search_blocks.module:55 -msgid "Content" -msgstr "" - -#: custom_search.module:41 -msgid "Select the content types to present as search options in the search block." -msgstr "" - -#: custom_search.module:49 -msgid "Results page" -msgstr "" - -#: custom_search.module:50 -msgid "Customize the search results page." -msgstr "" - -#: custom_search.install:21 -msgid "Custom Search enabled. Don't forget to set permissions." -msgstr "" - -#: custom_search.install:35 -msgid "Custom Search has been divided in multiple modules. Please re-enable the sub-modules you need." -msgstr "" - -#: modules/custom_search_blocks/custom_search_blocks.admin.inc:15 -msgid "If you want additional blocks by content type, enable them here. Then go to the block page to place them in a region." -msgstr "" - -#: modules/custom_search_blocks/custom_search_blocks.admin.inc:24 -msgid "Number of blocks" -msgstr "" - -#: modules/custom_search_blocks/custom_search_blocks.module:160 -msgid "Enter the terms you wish to search for." -msgstr "" - -#: modules/custom_search_blocks/custom_search_blocks.module:31 -msgid "administer custom search blocks" -msgstr "" - -#: modules/custom_search_blocks/custom_search_blocks.module:31 -msgid "use custom search blocks" -msgstr "" - -#: modules/custom_search_blocks/custom_search_blocks.module:16 -msgid "Search Blocks" -msgstr "" - -#: modules/custom_search_blocks/custom_search_blocks.module:17 -msgid "Provide additional search blocks by content type." -msgstr "" - -#: modules/custom_search_blocks/custom_search_blocks.info:0 -msgid "Custom Search Blocks" -msgstr "" - -#: modules/custom_search_blocks/custom_search_blocks.info:0 -msgid "Provides additional search blocks." -msgstr "" - -#: modules/custom_search_i18n/custom_search_i18n.info:0 -msgid "Custom Search Internationalization" -msgstr "" - -#: modules/custom_search_i18n/custom_search_i18n.info:0 -msgid "Provides Internationalization to Custom Search." -msgstr "" - -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:15 modules/custom_search_taxonomy/custom_search_taxonomy.module:91 -msgid "Select the vocabularies to present as search options in the search block. If none is selected, no selector will be displayed." -msgstr "" - -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:42 modules/custom_search_taxonomy/custom_search_taxonomy.module:119 -msgid "Choose which selector type to use." -msgstr "" - -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:58 modules/custom_search_taxonomy/custom_search_taxonomy.module:135 -msgid "-Any- text" -msgstr "" - -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:61 modules/custom_search_taxonomy/custom_search_taxonomy.module:138 -msgid "Enter the text for \"any term\" choice. The default value is \"!default\"." -msgstr "" - -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:90;142;159;170;16 -msgid "Taxonomy" -msgstr "" - -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:171 -msgid "Select the vocabularies to display on the advanced search form." -msgstr "" - -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:17 -msgid "Select the vocabularies to present as search options in the search block." -msgstr "" - -#: modules/custom_search_taxonomy/custom_search_taxonomy.info:0 -msgid "Custom Search Taxonomy" -msgstr "" - -#: modules/custom_search_taxonomy/custom_search_taxonomy.info:0 -msgid "Adds taxonomy selectors to Custom Search." -msgstr "" - diff --git a/sites/all/modules/custom_search/translations/fr.po b/sites/all/modules/custom_search/translations/fr.po deleted file mode 100644 index 9e052dd3..00000000 --- a/sites/all/modules/custom_search/translations/fr.po +++ /dev/null @@ -1,494 +0,0 @@ -# $Id: fr.po,v 1.1.2.14 2010/05/31 13:54:05 jdanthinne Exp $ -# -# French translation of Drupal (general) -# Copyright YEAR NAME -# Generated from files: -# custom_search.admin.inc,v 1.1.2.15 2010/05/25 12:01:15 jdanthinne -# custom_search_blocks.module,v 1.1.2.7 2010/05/25 12:01:15 jdanthinne -# custom_search.module,v 1.1.2.44 2010/05/25 13:07:14 jdanthinne -# custom_search_taxonomy.admin.inc,v 1.1.2.1 2010/04/29 21:12:09 jdanthinne -# custom_search_taxonomy.module,v 1.1.2.5 2010/05/04 17:04:48 jdanthinne -# custom_search.info,v 1.1.2.9 2010/05/04 17:04:48 jdanthinne -# custom_search_blocks.info,v 1.1.2.6 2010/05/04 17:04:48 jdanthinne -# custom_search_i18n.module,v 1.1.2.5 2010/05/11 09:31:44 jdanthinne -# custom_search_i18n.info,v 1.1.2.2 2010/05/04 17:04:48 jdanthinne -# custom_search_taxonomy.info,v 1.1.2.5 2010/05/04 17:04:48 jdanthinne -# custom_search.install,v 1.1.2.6 2010/05/25 12:01:15 jdanthinne -# custom_search_blocks.admin.inc,v 1.1.2.3 2010/05/02 14:55:31 jdanthinne -# -msgid "" -msgstr "" -"Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2010-05-31 15:45+0200\n" -"PO-Revision-Date: 2010-05-31 15:48+0100\n" -"Last-Translator: Jérôme Danthinne \n" -"Language-Team: French \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n>1);\n" - -#: custom_search.admin.inc:15 -#: modules/custom_search_blocks/custom_search_blocks.module:56 -msgid "Select the search types to present as search options in the search block. If none is selected, no selector will be displayed. Note: if there's only one type checked, the selector won't be displayed BUT only this type will be searched." -msgstr "Sélectionnez les types de recherche à afficher comme options de recherche. Si aucun n'est sélectionné, aucun sélecteur ne sera affiché. Note: s'il n'y a qu'un type sélectionné, le sélecteur ne sera pas affiché MAIS la recherche ne portera que sur ce type." - -#: custom_search.admin.inc:34 -msgid "Search box" -msgstr "Champ de recherche" - -#: custom_search.admin.inc:38 -#: custom_search.module:420 -#: modules/custom_search_blocks/custom_search_blocks.module:43 -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:47 -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:124 -msgid "Display label" -msgstr "Afficher le libellé" - -#: custom_search.admin.inc:43 -msgid "Search box label" -msgstr "Libellé du champ de recherche" - -#: custom_search.admin.inc:45 -#: modules/custom_search_blocks/custom_search_blocks.module:50 -msgid "Enter the label text for the search box. The default value is \"!default\"." -msgstr "Entrez le libellé du champ de recherche. La valeur par défaut est \"!default\"." - -#: custom_search.admin.inc:49 -msgid "Search box default text" -msgstr "Texte par défaut du champ de recherche" - -#: custom_search.admin.inc:51 -msgid "This will change the default text inside the search form. Leave blank for no text. This field is blank by default." -msgstr "Ceci changera le texte par défaut dans le champ de recherche. Laissez blanc pour ne rien afficher (par défaut)." - -#: custom_search.admin.inc:57;179 -#: modules/custom_search_blocks/custom_search_blocks.module:95 -msgid "Submit button" -msgstr "Bouton de recherche" - -#: custom_search.admin.inc:61 -msgid "Submit button text" -msgstr "Texte du bouton de recherche" - -#: custom_search.admin.inc:63 -msgid "Enter the text for the submit button. Leave blank to hide it. The default value is \"!default\"." -msgstr "Entrez le texte pour le bouton de soumission. Laissez vide pour le cacher. La valeur par défaut est \"!default\"." - -#: custom_search.admin.inc:67 -msgid "Submit image path" -msgstr "Chemin de l'image du bouton de recherche" - -#: custom_search.admin.inc:68 -msgid "The path to the file you would like to use as submit button instead of the default text button." -msgstr "Le chemin de l'image que vous désirez utiliser comme bouton de recherche à la place du texte par défaut." - -#: custom_search.admin.inc:73 -msgid "Submit image" -msgstr "Image du bouton de recherche" - -#: custom_search.admin.inc:74 -msgid "If you don't have direct file access to the server, use this field to upload your image." -msgstr "Si vous n'avez pas d'accès direct aux fichiers du serveur, utilisez ce champs pour transférer votre image." - -#: custom_search.admin.inc:80 -msgid "Advanced search criteria" -msgstr "Critères de recherche avancée" - -#: custom_search.admin.inc:84;252 -msgid "Or" -msgstr "Un des mots" - -#: custom_search.admin.inc:90;107;124 -msgid "Display" -msgstr "Afficher" - -#: custom_search.admin.inc:95;112;129 -msgid "Label" -msgstr "Étiquette" - -#: custom_search.admin.inc:97;114;131 -msgid "Enter the label text for this field. The default value is \"!default\"." -msgstr "Entrez le libellé pour ce champs. La valeur par défaut est \"!default\"." - -#: custom_search.admin.inc:101;257 -msgid "Phrase" -msgstr "Expression entière" - -#: custom_search.admin.inc:118;262 -msgid "Negative" -msgstr "Pas les mots" - -#: custom_search.admin.inc:140 -#: modules/custom_search_blocks/custom_search_blocks.module:72 -msgid "Elements ordering" -msgstr "Ordre des éléments" - -#: custom_search.admin.inc:147 -#: modules/custom_search_blocks/custom_search_blocks.module:80 -msgid "Search Box" -msgstr "Champs de recherche" - -#: custom_search.admin.inc:153 -#: modules/custom_search_blocks/custom_search_blocks.module:85 -msgid "Content Types" -msgstr "Types de contenu" - -#: custom_search.admin.inc:159 -msgid "Advanced search criterion: Or" -msgstr "Critère de recherche avancée: un des mots" - -#: custom_search.admin.inc:164 -msgid "Advanced search criterion: Phrase" -msgstr "Critère de recherche avancée: expression entière" - -#: custom_search.admin.inc:169 -msgid "Advanced search criterion: Negative" -msgstr "Critère de recherche avancée: pas les mots" - -#: custom_search.admin.inc:174 -#: custom_search.module:452 -#: modules/custom_search_blocks/custom_search_blocks.module:64;90 -msgid "Custom search paths" -msgstr "Chemins de recherche personnalisés" - -#: custom_search.admin.inc:203 -#: modules/custom_search_blocks/custom_search_blocks.module:137 -msgid "Elements" -msgstr "Eléments" - -#: custom_search.admin.inc:225 -msgid "Search forms" -msgstr "Formulaires de recherche" - -#: custom_search.admin.inc:229 -msgid "Display basic search" -msgstr "Afficher la recherche basique" - -#: custom_search.admin.inc:234 -msgid "Advanced search" -msgstr "Recherche avancée" - -#: custom_search.admin.inc:240 -msgid "Display advanced search" -msgstr "Afficher la recherche avancée" - -#: custom_search.admin.inc:245 -msgid "Criteria" -msgstr "Critères" - -#: custom_search.admin.inc:246 -msgid "Select the criteria to display on the advanced search form." -msgstr "Sélectionnez les critères à afficher dans le formulaire de recherche avancée." - -#: custom_search.admin.inc:267 -#: custom_search.module:387 -msgid "Content types" -msgstr "Types de contenu" - -#: custom_search.admin.inc:268 -msgid "Select the content types to display on the advanced search form." -msgstr "Sélectionnez les types de contenu à afficher dans le formulaire de recherche avancée." - -#: custom_search.admin.inc:283 -msgid "Results" -msgstr "Résultats" - -#: custom_search.admin.inc:284 -msgid "Select data to display below each result." -msgstr "Sélectionnez les données à afficher sous chaque résultat." - -#: custom_search.admin.inc:288 -msgid "Content type" -msgstr "Type de contenu" - -#: custom_search.admin.inc:293 -msgid "User" -msgstr "Utilisateur" - -#: custom_search.admin.inc:298 -msgid "Date" -msgstr "Date" - -#: custom_search.admin.inc:304 -msgid "Comments" -msgstr "Commentaires" - -#: custom_search.admin.inc:311 -msgid "Uploads" -msgstr "Fichiers" - -#: custom_search.admin.inc:318 -msgid "Filter" -msgstr "Filtre" - -#: custom_search.admin.inc:319 -msgid "Add links to filter the results by content type." -msgstr "Ajouter des liens pour filtrer les résultats par type de contenu." - -#: custom_search.admin.inc:323 -msgid "Position" -msgstr "Position" - -#: custom_search.admin.inc:325 -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:36 -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:113 -msgid "Disabled" -msgstr "Désactivé" - -#: custom_search.admin.inc:326 -msgid "Above results" -msgstr "Au-dessus des résultats" - -#: custom_search.admin.inc:327 -msgid "Below results" -msgstr "En-dessous des résultats" - -#: custom_search.admin.inc:333 -#: custom_search.module:425 -#: modules/custom_search_blocks/custom_search_blocks.module:48 -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:52 -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:129 -msgid "Label text" -msgstr "Libellé" - -#: custom_search.admin.inc:335 -msgid "Enter the label text for the list. The default value is \"!default\"." -msgstr "Entrez le libellé pour la liste. La valeur par défault est \"!default\"." - -#: custom_search.module:11 -msgid "Search this site" -msgstr "Chercher dans ce site" - -#: custom_search.module:12 -#: modules/custom_search_blocks/custom_search_blocks.module:165 -msgid "Search" -msgstr "Recherche" - -#: custom_search.module:13 -msgid "Search for" -msgstr "Rechercher dans" - -#: custom_search.module:14 -msgid "-Any-" -msgstr "-Tout-" - -#: custom_search.module:15 -msgid "Containing any of the words" -msgstr "Contenant l'un des mots" - -#: custom_search.module:16 -msgid "Containing the phrase" -msgstr "Contenant l'expression entière" - -#: custom_search.module:17 -msgid "Containing none of the words" -msgstr "Ne contenant pas les mots" - -#: custom_search.module:18 -msgid "Filter the results" -msgstr "Filtrer les résultats" - -#: custom_search.module:401 -msgid "Other searches" -msgstr "Autres type de recherches" - -#: custom_search.module:408 -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:34 -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:111 -msgid "Selector type" -msgstr "Type de sélecteur" - -#: custom_search.module:410 -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:37 -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:114 -msgid "Drop-down list" -msgstr "Liste déroulante" - -#: custom_search.module:411 -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:38 -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:115 -msgid "Drop-down list with multiple choices" -msgstr "Liste à choix multiple" - -#: custom_search.module:412 -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:39 -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:116 -msgid "Radio buttons" -msgstr "Boutons radio" - -#: custom_search.module:413 -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:40 -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:117 -msgid "Checkboxes" -msgstr "Cases à cocher" - -#: custom_search.module:415 -msgid "Choose which selector type to use. Note: content types and other searches cannot be combined in a single search." -msgstr "Choisissez le sélecteur à utiliser. Note: les types de contenu et les autres types de recherche ne peuvent être combinés en une seule recherche." - -#: custom_search.module:427 -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:54 -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:131 -msgid "Enter the label text for the selector. The default value is \"!default\"." -msgstr "Entrez le libellé pour le sélecteur. La valeur par défaut est \"!default\"." - -#: custom_search.module:431 -msgid "-Any content type- text" -msgstr "Texte pour -Tout-" - -#: custom_search.module:434 -msgid "Enter the text for \"any content type\" choice. The default value is \"!default\"." -msgstr "Entrez le texte pour le choix \"n'importe quel type de contenu\". La valeur par défaut est \"!default\"." - -#: custom_search.module:438 -msgid "Choosing -Any- restricts the search to the selected content types." -msgstr "Le choix -Any- limite la recherche aux types de contenu sélectionnés." - -#: custom_search.module:440 -msgid "If not checked, choosing -Any- will search in all content types." -msgstr "Si pas coché, le choix -Any- lancera la recherche dans tous les types de contenu." - -#: custom_search.module:454 -msgid "If you want to use a custom search paths, enter them here in the form path|label, one per line. The [key] token will be replaced by what is entered in the search box. Ie: mysearch/[key]|My custom search label. If only one path is specified, the selector will be hidden." -msgstr "Si vous désirez utilisez des chemins de recherches personnalisés, entrez ici dans la forme chemin|Etiquette, un par ligne. Le jeton [key] sera remplacé par ce qui a été entré dans le champs de recherche. Par ex: marecherche/[key]|Ma recherche. Si un seul chemin est spécifié, le sélecteur sera caché." - -#: custom_search.module:64 -msgid "administer custom search" -msgstr "administrer la recherche personnalisée" - -#: custom_search.module:64 -msgid "use custom search" -msgstr "utiliser la recherche personnalisée" - -#: custom_search.module:25 -#: custom_search.info:0;0 -#: modules/custom_search_blocks/custom_search_blocks.info:0 -#: modules/custom_search_i18n/custom_search_i18n.module:133 -#: modules/custom_search_i18n/custom_search_i18n.info:0 -#: modules/custom_search_taxonomy/custom_search_taxonomy.info:0 -msgid "Custom Search" -msgstr "Custom Search" - -#: custom_search.module:26 -#: custom_search.info:0 -msgid "Customize the default search, change labels, default texts, ordering, and display content types and taxonomy selectors." -msgstr "Personnaliser la recherce par défaut, changer les libellés, les textes par défaut, l'ordre et présenter des sélecteur de types de contenu et de vocabulaires." - -#: custom_search.module:33 -msgid "Settings" -msgstr "Paramètres" - -#: custom_search.module:34 -msgid "Change the labels, the default texts and the ordering of elements." -msgstr "Changer les libellés, les textes par défaut et l'ordre des éléments." - -#: custom_search.module:40 -#: modules/custom_search_blocks/custom_search_blocks.module:55 -msgid "Content" -msgstr "Contenu" - -#: custom_search.module:41 -msgid "Select the content types to present as search options in the search block." -msgstr "Sélectionner les types de contenu à présenter comme options de recherche." - -#: custom_search.module:49 -msgid "Results page" -msgstr "Page des résultats" - -#: custom_search.module:50 -msgid "Customize the search results page." -msgstr "Personnaliser la page des résultats de la recherche." - -#: custom_search.install:21 -msgid "Custom Search enabled. Don't forget to set permissions." -msgstr "Custom Search activé. N'oubliez pas d'attribuer les permissions." - -#: custom_search.install:35 -msgid "Custom Search has been divided in multiple modules. Please re-enable the sub-modules you need." -msgstr "Custom Search a été divisé en plusieurs modules. Réactivez les sous-modules désirés." - -#: modules/custom_search_blocks/custom_search_blocks.admin.inc:15 -msgid "If you want additional blocks by content type, enable them here. Then go to the block page to place them in a region." -msgstr "Si vous désirez des blocs additionnels par type de contenu, activez-les ici. Ensuite, allez sur la page d'administration des blocs pour les placer dans une région." - -#: modules/custom_search_blocks/custom_search_blocks.admin.inc:24 -msgid "Number of blocks" -msgstr "Nombre de blocs" - -#: modules/custom_search_blocks/custom_search_blocks.module:160 -msgid "Enter the terms you wish to search for." -msgstr "Saisissez les termes que vous voulez rechercher." - -#: modules/custom_search_blocks/custom_search_blocks.module:31 -msgid "administer custom search blocks" -msgstr "administrer les blocs de recherche supplémentaires" - -#: modules/custom_search_blocks/custom_search_blocks.module:31 -msgid "use custom search blocks" -msgstr "utiliser les blocs de recherche supplémentaires" - -#: modules/custom_search_blocks/custom_search_blocks.module:16 -msgid "Search Blocks" -msgstr "Blocs de recherche" - -#: modules/custom_search_blocks/custom_search_blocks.module:17 -msgid "Provide additional search blocks by content type." -msgstr "Fournit des blocs de recherche additionnels par type de contenu." - -#: modules/custom_search_blocks/custom_search_blocks.info:0 -msgid "Custom Search Blocks" -msgstr "Custom Search Blocks" - -#: modules/custom_search_blocks/custom_search_blocks.info:0 -msgid "Provides additional search blocks." -msgstr "Fournit des blocs de recherche additionnels." - -#: modules/custom_search_i18n/custom_search_i18n.info:0 -msgid "Custom Search Internationalization" -msgstr "Custom Search Internationalization" - -#: modules/custom_search_i18n/custom_search_i18n.info:0 -msgid "Provides Internationalization to Custom Search." -msgstr "Permet la traduction des champs de Custom Search." - -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:15 -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:91 -msgid "Select the vocabularies to present as search options in the search block. If none is selected, no selector will be displayed." -msgstr "Sélectionnez les vocabulaires à afficher comme options de recherche. Si aucun n'est sélectionné, aucun sélecteur ne sera affiché." - -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:42 -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:119 -msgid "Choose which selector type to use." -msgstr "Choisissez le type de sélecteur à utiliser." - -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:58 -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:135 -msgid "-Any- text" -msgstr "Texte pour -Tout-" - -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:61 -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:138 -msgid "Enter the text for \"any term\" choice. The default value is \"!default\"." -msgstr "Entrez le texte pour le choix \"n'importe quel terme\". La valeur par défaut est \"!default\"." - -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:90;142;159;170;16 -msgid "Taxonomy" -msgstr "Taxonomie" - -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:171 -msgid "Select the vocabularies to display on the advanced search form." -msgstr "Sélectionnez les vocabulaires à afficher dans le formulaire de recherche avancée." - -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:17 -msgid "Select the vocabularies to present as search options in the search block." -msgstr "Sélectionner les vocabulaires à présenter comme options de recherche." - -#: modules/custom_search_taxonomy/custom_search_taxonomy.info:0 -msgid "Custom Search Taxonomy" -msgstr "Custom Search Taxonomy" - -#: modules/custom_search_taxonomy/custom_search_taxonomy.info:0 -msgid "Adds taxonomy selectors to Custom Search." -msgstr "Fournit des sélecteurs de taxonomie à Custom Search." - diff --git a/sites/all/modules/custom_search/translations/it.po b/sites/all/modules/custom_search/translations/it.po deleted file mode 100644 index 0d141a30..00000000 --- a/sites/all/modules/custom_search/translations/it.po +++ /dev/null @@ -1,467 +0,0 @@ -# $Id: it.po,v 1.1.2.11 2010/05/08 09:59:12 jdanthinne Exp $ -# -# Italian translation of Drupal (general) -# Copyright YEAR NAME -# Generated from files: -# custom_search.admin.inc,v 1.1.2.14 2010/05/02 14:55:31 jdanthinne -# custom_search_blocks.module,v 1.1.2.4 2010/05/02 14:55:31 jdanthinne -# custom_search.module,v 1.1.2.35 2010/05/02 14:55:31 jdanthinne -# custom_search_taxonomy.admin.inc,v 1.1.2.1 2010/04/29 21:12:09 jdanthinne -# custom_search_taxonomy.module,v 1.1.2.3 2010/05/02 14:55:31 jdanthinne -# custom_search.info,v 1.1.2.7 2010/05/02 14:55:31 jdanthinne -# custom_search_blocks.info,v 1.1.2.4 2010/05/02 14:55:31 jdanthinne -# custom_search_taxonomy.info,v 1.1.2.3 2010/05/02 14:55:31 jdanthinne -# custom_search.install,v 1.1.2.5 2010/04/29 21:12:09 jdanthinne -# custom_search_blocks.admin.inc,v 1.1.2.3 2010/05/02 14:55:31 jdanthinne -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2010-05-08 11:53+0200\n" -"PO-Revision-Date: 2010-05-08 11:53+0200\n" -"Last-Translator: NAME \n" -"Language-Team: Italian \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n!=1);\n" - -#: custom_search.admin.inc:15 modules/custom_search_blocks/custom_search_blocks.module:56 -msgid "Select the search types to present as search options in the search block. If none is selected, no selector will be displayed. Note: if there's only one type checked, the selector won't be displayed BUT only this type will be searched." -msgstr "" -"Seleziona i tipi di contenuto da presentare come opzioni di ricerca " -"nel blocco di ricerca. Se non selezionerai alcun tipo di contenuto, " -"nessun selettore verrà visualizzato. Nota: se " -"selezionerai un solo tipo di contenuto, il selettore non verrà " -"visualizzato MA la ricerca verrà effettuata unicamente per il tipo di " -"contenuto selezionato." - -#: custom_search.admin.inc:34 -msgid "Search box" -msgstr "Box ricerca" - -#: custom_search.admin.inc:38 custom_search.module:392 modules/custom_search_blocks/custom_search_blocks.module:43 modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:47 modules/custom_search_taxonomy/custom_search_taxonomy.module:131 -msgid "Display label" -msgstr "Visualizza etichetta" - -#: custom_search.admin.inc:43 -msgid "Search box label" -msgstr "Etichetta per il box ricerca" - -#: custom_search.admin.inc:45 modules/custom_search_blocks/custom_search_blocks.module:50 -msgid "Enter the label text for the search box. The default value is \"!default\"." -msgstr "" -"Inserisci l'etichetta di testo per il box di ricerca. Il valore di " -"default è \"!default\". " - -#: custom_search.admin.inc:49 -msgid "Search box default text" -msgstr "Testo di default per il box ricerca" - -#: custom_search.admin.inc:51 -msgid "This will change the default text inside the search form. Leave blank for no text. This field is blank by default." -msgstr "" -"Questo cambierà il testo di default dentro il form ricerca. Lasciare " -"bianco per non avere testo. Questo campo è bianco per deafault." - -#: custom_search.admin.inc:57;171 modules/custom_search_blocks/custom_search_blocks.module:82 -msgid "Submit button" -msgstr "Tasto di invio" - -#: custom_search.admin.inc:61 -msgid "Submit button text" -msgstr "Testo per il tasto di invio" - -#: custom_search.admin.inc:63 -msgid "Enter the text for the submit button (and the \"alt\" attribute if an image is used). Leave blank to hide it. The default value is \"!default\"." -msgstr "" - -#: custom_search.admin.inc:67 -msgid "Submit image path" -msgstr "Percorso dell'immagine da usare per il tasto di invio" - -#: custom_search.admin.inc:68 -msgid "The path to the file you would like to use as submit button instead of the default text button." -msgstr "" -"Il percorso del file da utilizzare come tasto di invio al posto del " -"bottone di default." - -#: custom_search.admin.inc:73 -msgid "Submit image" -msgstr "Carica immagine" - -#: custom_search.admin.inc:74 -msgid "If you don't have direct file access to the server, use this field to upload your image." -msgstr "" -"Se non hai accesso diretto al server, usa questo campo per caricare " -"l'immagine." - -#: custom_search.admin.inc:80 -msgid "Advanced search criteria" -msgstr "Criteri per la ricerca avanzata" - -#: custom_search.admin.inc:84 -msgid "Or" -msgstr "Oppure" - -#: custom_search.admin.inc:90;107;124 -msgid "Display" -msgstr "Visualizzazione" - -#: custom_search.admin.inc:95;112;129 -msgid "Label" -msgstr "Etichetta" - -#: custom_search.admin.inc:97;114;131 -msgid "Enter the label text for this field. The default value is \"!default\"." -msgstr "" -"Inserisci l'etichetta di testo per questo campo. Il valore di default " -"è \"!default\"." - -#: custom_search.admin.inc:101 -msgid "Phrase" -msgstr "Frase" - -#: custom_search.admin.inc:118 -msgid "Negative" -msgstr "Negativo" - -#: custom_search.admin.inc:137 modules/custom_search_blocks/custom_search_blocks.module:64 -msgid "Elements ordering" -msgstr "Ordinamento degli elementi" - -#: custom_search.admin.inc:144 modules/custom_search_blocks/custom_search_blocks.module:72 -msgid "Search Box" -msgstr "Box ricerca" - -#: custom_search.admin.inc:150 modules/custom_search_blocks/custom_search_blocks.module:77 -msgid "Content Types" -msgstr "Tipo di contenuto" - -#: custom_search.admin.inc:156 -msgid "Advanced search criterion: Or" -msgstr "Criterio per la ricerca avanzata: Oppure" - -#: custom_search.admin.inc:161 -msgid "Advanced search criterion: Phrase" -msgstr "Criterio per la ricerca avanzata: Frase" - -#: custom_search.admin.inc:166 -msgid "Advanced search criterion: Negative" -msgstr "Criterio per la ricerca avanzata: Negativo" - -#: custom_search.admin.inc:179 -msgid "Force search path" -msgstr "" - -#: custom_search.admin.inc:181 -msgid "If you want to use a different search path, enter it here. The [key] token will be replaced by what is entered in the search box. Ie: mysearch/[key]." -msgstr "" - -#: custom_search.admin.inc:203 modules/custom_search_blocks/custom_search_blocks.module:124 -msgid "Elements" -msgstr "Elementi" - -#: custom_search.admin.inc:225 -msgid "Search forms" -msgstr "" - -#: custom_search.admin.inc:229 -msgid "Display basic search" -msgstr "Visualizza il campo di ricerca di base" - -#: custom_search.admin.inc:234 -msgid "Display advanced search" -msgstr "Visualizza il form di ricerca avanzata" - -#: custom_search.admin.inc:239 -msgid "Apply Custom Search settings to the advanced search form" -msgstr "" - -#: custom_search.admin.inc:240 -msgid "Only the selected content types, taxonomy vocabularies and criteria will be displayed." -msgstr "" - -#: custom_search.admin.inc:246 -msgid "Results" -msgstr "" - -#: custom_search.admin.inc:247 -msgid "Select data to display below each result." -msgstr "" - -#: custom_search.admin.inc:251 -msgid "Content type" -msgstr "Tipo di contenuto" - -#: custom_search.admin.inc:256 -msgid "User" -msgstr "" - -#: custom_search.admin.inc:261 -msgid "Date" -msgstr "" - -#: custom_search.admin.inc:267 -msgid "Comments" -msgstr "" - -#: custom_search.admin.inc:274 -msgid "Uploads" -msgstr "" - -#: custom_search.admin.inc:281 -msgid "Filter" -msgstr "Filtra" - -#: custom_search.admin.inc:282 -msgid "Add links to filter the results by content type." -msgstr "Aggiungi links per filtrare i risultati per tipo di contenuto." - -#: custom_search.admin.inc:286 -msgid "Position" -msgstr "Posizione" - -#: custom_search.admin.inc:288 modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:36 modules/custom_search_taxonomy/custom_search_taxonomy.module:120 -msgid "Disabled" -msgstr "Disabilitato" - -#: custom_search.admin.inc:289 -msgid "Above results" -msgstr "Risultati sopra" - -#: custom_search.admin.inc:290 -msgid "Below results" -msgstr "Risultati sotto" - -#: custom_search.admin.inc:296 custom_search.module:397 modules/custom_search_blocks/custom_search_blocks.module:48 modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:52 modules/custom_search_taxonomy/custom_search_taxonomy.module:136 -msgid "Label text" -msgstr "Etichetta per il testo" - -#: custom_search.admin.inc:298 -msgid "Enter the label text for the list. The default value is \"!default\"." -msgstr "" -"Inserisci l'etichetta di testo per l'elenco. Il valore di default è " -"\"!default\"." - -#: custom_search.module:11 -msgid "Search this site" -msgstr "Cerca in questo sito" - -#: custom_search.module:12 modules/custom_search_blocks/custom_search_blocks.module:152 -msgid "Search" -msgstr "Cerca" - -#: custom_search.module:13 -msgid "Search for" -msgstr "Cerca per" - -#: custom_search.module:14 -msgid "-Any-" -msgstr "-Qualsiasi-" - -#: custom_search.module:15 -msgid "Containing any of the words" -msgstr "Contenente qualsiasi tra queste parole" - -#: custom_search.module:16 -msgid "Containing the phrase" -msgstr "Contenente la frase" - -#: custom_search.module:17 -msgid "Containing none of the words" -msgstr "Contenente nessuna di queste parole" - -#: custom_search.module:18 -msgid "Filter the results" -msgstr "Filtra i risultati" - -#: custom_search.module:359 -msgid "Content types" -msgstr "Tipi di contenuto" - -#: custom_search.module:373 -msgid "Other searches" -msgstr "Altre ricerche" - -#: custom_search.module:380 modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:34 modules/custom_search_taxonomy/custom_search_taxonomy.module:118 -msgid "Selector type" -msgstr "Tipo di selettore" - -#: custom_search.module:382 modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:37 modules/custom_search_taxonomy/custom_search_taxonomy.module:121 -msgid "Drop-down list" -msgstr "Elenco a tendina" - -#: custom_search.module:383 modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:38 modules/custom_search_taxonomy/custom_search_taxonomy.module:122 -msgid "Drop-down list with multiple choices" -msgstr "Elenco a tendina con possibilità di scelte multiple" - -#: custom_search.module:384 modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:39 modules/custom_search_taxonomy/custom_search_taxonomy.module:123 -msgid "Radio buttons" -msgstr "Radio buttons" - -#: custom_search.module:385 modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:40 modules/custom_search_taxonomy/custom_search_taxonomy.module:124 -msgid "Checkboxes" -msgstr "Checkboxes" - -#: custom_search.module:387 -msgid "Choose which selector type to use. Note: content types and other searches cannot be combined in a single search." -msgstr "" -"Scegli quale tipo di selettore usare. Nota: tipi di contenuto e altre " -"ricerche non possono essere combinate in una singola ricerca." - -#: custom_search.module:399 modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:54 modules/custom_search_taxonomy/custom_search_taxonomy.module:138 -msgid "Enter the label text for the selector. The default value is \"!default\"." -msgstr "" -"Inserisci l'etichetta di testo per il selettore. Il valore di default " -"è \"!default\"." - -#: custom_search.module:403 -msgid "-Any content type- text" -msgstr "Testo per -Qualsiasi tipo di contenuto-" - -#: custom_search.module:406 -msgid "Enter the text for \"any content type\" choice. The default value is \"!default\"." -msgstr "" -"Inserisci il testo per l'opzione \"qualsiasi tipo di contenuto\". Il " -"valore di default è \"!default\"." - -#: custom_search.module:64 -msgid "administer custom search" -msgstr "Amministra la ricerca personalizzata" - -#: custom_search.module:64 -msgid "use custom search" -msgstr "usa la ricerca personalizzata" - -#: custom_search.module:25 custom_search.info:0;0 modules/custom_search_blocks/custom_search_blocks.info:0 modules/custom_search_i18n/custom_search_i18n.module:131 modules/custom_search_i18n/custom_search_i18n.info:0 modules/custom_search_taxonomy/custom_search_taxonomy.info:0 -msgid "Custom Search" -msgstr "Ricerca personalizzata" - -#: custom_search.module:26 custom_search.info:0 -msgid "Customize the default search, change labels, default texts, ordering, and display content types and taxonomy selectors." -msgstr "" -"Personalizza il sistema di ricerca di default, cambia le etichette, " -"l'ordinamento, e visualizza selettori per il tipo di contenuto o " -"termini della tassonomia" - -#: custom_search.module:33 -msgid "Settings" -msgstr "Settaggi" - -#: custom_search.module:34 -msgid "Change the labels, the default texts and the ordering of elements." -msgstr "" -"Cambia le etichette, il testo di default e l'ordinamento degli " -"elementi." - -#: custom_search.module:40 modules/custom_search_blocks/custom_search_blocks.module:55 -msgid "Content" -msgstr "Contenuto" - -#: custom_search.module:41 -msgid "Select the content types to present as search options in the search block." -msgstr "" -"Seleziona i tipi di contenuto da presentare come opzioni nel blocco di " -"ricerca." - -#: custom_search.module:49 -msgid "Results page" -msgstr "Pagina dei risultati" - -#: custom_search.module:50 -msgid "Customize the search results page." -msgstr "Personalizza la pagina dei risultati." - -#: custom_search.install:21 -msgid "Custom Search enabled. Don't forget to set permissions." -msgstr "" - -#: custom_search.install:35 -msgid "Custom Search has been divided in multiple modules. Please re-enable the sub-modules you need." -msgstr "" - -#: modules/custom_search_blocks/custom_search_blocks.admin.inc:15 -msgid "If you want additional blocks by content type, enable them here. Then go to the block page to place them in a region." -msgstr "" - -#: modules/custom_search_blocks/custom_search_blocks.admin.inc:24 -msgid "Number of blocks" -msgstr "" - -#: modules/custom_search_blocks/custom_search_blocks.module:147 -msgid "Enter the terms you wish to search for." -msgstr "" - -#: modules/custom_search_blocks/custom_search_blocks.module:31 -msgid "administer custom search blocks" -msgstr "" - -#: modules/custom_search_blocks/custom_search_blocks.module:31 -msgid "use custom search blocks" -msgstr "" - -#: modules/custom_search_blocks/custom_search_blocks.module:16 -msgid "Search Blocks" -msgstr "" - -#: modules/custom_search_blocks/custom_search_blocks.module:17 -msgid "Provide additional search blocks by content type." -msgstr "" - -#: modules/custom_search_blocks/custom_search_blocks.info:0 -msgid "Custom Search Blocks" -msgstr "" - -#: modules/custom_search_blocks/custom_search_blocks.info:0 -msgid "Provides additional search blocks." -msgstr "" - -#: modules/custom_search_i18n/custom_search_i18n.info:0 -msgid "Custom Search Internationalization" -msgstr "" - -#: modules/custom_search_i18n/custom_search_i18n.info:0 -msgid "Provides Internationalization to Custom Search." -msgstr "" - -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:15 modules/custom_search_taxonomy/custom_search_taxonomy.module:98 -msgid "Select the vocabularies to present as search options in the search block. If none is selected, no selector will be displayed." -msgstr "" -"Seleziona i vocabolari da presentare come opzioni di ricerca nel " -"blocco di ricerca. Se non selezionerai alcun vocabolario, nessun " -"selettore verrà visualizzato." - -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:42 modules/custom_search_taxonomy/custom_search_taxonomy.module:126 -msgid "Choose which selector type to use." -msgstr "Scegli quale tipo di selettore usare." - -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:58 modules/custom_search_taxonomy/custom_search_taxonomy.module:142 -msgid "-Any- text" -msgstr "Testo per -Qualsiasi-" - -#: modules/custom_search_taxonomy/custom_search_taxonomy.admin.inc:61 modules/custom_search_taxonomy/custom_search_taxonomy.module:145 -msgid "Enter the text for \"any term\" choice. The default value is \"!default\"." -msgstr "" -"Inserisci il testo per l'opzione \"qualsiasi termine\". Il valore di " -"default è \"!default\"." - -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:97;149;166;16 -msgid "Taxonomy" -msgstr "Tassonomia" - -#: modules/custom_search_taxonomy/custom_search_taxonomy.module:17 -msgid "Select the vocabularies to present as search options in the search block." -msgstr "" -"seleziona i vocabolari da presentare come opzioni nel blocco di " -"ricerca." - -#: modules/custom_search_taxonomy/custom_search_taxonomy.info:0 -msgid "Custom Search Taxonomy" -msgstr "" - -#: modules/custom_search_taxonomy/custom_search_taxonomy.info:0 -msgid "Adds taxonomy selectors to Custom Search." -msgstr "" -