Description:
This module allows you to alter HTML output using a specific filter. It is based on the QueryPath library and requires the QueryPath module.
This filter is customisable through "QueryPath rules" that can be enabled/disabled and weighted.
The rules work with syntax similar to jQuery. The rule edition form works with a Selector/Action/Value pattern wich will then be translated into QueryPath syntax (quite straightforward).
Why this module ?
The QueryPath library lets you use PHP to alter HTML strings. The idea is to provide the ability to use this library in an input filter without PHP knowledge and without granting PHP filter access to users.
Technical information:
- Drupal version: Drupal 7
- Sandbox project: http://drupal.org/sandbox/dolu/1706658
- Git clone: git clone http://git.drupal.org/sandbox/dolu/1706658.git querypath_filter
- Proposed project name: querypath_filter
- Requires : QueryPath module
More thoughts:
- This module is in a quite simple state for now, I'd like to hear community ideas and needs to decide if and how it should be enhanced
- This is my first contrib module. I'm new to Git and use TortoiseGit. I think I must create a branch for this module. Where can I find guidelines?
Similar/related projects:
- QueryPath module
- Custom filter: lets you create multiple filters and use regular expressions to alter HTML output.
I think it could be useful to add multiple filters to QueryPath filter module too, but this will be considered with community's feedback.
Personal background:
I work as a web developer for more than 4 years now, and with Drupal for almost 4 years.
I've made lots of Drupal sites 20+ (Drupal 5/6/7) and build custom modules for some time.
I've a good understanding of Drupal APIs and how it works under the hood (maybe not at lower levels).
Comments
Comment #1
patrickd commentedwelcome,
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.
Also have a look at the tips for a great project pageand the guidelines for in-project documentation.
An automated review of your project has found some issues with your code; As coding standards make sure projects are coded in a consistent style we please you to have a look at the report and try to fix them. Anyway, note that issues found are possibly false positives and fixing all issues is not a requirement for getting through the application process.
Report: http://ventral.org/pareview/httpgitdrupalorgsandboxdolu1706658git
We do really need more hands in the application queue and highly recommend to get a review bonus so we can come back to your application sooner.
Everything you need to know about projects and maintainership can be found in the documentation and it's subpages:
http://drupal.org/contribute/development
regards
Comment #2
ludo.rHi!
I've created a 7.x-1.x branch on Git and cleaned up the code review with coding standards:
http://ventral.org/pareview/httpgitdrupalorgsandboxdolu1706658git
I do not want to change the last remaining error reported for better readability.
I think I should now retag this issue with "needs review"?
Comment #3
serjas commented# in .install, there is hook_install but no hook_uninstall , this should be there to uninstall schema
# "querypath_filter_encoding" this variable are set by this module? if so it should be deleted in hoo_uninstall
Comment #4
patrickd commentedThere is no need to install or uninstall schemas in drupal 7, that happens automatically
Comment #5
serjas commented@patrickd , thanks , but to remove variable , we need to include hook_uninstall , right?
Comment #6
patrickd commentedyes, variables still need to be uninstalled.
Comment #7
ludo.rActually, I've set this variable for further development, to remember to handle the encoding.
But you're right, I still can implement hook_uninstall() to delte variables.
This has been commited.
Comment #8
dwieeb commentedI really like your idea and I find this very useful.
That being said, I'd like to try reviewing your module, if you don't mind.
PAReview still has one complaint about coding standards: http://ventral.org/pareview/httpgitdrupalorgsandboxdolu1706658git-7x-1x
There is still a master branch, though you are not using it. You can remove it with these commands after setting the default branch to 7.x-1.x if you haven't already done so:
You should use
$form['#attached']here instead of drupal_add_css() and drupal_add_js(). This way, other modules can manipulate the attached css & js if they need to copy the form or alter it. As a note, for adding files you don't need to include the second parameter in drupal_add_ functions.admin/config/content/querypath_filter, as every other menu entry inadmin/configdoes.action-linksto remain consistent with the Drupal admin pages. Check outadmin/structure/blockfor an example.I've tested this thoroughly and this module is safe and stable. After these minor changes, I think we can move it up to RTBC. =)
Comment #9
ludo.rHi!
Thank you for reviewing this module!
Here is an update of what I've just commited :
admin/config/content/querypath_filterquerypath_filter_filter_info(). But, as this module is intended to be used by Drupal builders and themers, I think they should know what they're doing.Thanks for your help!
Comment #10
dwieeb commentedSweet. This is rockin'.
If a few weeks pass without any attention from an administrator, you can participate in the review bonus program like I did.
Great job on this module!
Comment #11
ludo.r@dwieeb
Thank you for reviewing this module and for the tips! :-)
Comment #12
sreynen commentedThanks for your contribution, dolu!
I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewers as well.
Comment #13
ludo.rThank you all for reviewing this module! ;)
Comment #14.0
(not verified) commentedAdding personal background.