Name of module: Supersized
Sandbox link: http://drupal.org/sandbox/ahlofan/1836214
For Drupal 7
Git clone: git clone http://git.drupal.org/sandbox/ahlofan/1836214.git supersized

This module make it easy to implement Supersized JQuery plugin into Druapl system. All available Supersized JQuery settings are configurable by UI. A field type "Supersized Slide" comes with this module, and obviously, Supersized background slides are managed by fields of node.

Usage

  1. Add a "Supersized Slide" field to any content type, in most of the cases, this would be a multiple value field.
  2. Configure the Supersized options such as transition, interval, etc...
  3. Create a new content and upload beautiful images using the Supersized field.
  4. Yes, there you go! Supersized is just that easy to setup.

Features

  • All Supersized options are configurable by UI.
  • Supersized options can be per field or per node.
  • Context support. Say there is a non-node page that you want to have Supersized on it. You can use this context reaction to assign a node with Supersized to your desire page.
  • All components are wrapped by theme functions to support full creative flexibility.

Reviews of other projects

http://drupal.org/node/1879592#comment-6900750
http://drupal.org/node/1879654#comment-6900838
http://drupal.org/node/1878818#comment-6900940

Comments

dDoak’s picture

Status: Needs review » Needs work

Hi,

Great job.

Please fix as many issues as you can :
http://ventral.org/pareview/httpgitdrupalorgsandboxahlofan1836214git

Manual review :
supersized.module
In theme_supersized_control_bar function, maybe you can use a template rather than using a theme function and use l() function to generate a link markup.

In supersized_page_alter function, try something like this to retrieve node full view mode :

$node = menu_get_object();
if (isset($node->nid)) {
  //ok this is a node page and you don't even have to reload the node
} 

Supersized Jquery plugin has to be considered as a library, so what about installing it in sites/all/libraraies instead of you own module?

Thanks,

ahlofan’s picture

Hi dDoak,

Thank you for for your review and suggestion. I have tried to fix all errors that ventral.org found. Some errors such as exceeded 80 characters, that line is actually an URL, I guess we don't want to cut that into different line. For some others found in the context plugin, I'm trying to follow the standard of the other context plugin I found in the context modules. Is that correct actually?

I have also take your suggestion, control bar is in template instead of just theme function. Loading node by menu_get_object() instead of the messy code I had previously. And most importantly, Supersized JQuery plugin is now using Library instead.

README.txt is also updated corresponding to the changes I made.

Please let me know what else I should do.

ahlofan’s picture

Status: Needs work » Needs review
fr3shw3b’s picture

Hey,

Seems like a great module, It's great you are integrating this for better compatibality with Drupal. It's something i'd definitely use.

First of all there are quite a few issues found here:
http://ventral.org/pareview/httpgitdrupalorgsandboxahlofan1836214git

These are mainly to do with naming conventions.

Another thing i thought would be worth doing for the sake of being tidy and maintaining a structure to put the supersized_context module in a sub-directory.

Another suggestion would be to put the settings forms and other functions in the module in include files so they are only loaded when needed where the function contains a lot of code.

Where you'd have something like:

function supersized_run_supersized($node, &$page) {
  module_load_include('inc', 'supersized', 'supersized.run');
  supersized_run($node, &$page);
}

in the module file.

Then all the code in the function in the supersized_run function in the supersized.run.inc file.

This probably biases more towards a tidier module structure as well.

ahlofan’s picture

Status: Needs review » Needs work

Thank you for you review. Really appreciated :)

For the issues found in ventral.org. I tried my best to correct all of them. Some, I'm not too sure.

