this module provide field display fomate as 360 degree sildeshow/image rotate with power of jquery.
easy to use easy configration.
use full for commerce and online shopping sites product display.

field slide show j360

Requirements

Libraries

drupal_threesixty_slider jqury library this is a drupal version of threesixty-slider.
(For using 3rd party code: for approval you will see author add my module link at original repository page.)

==============
Installation
==============

1. Download Require module Libraries and Extract the contents of this project into sites/all/modules/
2. Download Field slideshow j360 and Extract the contents of this project into sites/all/modules/
3. Download jquery librayr drupal_threesixty_slider and Extract the contents of this library sites/all/libraries/drupal_threesixty_slider
js library path look like sites/all/libraries/drupal_threesixty_slider/drupal_threesixty_slider.js

4. Enable modules

===============
Configuration
===============

You must have a content type with a field of type "Image" with the possibility
to upload an unlimited number of images.
now go for display settings and select "Slideshow j360" for you field and set hieght and width as your theme requiered and set navigation display or not.
you are done.

===============
Importent Note
===============

This functionality/module required a set of sequins images.
If you see your images rotate opposite side of navigation then Edite you node and change you images upload sequins.
like before
image_1 ,
image_2 ,
image_3 ,
image_4 ,
image_5

after

image_5 ,
image_4 ,
image_3 ,
image_2 ,
image_1

===============
Related projects
===============
https://drupal.org/project/views_slideshow_j360
This module have many requirements.
works only in views.
hard to configure.

field slide show j360 has easy configuration also not much Requirements.
use full and easy to control for your client or site's content editor.

Project page: https://drupal.org/sandbox/coderider/2274229
Git clone: git clone http://git.drupal.org/sandbox/coderider/2274229.git field_slide_show_j360
Drupal version: 7,

Reviews of other projects:

Reviews of other projects:
review bonus 2

Reviewers note: i have uploaded a set of images in required git repository for testing and review purpose.
all reviewers no need to find sequins images for testing this module now.

CommentFileSizeAuthor
#25 error_1.png15.72 KBcoderider
#23 erro1.png9.85 KBcoderider

Comments

brice_gato’s picture

PA robot’s picture

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.

brice_gato’s picture

Status: Needs review » Needs work
coderider’s picture

Issue summary: View changes
coderider’s picture

Fixed the All coding standards issues.

coderider’s picture

Status: Needs work » Needs review
coderider’s picture

Issue summary: View changes
gwprod’s picture

Your git command is not in the correct format.

Like this: git clone http://git.drupal.org/sandbox/gwprod/2298383.git

It doesn't hurt to make things easier on volunteer reviewers.

skh’s picture

Wrong page, sorry!

coderider’s picture

Issue summary: View changes
coderider’s picture

git command in updated

gwprod’s picture

@coderider it is still wrong.

coderider’s picture

i changed
git clone --branch 7.x-1.x coderider@git.drupal.org:sandbox/coderider/2274229.git
to
git clone coderider@git.drupal.org:sandbox/coderider/2274229.git
now to
git clone coderider@git.drupal.org:sandbox/coderider/2274229.git field_slide_show_j360

coderider’s picture

Issue summary: View changes
gwprod’s picture

Your git command is still wrong.

You cannot use a command in the format username@git.drupal.org:sandbox/username/repo

It must be in the format http://git.drupal.org/sandbox/username/repo

coderider’s picture

Issue summary: View changes
coderider’s picture

updated now
oppss really sorry about that. i just test those commands at my git as login user for my repo

coderider’s picture

Issue summary: View changes
coderider’s picture

Issue summary: View changes
coderider’s picture

Issue tags: +PAreview: review bonus
gwprod’s picture

Issue summary: View changes
ethant’s picture

Status: Needs review » Needs work

1) PAReview is clear

2) Functionally: Module does not install via:

drush en field_slideshow_j360

Throws this error:

Module field_slide_show_j360 doesn't meet the requirements to be enabled.                                    [error]
Field slide show j360 require drupal_threesixty_slider. You must download drupal_threesixty_slider. Go to    [error]
download link
You must download drupal_threesixty_slider. Go to download link (Currently using drupal_threesixty_slider    [error]
Field slide show j360 require drupal_threesixty_slider)

