Drupal 6.x
git clone --branch master tomotomo@git.drupal.org:sandbox/tomotomo/1346812.git views_substitution_arguments
With CCK and Views, you almost don't need to write SQL queries to create and
manage tables, insert into them, and then select from them. Views will let
you query most any field in any table, since major modules expose their tables
to Views. Filters are what allow you to create your WHERE clause, with the
ability to expose some of the input values to user selection. Arguments allow
users to pass in values that will also be substituted in the WHERE clause.
Unfortunately, arguments and filters don't play together and by default there's
no way to use a Views query by passing in values to be used in the filters,
even though the filters allow more expressive querying (e.g. greater than,
less than, etc.) than arguments, which require an exact match to the argument.
With this module, it's now possible to replace "sentinel" values in filters
with specially formatted arguments. The sentinel will also be replaced anywhere
else in the query, and be replaced no matter how many times it appears. So
you can have several filters be replaced in a single argument.
This module is similar to views_arguments_in_filters which works by replacing
placeholders like "%1" with arguments in Null argument positions. However,
this only works for filters where free-form text is allowed for the filter's
definition. So this won't work for taxonomy or date-based filters. Our module
will work in these cases.
Comments
Comment #1
doitDave commentedHi,
interesting module - although I do not really understand the problem: I may be wrong (and will check again), but I actually do have arguments in my views which filter the result. maybe I miss something, perhaps you can add two examples (without your module vs. with your module) of the resulting SQL? Just for a better understanding?
Aside this, please thoroughly check with http://drupal.org/node/1011698 and revise your application. Also make sure you are familiar with the many lectures proposed there as they will all be considered in the ongoing review process.
Cheers, dave
Comment #2
tomotomo commentedThanks Dave. The issue comes from filters and arguments being two separate things with separate handlers, which are not necessarily alike. Generally, filters are more powerful/expressive than arguments. Arguments look for exact matches, while filters can do >, >=, <, <=, 'CONTAINS', etc. But filter values need to be configured beforehand, or exposed to the user, but still can't be passed in as arguments. With this module, you can have several date filters which should depend on a single argument, and pass in the argument in a way, without exposing all the date filters and setting each date to the same date.
Comment #3
misc commented@tomotomo has been contacted to ask if the application is abandoned.
http://drupal.org/node/894256
Comment #4
tomotomo commentedHi, I checked http://drupal.org/node/1011698 regarding the proper way to apply for a new project. I can't tell if I'm missing something in particular in my application and I thought I answered the reviewers question and just hadn't received any further feedback.
I'm happy to revise if I know what is wrong or missing.
Comment #5
misc commentedThree things that you need to add to your application:
Also, it appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
This project is too short to approve you as git vetted user. We are currently discussing how much code we need, but everything with less than 120 lines of code or less than 5 functions cannot be seriously reviewed. However, we can promote this single project manually to a full project. Your project has 45 lines of code and one function.
Also, you left a dsm (and therfore make it dependent of devel) in the code and a variable_get for subargs_debug, but I can not see any variable_set.
Comment #6
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.
Comment #7
avpaderno