About This Module
This module simply creates a block for displaying an effect similar to that found in the popular film series The Matrix. The block can also have an overlay containing basic text content.
All of the options for the block are configurable within the admin panel.
This module utilises the latest requestAnimationFrame technology with HTML5 canvas to ensure not only smooth animations, but animations that are not resource intensive at all.
Because this modle uses requestFrameAnimation, instead of a regular timer, when you background the tab the animation stops. This would not be the case if using the standard rendering method (the timer method) and it wold continuously eat up resources.
Why?
I created this module to display the same thing on a personal project and thought I wold release it to the Drupal community, as there is not another module like this. I also think this module is the perfect way to showcase what the canvas element can do and how it can be used within a Drupal module.
Requirements
This module depends on libraries API, then you have to move the jQuery scripts from the second download below to the respective library folder.
The two jQuery files that this plugin relies on are jQuery Matrix Rain & jQuery Request Animation Frame.
The only required module is jQuery Color Picker, which is used within the admin configuration form. Failure to bypass the requirement for this module will result in being completely unable to change any color related parameters within the admin panel.
Installation Instruction
- Install http://drupal.org/project/libraries
- Install this module just as you would any other Drupal module
- Download this file
- Extract the the zip file content and put copy the JS folder to [path to libraries folder]/alxs_matrix/
Credits
Credits go to Corey Frang, Paul Irish and Tino Zijdel, for their work on the requestAnimationFrame features and polyfill to allow for the smooth rendering of the block. Neil Carpenter must receive credit for his work creating part of the Javascript to render the actual code rain that is wrapped in the jQuery plugin. The standalone jQuery plugin was created by myself, so credits go to myself for creating that plugin.
Links
Clone Command
git clone --branch 7.x-1.x https://git.drupal.org/sandbox/alxs/2625182.git alxs_matrix_rain
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | error.png | 24.28 KB | visabhishek |
| #13 | conf.png | 33.68 KB | visabhishek |
| matrix-rain.png | 149.71 KB | djalxs |
Comments
Comment #2
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxalxs2625182git
Fixed the git clone URL in the issue summary for non-maintainer users.
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
djalxs commentedEverything is now fixed
Comment #4
fishfree commentedIndividual user account
Yes: Follows guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and/or fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity
Secure code
Yes: Meets the security requirements
Coding style & Drupal API usage
Yes: It follows code and API guidelines.
But I suggest you to change the file encoding to UTF-8, which is not prone to cause corrupted coding and displaying of non-latin characters.
Comment #5
gaja_daran commentedHi,
Remove all variable alxs_matrix_xxx when module has uninstall.
Refer:
https://api.drupal.org/api/drupal/modules!system!system.api.php/function...
Comment #6
djalxs commentedThanks for the tips guys.
I have now implemented hook_uninstall() to remove the variables set by the module.
Comment #7
djalxs commentedThis module has been reviewed and tested by the community.
The coding standards have been checked by the community and also by automated test tools such as PAR review and all fixes applied. The code has also been checked with the coder review module and passes all tests there, with the most stringent testing applied.
I know this isn't a module that is going to solve life's problems, but it certainly is unique.
I am also releasing the custom Jquery plugin when this is available to download, so this is a double hold-up.
I thank anyone in advanced and anyone previously for testing this module and hopefully getting it past the review stage and hopefully releasing this to the community.
Comment #8
klausiPlease don't RTBC your own issues, see the workflow: https://www.drupal.org/node/532400
Comment #9
djalxs commentedThis module still needs review as issues were fixed.
I wish it didn't take over a year to get modules published due to someone commenting about me changing the status. Please can we look at reviewing this module so as I can continue to the Drupal ecosystem.
I love Drupal but seriously, I feel like abandoning Drupal right now because of this!
Comment #10
satyam upadhyay commentedHi djalxs,
Firstly fix the https://pareview.sh/node/798 for your module
Regards
Satyam
Comment #11
djalxs commentedAll fixes have now been applied.
All required Javascript that will be placed in the libraries folder has also been ran through the PAReview system to ensure this also adheres to the Javascript coding standards.
Thanks Satyam for the speedy response.
Alex
Comment #12
visabhishek commentedComment #13
visabhishek commentedHi
1: Found XSS Issue : If I enter
<script>alert('XSS');</script>, its getting executed(see the attached screenshot). You need to sanitize data before printing. For more information about sanitizing, please read https://www.drupal.org/node/28984.2: Please remove all used variable under hook_unistall().
Example:
Comment #14
djalxs commentedFor further testing, please also update the jQuery library from my repository.
Comment #15
djalxs commentedComment #16
visabhishek commentedPlease don't remove the security tag, we keep that for statistics and to show examples of security problems.
Comment #17
djalxs commentedCan we take another look at this please.
Comment #18
djalxs commentedAnybody?
Comment #19
djalxs commentedComment #20
djalxs commentedComment #21
PA robot commentedProject 1: https://www.drupal.org/node/2625384
Project 2: https://www.drupal.org/node/2856112
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #22
djalxs commentedComment #23
avpaderno