You need to add a link to the library.

3) Several formatting issues in trigger.js that PAReview isn't detecting - they don't affect functionality, but an fyi that this something you should correct to make this file more uniform and readable.

coderider’s picture

StatusFileSize
new9.85 KB

Thanks EthatT ti review my project and mention these things.
library error
i test library error text Go to download link is linked to direct download URL.
is this incorrect format?
and you want print URL like
https://github.com/code-rider/drupal-threesixty-slider/archive/master.zip
please make clear.
thanks!

for other issues i am working on.

coderider’s picture

coderider’s picture

StatusFileSize
new15.72 KB
ethant’s picture

Status: Needs work » Needs review

It would be nice if you could integrate Drush so that required libraries would automatically be downloaded and installed, or at least create a message for drush users that is more meaningful. Example: http://cgit.drupalcode.org/modernizr/tree/drush/modernizr.drush.inc
But, I'm gonna reverse my original position that drush installation failing is a showstopper - even though it is the defacto drupal dev tool, requiring a module to work with it is not a requirement (at least as far as I know / have read).

pingwin4eg’s picture

Status: Needs review » Needs work

Hi! A couple of helpful hints on the code:

  • field_slide_show_j360.module:52
    You should use the matching Drupal theme functions, not raw HTML.
            'data' => '<img src="' . url('sites/default/files/' . file_uri_target($item['uri']), array('absolute' => TRUE)) . '" alt="' . $item['alt'] . '" />',
  • field_slide_show_j360.install:22
    You use translation for a machine name 'drupal_threesixty_slider'. Is there any reason for that?
  • field_slide_show_j360.install:59
    The $message argument of watchdog() function should be untranslated string. Drupal stores the log message in English, and automatically translates it at display time.
  • field_slide_show_j360.install:46
      variable_set('field_slide_show_j360_installation_result', 'clean');
      if (variable_get('field_slide_show_j360_installation_result') != 'clean') {

    What is the reason to check the var you just set?

  • js/trigger.js and theme/images_rotate.tpl.php:
    Incorrect syntax of @file doc block. Refer to https://www.drupal.org/node/1354#files
  • theme/images_rotate.tpl.php:
    You should document available to the template variables.
  • theme/images_rotate.tpl.php:7
    Do not use explicit HTML id attribute in template. IDs should be unique on the page, and 'container' ID can be used by another element or even by this template more than one time if it renders more than once on the page. Use class instead, or generate an unique id dynamically in preprocess/process function.

You can check and correct your code yourself and also improve your Drupal developing skills by using Coder Review module.

coderider’s picture

Status: Needs work » Needs review

Thank you guys to review my project and giving me great tips.
Thank you Ethan to set it back to needs/ review i have done code formatting changes as mention you and pingwin4eg and now i will work on drush commands as you say.
so as you say it is not a requirement i am going to set status back to need reviews.
thanks again

pushpinderchauhan’s picture

@coderider, thank you for contribution!

Here are some more code related tips for you.

1. In field_slide_show_j360.install file, at line 51 you have used following line.

variable_set('field_slide_show_j360_installation_result', 'dirty');

Not sure what is the benefit of variable_set() here, when you already set the message(drupal_set_message).

2. In field_slide_show_j360.module file, at line 67&69 return $element; is defined twice but you can defined it only once. You can remove 67 line return statement.

3. In same file at line 127, you are using following code:

if (isset($map[$key]['map']) && isset($map[$key]['map'][$value])) {
        $value = $map[$key]['map'][$value];
      }
      $summary[] = $title . ': ' . $value;

It should be:

if (isset($map[$key]['map'][$value])) {
   $value = $map[$key]['map'][$value];
   $summary[] = $title . ': ' . $value;
}

I think these need to be fixed before moving to RTBC.

Thanks again!

klausi’s picture

Issue summary: View changes
Issue tags: -PAreview: review bonus

Removing review bonus tag, you have not done all manual reviews, you just repeated the output of an automated review tool. Make sure to read through the source code of the other projects, as requested on the review bonus page.

coderider’s picture

thanks er.pushpinderrana for givin me nice tip

  • 1. In field_slide_show_j360.install file, at line 51 you have used following line. // done
  • 3. in same file at line 127, you are using following code: // done

and about 2. In field_slide_show_j360.module file, at line 67&69

?php
 return $element; 
?>

is defined twice but you can defined it only once. You can remove 67 line return statement.

its just inside and outside of the condition
just like

if(display == my project display){
return $element; // its processed and holding many thing
}
return $element; // this is without any process and i think need to return for others 
coderider’s picture

Issue summary: View changes
coderider’s picture

Issue summary: View changes
coderider’s picture

Hi Klausi i have done my 6 manual project reviews i need my issue tag PAReview: review bonus back.

coderider’s picture

Issue tags: +PAreview: review bonus

Added tag: PAReviews: review bonus 2

pushpinderchauhan’s picture

@coderider, some minor suggestions.

1. Remove following unused code from .install file, if it is not required.

/**
 * Implements hook_install().
 */
function field_slide_show_j360_install() {
  // drupal_set_message('field slide show j360.');
}

2.

You can remove 67 line return statement.

its just inside and outside of the condition

If it comes inside if statement then it would also come outsides this if statement and $element will return through external return. There is no need to use two return statement here, do remove line 67 return statement.

3. hook_help() is missing in your module.

4. spelling mistake in following line in README.txt file.

now go for display settings and select "Xulu 3D image rotator"
for you field and set height and width as your theme requiered.

As there is no blocker from my side, so not moving to "Need Work" but above issues are required to fix before moving to RTBC.

Thank you for your contribution.

coderider’s picture

@er.pushpinderrana thank you for important comments and suggestions.
also thanks to make me clear about point 2.
your all suggestions are fulfill.

laceysanderson’s picture

Status: Needs review » Needs work

Automated Review still comes back clean even after all the changes I can see you made :)

