Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2013
    Posts
    38
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Plugins and file structure

    Hello, in my site I'm installing this classic plugin: http://lokeshdhakar.com/projects/lightbox2/

    My site is d.i.y., (no cms), and my questions is about file structure. I have folders for both css files and js scripts. The plugin comes with both js and css files. Is it better to:
    a) Leave the plugin's css and js files all in one folder (thus keeping the components of the plugin together), or
    b) Put the plugin's css files in my css folder, and the js files in my js folder (splitting up the plugin's component files, but potentially keeping my folder system cleaner.)

    Thanks for your thoughts!

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,695
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    That’s totally personal preference and up to you. I tend to adapt external plugins to my file structure, i. e. the JS files in the JS directory, and CSS files in the CSS directory. However, when there are images with the plugin then I’m usually keeping those where the paths in the CSS file are specifiying them. I’ve used Colorbox in the past and there the images were in a directory directly one level below the CSS file. So, while I usually have the images directory on the same level as the CSS directory in this case I put the images into the CSS directory because I was too lazy to change all the file paths in the CSS.

    But again, it’s totally up to your personal preference.

  • #3
    New Coder
    Join Date
    Jun 2013
    Posts
    38
    Thanks
    5
    Thanked 0 Times in 0 Posts
    I see. It does seem to me like locating/maintaining the file paths could be the deciding factor on this one.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •