0

Good day

I only have access to my Drupal site's admin panel, not the ftp server. Now how can I upload a jQuery plugin, for example an image slider (with the js and css files) onto the site using the admin panel? Note that the plugin is not part of the theme.

As I understand you need to add it on your theme's .info file:

scripts[] = js/my_jquery_plugin.js

BUT, is that file only accessible via ftp?

How can I do this using the admin panel?

Thank You

1

I don't think you can do it that way. You can always do it quick and dirty, depending on how it's written.

If it's your own code, wrap it in the following and throw it in a block:

(function ($) {
    // in this function, you can use the $ which refers to the jQuery object
}(jQuery));

Or you can try creating a generic file content type with a file attachment, upload the .js into the public directory, then make a new block with a PHP filter and use drupal_add_js() and load in that file.

  • Thank you. But not on your page. Firstly: "block:" - What are you referring to? Is the block inside drupal? Are you talking about the HTML editor? Also, you are talking about the public directory - I do not have ftp access, only administrator rights on the site: mysite.com/admin – DextrousDave Feb 12 '13 at 8:06
  • As I understand, you can upload modules. this is from the Nivo Slider's documentation: "Download and unpack the Media Nivo Slider module into your modules directory"... – DextrousDave Feb 12 '13 at 8:08
0

Ok I see that you can actually install a module right from the admin panel. Just go to modules>Install new module and select a url file or browse from files

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.