Manual Review:

Code-Related

  1. (*) In hook_libraries_info(). I see you set the library version directly rather than providing a version callback. According to the documentation for the libraries module "version callback" is highly recommended and "version" should only be used if there is no way to automatically detect the version. Since I see you are the author of the library I suggest adding the version to the library such that you can detect it programatically.
  2. You code is quite condensed and does not contain very many in-line comments. It's recommended that you have a balanced number of comments explaining your code and some well-placed empty lines would greatly improve readability.
  3. On line 19 of images_rotate.tpl.php you don't adhere to the max 80 character length coding standard. This could be made more readable by defining a php array near the top of the file containing all the classes for the
      element, then on line 19 you could simply have an implode call.
  4. (*) You README is quite sparse. Specifically, you are missing an introduction (required) & Requirements (required). Also, in the installation section you should include instructions for including the library (perhaps just a link to drupal.org documentation on installing libraries). See the README Template for additional help and examples.

Installation-Related

(*) When I git cloned the library you linked to it created both the directory & filename (drupal-threesixty-slider.js) using dashes instead of underscores. This blocked installation of your module since the file wasn't recognized by your module. Making me change the folder name is fine but making your users rename library files to get them detected by your module seems like a bit much to expect. Additionally, even once I had renamed both the folder and the file, installation still failed due to requirements.

Note, I consider (*) comments above to be major whereas the others are just suggestions :)

coderider’s picture

Status: Needs work » Needs review

@laceysanderson thanks thank you for important comments , suggestions and tips.

  1. (*) In hook_libraries_info(). I see you set the library version directly rather than providing a version callback.
    version callback: add
  2. You code is quite condensed and does not contain very many in-line comments.
    inline comments: add hope that helps in reading the code.
  3. On line 19 of images_rotate.tpl.php you don't adhere to the max 80 character.
    implode function: add
  4. (*) You README is quite sparse. Specifically, you are missing an introduction.
    README: updated
  5. (*) When I git cloned the library you linked to it created both the directory & filename (drupal-threesixty-slider.js) using dashes instead of underscores
    library: library name is updated also version is add into library file and also version branch created instead of master branch
mpdonadio’s picture

Status: Needs review » Needs work
Issue tags: +PAreview: security

Automated Review

Review of the 7.x-1.x branch (commit 0eddc9b):

  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements
3rd party code
Yes: Follows the guidelines for 3rd party code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
No. If "no", list security issues identified.

The field settings are XSS prone. Even though you have a length on these, they are alterable. The width and height go straight from input to output
in the summary. Dont' do the loop. Just build up the summary manually. Use placeholders with t() for the settings (this will plain it).

