Search code examples
javascriptjqueryfiledrupal-7directory

Creating a directory and storing a javascript file in drupal 7


I am facing confusion in creating a directory. I am trying to install a module in drupal 7 with the name - View Slideshow. It requires some prior installations.

Here is the website that gives the instructions ->

https://www.drupal.org/docs/7/modules/views-slideshow/installation-requirements

Here it is written that ->

Create a directory within sites/all/libraries named jquery.cycle and save the jQuery.Cycle JavaScript file there.

So does it mean i need to create a folder with the name jquery.cycle and store the code of jQuery.Cycle JavaScript file in the jquery.cycle folder with the same name as jquery.cycle ?

It would become

 sites/all/libraries/jquery.cycle/jquery.cycle ?

Please help . I don't understand what will be the name of the folder and what will be the name of the file inside that folder ?


Solution

  • To answer You question It was all documented there clearly, but for your understanding I can sort it down.

    This is for manual installation only:

    1. Make sure all the three required modules are installed.

    Navigate into sites/all/libraries this should be default drupal folder structure.

    If you don't have a folder like above create one.

    2. Inside the folder libraries you need to create individual folders like jQuery.Cycle jquery.easing note these are individual folder names.

    It should look like:

    sites/all/libraries/jQuery.Cycle

    sites/all/libraries/jquery.easing

    Imagine you are inside sites/all/libraries/jQuery.Cycle folder

    Raw javascript file can be copied from the link they have given jQuery.Cycle JavaScript file copy the whole page and paste into a file This file should be named jQuery.Cycle.js

    Finally you end up like this: sites/all/libraries/jQuery.Cycle/jQuery.Cycle.js

    If you prefer to get all plugin files instead of only javascript files, you can follow the links to get all files.