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

  1. Install http://drupal.org/project/libraries
  2. Install this module just as you would any other Drupal module
  3. Download this file
  4. 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

Project Page

Clone Command

git clone --branch 7.x-1.x https://git.drupal.org/sandbox/alxs/2625182.git alxs_matrix_rain
CommentFileSizeAuthor
#13 error.png24.28 KBvisabhishek
#13 conf.png33.68 KBvisabhishek
matrix-rain.png149.71 KBdjalxs

Comments

djalxs created an issue. See original summary.

PA robot’s picture

Issue summary: View changes
Status: Needs review » Needs work

There 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.

djalxs’s picture

Status: Needs work » Needs review

Everything is now fixed

fishfree’s picture

Individual 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.

gaja_daran’s picture

djalxs’s picture

Thanks for the tips guys.

I have now implemented hook_uninstall() to remove the variables set by the module.

djalxs’s picture

Status: Needs review » Reviewed & tested by the community

This 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.

klausi’s picture

Assigned: djalxs » Unassigned
Status: Reviewed & tested by the community » Needs review

Please don't RTBC your own issues, see the workflow: https://www.drupal.org/node/532400

djalxs’s picture

This 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!

satyam upadhyay’s picture

Status: Needs review » Needs work

Hi djalxs,

Firstly fix the https://pareview.sh/node/798 for your module

Regards
Satyam

djalxs’s picture

All 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

visabhishek’s picture

Issue summary: View changes
visabhishek’s picture

Issue tags: +PAreview: security
StatusFileSize
new33.68 KB
new24.28 KB

Hi

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:

variable_get('alxs_matrix_background_color', 'FFFFFF'),
variable_get('alxs_matrix_text_color', '008CBA'),
variable_get('alxs_matrix_shadow_color', '000000'),
variable_get('alxs_matrix_code_color', '008CBA'),
variable_get('alxs_matrix_min_velocity', 1),
variable_get('alxs_matrix_max_velocity', 5),
variable_get('alxs_matrix_min_length', 3),
variable_get('alxs_matrix_max_length', 16),
variable_get('alxs_matrix_column_width', 16),
variable_get('alxs_matrix_column_height', 25),
variable_get('alxs_matrix_secret_code', 'Codebusta')
variable_get('alxs_matrix_show_content', 'true'),
variable_get('alxs_matrix_text_content', 'Enter some text here...'),
djalxs’s picture

  1. Fixed XSS issue
  2. Added hook_uninstall() to remove unused variables

For further testing, please also update the jQuery library from my repository.

djalxs’s picture

Status: Needs work » Needs review
Issue tags: -PAreview: security +Fixes Applied
visabhishek’s picture

Issue tags: -Fixes Applied +PAreview: security

Please don't remove the security tag, we keep that for statistics and to show examples of security problems.

djalxs’s picture

Can we take another look at this please.

djalxs’s picture

Anybody?

djalxs’s picture

Status: Needs review » Closed (duplicate)
djalxs’s picture

Status: Closed (duplicate) » Needs review
PA robot’s picture

Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 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.

djalxs’s picture

Status: Needs review » Closed (duplicate)
avpaderno’s picture

Related issues: +#2856112: [D7] Tilt JS