Closed (won't fix)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
6 Oct 2010 at 14:20 UTC
Updated:
5 Feb 2012 at 09:44 UTC
Jump to comment: Most recent file
Comments
Comment #1
ziomizar commentedHehehe i'm sorry for my super motivation, i have not understand the word Motivation and how this request form works :P.
This is what i want to do :
if i have an HTML field with type=text , i want be able to add autocomplete functionality in their fields, getting results by Views Module or Custom Sql.
This is pretty simple with Jquery.
In this way i can bypass all the situations when i have not autocomplete functionality. ie: view exposed filter, custom form, ecc..
i have attached some file to let you see how it works.
Comment #2
trungonly commentedI see a big jquery.js file (100K) included in your package. Do you think we can use current jQuery version of Drupal instead and get rid of this duplicate?
Comment #3
ziomizar commentedYes you are right,
I have put into my lib directory, all libraries that i found in Jquery Autocomplete plugin.
But when i load the module, are used only autocomplete/includes/jquery.autocomplete/jquery.autocomplete.js and autocomplete/includes/jquery.ajaxQueue.js.
Other libraries in this base version are "only" present in this package.
Comment #4
ziomizar commentedHi,
I have added in this package:
- hook_perm() : Backend and Frontend(than you must set permission for see autocomplete in frontend!)
- rivisited also all code with coder module.
- dependency by jquery (tnx trungonly)
- removed all .js and files not used (tnx trungonly)
I have found here http://drupal.org/node/392700 people that maybe need of this module from 2009.
If you want try with Sql custom, the sintax is the same of db_query() ie:
SELECT title FROM {node} WHERE title like '%s%%'
in this way is the same that writing ie:
SELECT title FROM {node} WHERE title like 'hello%'
because %s will be the AJAX variable , and LIKE operator use %% (db_query transform double %% in only one %).
If you want try Views, is more simple but you must have :
- A View, with one Exsposed Filter. Later set this filter_name in the Autocomplete module. This filter will be the Ajax parameter, and will make the query that will be put in the autocomplete field.
- All configuration will be made by Views side
- All template customization will be made by Views side
- Autocomplete remove all html tags from Views results.
The field_id will be the HTML id of the textfield without #,
than if your textfield is #test-field you can write : test-field
Comment #5
avpadernoHello, and thank you for applying for a CVS account. I am adding the review tags, and some volunteers will review the code, pointing out what it needs to be changed.
As per requirements, the motivation message should be expanded to contain more features of the proposed project. For themes, it should include also a screenshot of the theme, and (when possible) a link to a working demo site; for modules, it should include also a comparison with the existing solutions.
Comment #6
ziomizar commentedI have already exposed the features of this modules in this discussion,
comparison with existing module (finding on 'module search' keyword "autocomplete" ):
----------------------------------------
- http://drupal.org/project/autocomplete_widgets : is only for cck and only text and number
** create NEW autocomplete fields and only for cck.
** my module add autocomplete functionality in all text type item in a HTML page
-----------------------------------------
- http://drupal.org/project/finder : Create forms for users to find stuff,
And the Finder Autocomplete is for : Enables autocomplete textfields for finder
** create a new form for search, with a some field autocomplete only for finder form
** my module add autocomplete functionality in all text type item in a HTML page
-----------------------------------------
- http://drupal.org/project/cck_autocomplete
** moved to - http://drupal.org/project/autocomplete_widgets
-----------------------------------------
- http://drupal.org/project/nodereference_explorer
** autocomplete only for nodereference
-----------------------------------------
- http://drupal.org/project/keyword_autocomplete
** Keyword Autocomplete lets you add autocomplete functionality to your site's search forms based on previously searched strings
------------------------------------------
- Apache Solr Autocomplete
** Install and enable module. All search boxes that lead to an Apache Solr search will automatically be autocomplete-enabled.
** than is apachesolr only
------------------------------------------
- http://drupal.org/project/autocomplete_element
** you must create a new form then a module for use this one. Not is possible referencing to existent form or text element (without write your custom module).
------------------------------------------
- http://drupal.org/project/form_beautifier
** i have not see possibility of choise query o r view to make autocomplete, and i not see no one functionality for autocomplete.
------------------------------------------
all these solutions are focus on their own text element.
Not is possible with any of this module adding autocomplete functionality to a textfield on another module or form element.
My module functionality are :
- Can add autocomplete functionality at all text field present on a HTML page (not a form, need only that element exists).
- Can create your custom query for select option in autocomplete suggestions.
- You can choise Views Module, for create your custom query for getting result list.
- You dont must create your custom module for using it, only choise a query or a view (not like a http://drupal.org/project/autocomplete_element)
- You can add autocomplete functionality when a module don't provide fully autocomplete functionality.
Comment #7
ziomizar commentedchange status
Comment #8
avpadernoThe only explanation I find for the purpose of the module are the following three sentences:
As reported from the requirements, .
Comment #9
ziomizar commentedHi kiamlaluno, thank you for your reply.
I have join all messages of this issue and rewrite one big motivation :
---------------------------------------------------------------------------------------------------------
For the moment i need to add autocomplete functionality in any text input form.
Not only cck, taxonomy or search but in all text input fields.
I have developed a simple module that i want named Autocomplete, with this module you can add a result of a Views or a custom Sql into any text field.
All these solutions (see post http://drupal.org/node/933490#comment-3548094) are focus on their own text element.
Not is possible with any of this module adding autocomplete functionality to a textfield on another module or existing form element.
The functionality that i want add in this issue are :
- Can add autocomplete functionality at all text field present on a HTML page (not a form, need only that #id of html element exists).
- Can create your custom query for select option in autocomplete suggestions.
- You can choise Views Module, for create your custom query for getting result list.
- You dont must create your custom module for using it, only choise a query or a view (not like a http://drupal.org/project/autocomplete_element)
- You can add autocomplete functionality when a module don't provide fully autocomplete functionality.
Main Motivation for this module:
The main goal of this module is Autocomplete with Jquery when a module that play with forms, or custom form, don't provide this function in some fields.
Without this, we must write custom modules (with the same code repeating) every time we need a field with autocomplete or in other cases make a changes in existent module(not all people are familiar with module developing).
in this topic http://drupal.org/node/392700 you can see an example of developers that may need of this module for adding autocomplete in view exposed filter.
Comment #10
ziomizar commentedI have added
/*
* @file
*/
in all .php files of the module.
Comment #11
avpadernoThe package name is used when the package name is already used from another module.
As reported in Documenting hook implementations:
hook_.exit, the code should callmodule_invoke_all('exit').Use
t()-placeholders. The string passed tot()is not passed tocheck_plain().Strings used in the user interface should be translated. Error until delete is not grammatically correct.
There are some typos in the string (choise is not a verb).
The first argument of
form_set_error()is the form field identifier.The first argument of
t()is a literal string, not a concatenation of strings. The script used to create the translation template is not able to handle any dynamic value, even in the case of code similar tot($variable), or t(function()); this means that if the argument of the function is not a literal string, it will not appear in the translation template.See http://drupal.org/coding-standards to understand how a module should be written. In particular, see how the code should be formatted.
In English, there isn't a space before the colon.
Strings used in the user interface should be translated.
Comment #12
trungonly commentedPlease check typo "finish successfull".
Comment #13
ziomizar commentedHi kiamlaluno, thanks for your review.
1. removed version line and package from .info file
2. all files included in my package are also GPL.
3. fixed comments in the hooks
4. removed hook_ from one function
5. added module_invoke_all('exit'); before exit();
6. added placeholders in t() function and removed check_plain when not necessary.
7. translated all string in user interface and i tryed to recheck all grammatically errors
8. i tryed to recheck all typos in the strings
9. thank you.
10. i have reread http://drupal.org/coding-standards and recheck all also with Coder module.
11. Fixed all strings used in user interface
12. Added README.txt
Comment #14
ziomizar commentedFixed another formatting error.
Comment #15
avpadernoFiles available from third-party sites should not be committed in Drupal.org repository, independently from the license used for the files. There is actually a case where committing such files is possible, but this doesn't seem the case.
Comment #16
ziomizar commentedHi kiamlaluno,
If i can't use third-party files, I need to add dependencies from jQuery(for framework)
and Autocomplete_Element(to include jquery.autocomplete.js).
I have removed directory /include from the package
Comment #17
avpadernoYour code can depend from files that are available from third-party sites, but you cannot commit them in Drupal.org repository; the reason for not committing them in Drupal.org repository are mainly four:
There are many modules that use third-party libraries, and they require the user to install them separately.
Comment #18
ziomizar commentedYes you are right,
But the jquery.autocomplete.js need a fix for working with drupal, becouse the param for ajax call named "q" and would to be changed.
Then if i require the user install them, i require also that the user apply a patch in them and this is (not much but...) difficult for some people.
This module is already dependant from the jQuery pugin that is the main example of third-party libraries in drupal.org.
Unfortunatly not include autocomplete library, that is included in Autocomplete Element.
1. You are right
2. Yes but my module is named autocomplete, and in my motivation i say that this works with jQuery. Then my module MUST be updated every time there is an update of the jQuery UI or an update of autocomplete plugin.
3. Yes i took autocomplete plugin from the module "Autocomplete Element"
4. The version of library is the same, and the fix is the same.
Comment #19
avpadernoIf the plugin is a modified version, and there is already a module that comes with the modified plug-in, then the proposed module should depend on it; if there is not a module that includes the modified jQuery plug-in, then including the plug-in would be the correct way (and it is listed between the reasons to include a third-party library).
I am just suggesting what should be done; this is not something that blocks the application approval.
Comment #20
ziomizar commentedFor the moment i can include (and already included in post #16) dependency from autocomplete_element that already include the modified library with the same fix.
Then this is the better solution for not duplicating same code of third-party.
In future if i will need of a different plugin version,
i can open a new discussion or open an issue on jQuery_UI module or other,
in all ways in future i can ask at the community what will be the best solution.
Comment #21
ziomizar commentedThere are other problem.. or can you give me a CVS account?
see post #16 for last release.
Comment #22
ziomizar commentednews?
Comment #23
1mundus commentedWhy don't you give ziomizar a chance to release this as a module? This is a essential functionality for many of us and there is no adequate solution for autocomplete in exposed filters or similar.
Comment #24
ziomizar commentedthank you 1mundus
Comment #25
bastid commentedHi Ziomizar,
Seems that your module is all I ever waited for! I installed your latest version, but I cannot get it running.
I tried to use it in views-mode. I selected the view ("Jobs") which I want to enhance by your autocomplete feature. In "Input field id:" I entered the name of the field I want to search through, in my case it is "field_location". In "The view filter name:" I entered to name of the filter, in my case it is "field_location_filter".
When I click "save" I get the message: "Filter #field_location_filter for Jobs not exits".
As I do not have enough Drupal experience I cannot see the mistake by myself.
Thank you in advance!
Best
Sebastian
Comment #26
ziomizar commentedHi bastid
than if your input type is like this [input id="field_location" name="test-field" type="text"] its ok.
If this is exactly the report message, i think that you should remove # from the filter name (and use Filter identifier not Filter name sorry!).
If this is not a valid solution, i think that will be better writing a bit of code to avoid similar problem(could be show a list of filters.. in this way will be not necessary that users remembers all ids of fields.).
Comment #27
avpadernoComment #28
avpadernoComment #29
itangalo commentedNote: I cannot approve or decline CVS account applications, but I'm trying to help real coders in reviewing applications more efficiently. The following comments are *not* ground for approving or declining an application – just a help to get going.
I had a look at the module, and just a few comments:
* There was a typo in the module description (.info file) – 'ustom Sql' should probably be 'custom SQL'.
* In autocomplete.module, lines 79–85, there is a non-standard formatting on a comment.
* In autocomplete.module, the line break at line 242 and 243 decreases readability.
* In autocomplete.module, there are two blank lines at the end (while Drupal standard says one).
* In README.txt, line 27, there is a typo period (.) in the middle of the sentence.
I'd say all of these issues are minor, and not blockers for CVS account.
The module functionality seem different enough from other autocomplete modules.
I have NOT security reviewed the module.
Good luck!
Comment #30
avpadernoI am changing the status as per previous comment.
Comment #31
ziomizar commentedThank you itangalo,
At the moment i'm not sure that this module will be usefull for drupal user, i'm waiting for approval from October. However i have fixed your issues.
* There was a typo in the module description (.info file) – 'ustom Sql' should probably be 'custom SQL'.
-> yes , fixed
* In autocomplete.module, lines 79–85, there is a non-standard formatting on a comment.
-> fixed
* In autocomplete.module, the line break at line 242 and 243 decreases readability.
-> fixed, i have split into two line separated by period.
* In autocomplete.module, there are two blank lines at the end (while Drupal standard says one).
-> I have only one line at the end of the file autocomplete.module
* In README.txt, line 27, there is a typo period (.) in the middle of the sentence.
-> fixed
Comment #32
itangalo commentedComment #33
arianek commentedHi. Please read all the following and the links provided as this is very important information about your CVS Application:
Drupal.org has moved from CVS to Git! This is a very significant change for the Drupal community and for your application. Please read the following documentation on how this affects and benefits you and the application process:
Migrating from CVS Applications to (Git) Full Project Applications
Comment #34
ziomizar commentedHi arianek,
I'm a bit disoriented because this is my first request for a project.
I have read the more importants points of your links. I have agreed with git licence and I have set up my git username, now i can see http://drupal.org/node/add/project-project (create project form), and I have create my Sandbox project page.
Now i should close this CSV approval request and work with my sandbox project page, right?
Comment #35
gusti77 commentedAre there any news about this? I really, really need this functionality, and many other people do too. I've downloaded the last version of the module and tried using it on a view of my site, but I keep getting an error message ("filter x for view not exists")
Comment #36
itangalo commentedThis issue should be changed to 'needs review' -- if you're applying to create a 'real' project (and not only a sandbox project).
@gusti77: It should be possible to post issues and have discussions in the sandbox project, just so you know. And, I may add, it is good with feedback like this -- it shows that the module is needed and appreciated.
Comment #37
jthorson commentedUpdating issue with requirements as linked to in comment #33:
Updated title
Moved issue from the CVS to Git application queue
Link to the Sandbox Project Page: http://drupal.org/sandbox/ziomizar/1076018
Now that the application is in the proper application queue, another reviewer should be along to continue review process shortly. (Please be patient, as the current queue backlog is somewhere in the order of 4 weeks.)
Comment #38
sreynen commentedPlease address the open issue and move this back to "needs review" status.
Comment #39
misc commentedThe applicant has been contacted to ask if the application is abandoned.
Comment #40
misc commentedThe application has been closed. If you would like to reopen it, you are free to do so.
See http://drupal.org/node/894256