These also go straight to output in the template. Instead of passing all of the settings to the theme function, break them out into separate keys. Then check_plain()
them.

See https://www.drupal.org/node/28984 for more info.

Coding style & Drupal API usage

It's probably premature to have version tags in the repo.

Why do you have a behavior that sets an explicit onload? You need to wait for the images to load in? Will this be AJAX friendly? Comment needed.

Your JS needs to use the context that was passed in via the behavior.

There is no hook_install_error in Drupal 7.

There is no hook_get_version(). This is the version callback for the hook_libraries_info().

In field_slide_show_j360_field_formatter_view(), using #attached is preferred over directly using drupal_add_css() and drupal_add_js().

You don't need to build up markup in field_slide_show_j360_field_formatter_view(). Build up a renderable element and put that into the element.

Your template, CSS, and JS files should all be namespaced to your module.

(*) I got a JS error on line 48 when I tried to test this.

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

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

This review uses the Project Application Review Template.

coderider’s picture

Status: Needs work » Needs review

@mpdonadio thank you for important comments , suggestions and tips.
Secure code
recommendation 1 and 2 are full filled.
Coding style & Drupal API usage
Why do you have a behavior that sets an explicit onload? You need to wait for the images to load in? Will this be AJAX friendly? Comment needed.

//comments
on my javascript fire we extract all images from list and store in a variable and then rebuild image list with processed images.
so if we wait for images load then its display should like this once images load and display for a while and after images load js will be fired and images should removed and rebuild again as image rotator.

There is no hook_install_error in Drupal 7.
function removed.

There is no hook_get_version(). This is the version callback for the hook_libraries_info().
function comments are changed.

In field_slide_show_j360_field_formatter_view(), using #attached is preferred over directly using drupal_add_css() and drupal_add_js().
#attached in now applied. drupal_add_css() and drupal_add_js(). are removed.

(*) I got a JS error on line 48 when I tried to test this.
i cant see like this but for testing purpose i test it with fresh environment
Drupal core 7.31
Libraries API 7.x-2.2
but no error fond
if still you got then please note down error text thanks.

so for now i am going to set this application as needs review
for more reviewers check about this error.

klausi’s picture

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

Review of the 7.x-1.x branch (commit 184489a):

  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
    FILE: /home/klausi/pareview_temp/field_slide_show_j360.module
    --------------------------------------------------------------------------------
    FOUND 4 ERRORS AFFECTING 3 LINES
    --------------------------------------------------------------------------------
     92 | ERROR | Additional blank lines found at end of doc comment
     93 | ERROR | Type hint "array" missing for $library
     93 | ERROR | Type hint "array" missing for $options
     99 | ERROR | Function return type is not void, but function is returning void
        |       | here
    --------------------------------------------------------------------------------
    
  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

manual review:

  • there is still the #markup used in field_slide_show_j360_field_formatter_view() instead of just putting #theme and the variables in there.

But otherwise looks RTBC to me. Assigning to mpdonadio as he might have time to take a final look at this.

mpdonadio’s picture

Assigned: mpdonadio » Unassigned

Manual review of 7.x-1.x 184489a.

My security issues from #40 look good now, and I read the diff from my last review and went through it again.

I still agree the minor recommendations that weren't done.

The summary in field_slide_show_j360_field_formatter_settings_summary() should use t() w/ placeholders. Right now, the strings are untranslated. t() w/ @ pr % placeholders will plain for you.

You have some spelling errors here and there. Some IDEs will spellcheck for you (PHPStorm does).

Not seeing anything major to prevent approval.

mpdonadio’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your contribution, coderider!

I updated your account so you can 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 stay 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.

coderider’s picture

Thank you All reviewers for the review(s).

field slide show j360 has now an official 7.x-1.1 release!
For futher information see the project page at https://www.drupal.org/project/field_slide_show_j360

it was great experience in the approval process.
i learn many thing from experienced developers in this process.
especially i improve my coding style and drupal API knowledge.
and feeling very good to pass out from this session.

Once again thank you all and thank you Drupal.

I'll be back with a new project :-)

and 'll be involved in this review process as a reviewer .

Thanks!

Status: Fixed » Closed (fixed)

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