FOUND 0 ERROR(S) AND 1 WARNING(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
44 | WARNING | Line exceeds 80 characters; contains 82 characters

This is a line that contain a long URL. I guess I should break it into another line right?

For the 2 context plugin files, I'm following how context module is current doing, For example,
10 | ERROR | Class name must begin with a capital letter

What should I do with these kind of issues?

For the rest, surely will take your suggestion.

ahlofan’s picture

Status: Needs work » Needs review

Thank you for the last 2 reviews. Improved a lot by reviewers' suggestion, hope everything is fine.

monymirza’s picture

Status: Needs review » Needs work

Hi,

"This is a line that contain a long URL. I guess I should break it into another line right?"
please use url shortness service (like bit.ly). it will help you to clear warning.

Also try to clear all other errors and warnings
http://ventral.org/pareview/httpgitdrupalorgsandboxahlofan1836214git

ahlofan’s picture

personally don't think shortening the URL is a good idea, but to fit the requirement, I would do it.

monymirza: as mention, those errors left and found in ventral.org are from are context plugins. It is an inhabitant of context class, so overriding functions name has to be in that way right? Also this is how all the other context plugins get done. Or there is actually some better way which is hidden?

ahlofan’s picture

Status: Needs work » Needs review
ahlofan’s picture

so far I have fixed everything that found in ventral. some remaining in context which i'm actually following how all context plugins. Guess those should be fine I supposed. This module is tested by the community and I fixed bugs that are found. Should I mark this as " reviewed and tested by community"?

fr3shw3b’s picture

Status: Needs review » Reviewed & tested by the community

Hello

and no that's for a reviewer to do.

The issues to do with the naming conventions in the context plugin is indeed the naming convention used by context and lots of successful modules that contain context plugins. As well as this spaces uses the same convention in declaring it's classes.

So that issue isn't so much of an issue.

Manual Review:

- Firstly there is an unneeded declaration of the version in Supersized context module, this is added automatically.

- It is unnecessary to declare file and image as dependencies in the Supersized info file as they are a part of core and are unlikely to be disabled.

- the supersized_node_settings_form function contains a lot of code, I would suggest sticking it in an include file and breaking it down. For good practice and clarity I would suggest having a structure such as this:

-- supersized
---- css
------ supersized-default.css
---- js
------ supersized.js
---- supersized_context
------ supersized_context.module
------ supersized_context.info
------ supersized_context_condition.inc
------ supersized_context_reaction.inc
---- includes
------ supersized.field.inc
------ supersized.run.inc
------ supersized_form.inc
---- templates
------ supersized_control_bar.tpl.php
---- README.txt
---- supersized.info
---- supersized.module
---- supersized.install

- In supersized_context_reaction.inc there is a miss spelling of Supersized in the file doc block. (Suersized)

- within Javascript itself is it not best to use lowerCamel for the function opening the file?

All these things are not major problems. So in my eyes it's RTBC, I suggest you get on the review bonus system though to help with reviewing.

fr3shw3b’s picture

Issue summary: View changes

Make sure its the git clone for public. not the private one.

ahlofan’s picture

Issue summary: View changes

added new review link

ahlofan’s picture

Thank you for you suggestion, and changing this to RTBC. I'm trying to review other projects, just did one. I gotta work hard for this :)

And just wonder, what 's next to make this project to be "full project"?

ahlofan’s picture

Issue summary: View changes

fixed typo

ahlofan’s picture

Issue summary: View changes

add new review

ahlofan’s picture

Issue tags: +PAreview: review bonus

Did some manual reviews, cheers.

fr3shw3b’s picture

A Git Administrator will give you the permissions for creating full projects and to promote sandbox projects once they have reviewed a RTBC and found no major problems.

klausi’s picture

Status: Reviewed & tested by the community » Fixed

manual review:

  1. "require_once drupal_get_path('module', 'supersized') . '/supersized.field.inc';": you are including files from your own module which you already know where they are. Use something like require_once 'mymodule.inc';
  2. supersized_image_default_styles(): shouldn't all text strings in there run through t() for translation?
  3. "module_load_include('inc', 'supersized', 'supersized.run');": no need to use module_load_include as you are including files from your own module which you already know where they are. Use something like require_once 'mymodule.inc';
  4. supersized.module: does your module only work with nodes? Please add that restriction to the README.txt if it applies.
  5. "$plugin = context_get_plugin('reaction', 'am_billboard')": what is am_billboard? Please add a comment.
  6. "3 => 'Slide Right',": all user facing text must run through t() for translation.

Although you should fix those issues they are not application blockers, so ...

Thanks for your contribution, ahlofan!

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 reviewer(s) as well.

ahlofan’s picture

Thank you klausi for you review and updated my account! Also for all the others viewing my project, I have learnt a lot during this process! this is awesome.

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

add new review link