By heck on
hello,
i would like to know how to include jqueryui in every user role, because i think that currently only admin role has jqueryui..
thanks!
hello,
i would like to know how to include jqueryui in every user role, because i think that currently only admin role has jqueryui..
thanks!
Comments
does anyone have any idea on
does anyone have any idea on this matter?
Are you sure you don't have a
Are you sure you don't have a module enabled that's causing this behaviour? The jquery ui components are added by modules that specifically need them, and I guess those modules would make access decisions.
I have a few D7 sites making large use of jquery ui and I haven't had to set any permissions for any of them, they just work for every visitor.
Nope. The problem is, I am
Nope. The problem is, I am the one who declares the need for the jqueryui instance (not by using the drupal function), not my module.
Sorry that doesn't make sense
Sorry that doesn't make sense to me, exactly how are you including jquery ui if you are not using the drupal function and not doing it in a module???
Sorry, let me rephrase my
Sorry, let me rephrase my query here...
I need to have jQuery UI included in every page request (or at least have some rules).
Thanks!
Do you know if it's just the
Do you know if it's just the core UI JS you need or a specific component for every page? If you need the autocomplete component for example you can use something like this in a module file:
Since the base 'ui' component is a dependency of 'ui.autocomplete' that library will be automatically included
Does that help?
Is there such thing as just
Is there such thing as just "ui", like this?
Yep, you can find a full list
Yep, you can find a full list of them in the system_library() function: http://api.drupal.org/api/drupal/modules--system--system.module/function...
Thank you very much! =)
Thank you very much! =)
I assume this will fix my problem in placing jqeryui in every page..
Unfortunately, I still can't
Unfortunately, I still can't include jQuery UI in all of my pages (when I'm logged out)
I've just checked and
I've just checked and confirmed that the following code will 100% definitely include jQuery UI (in my case found at misc/ui/jquery.ui.core.min.js?v=1.8.7) on every page, regardless of whether a user is logged in or not. If it doesn't work then you must have another module installed that's stopping that particular file being included when a user is not logged in. Just to clarify, drupal_add_library does no user access checking so can't possibly fail to add the javascript if it's called in hook_init().
Hope that helps
Where on my site do I put this code?
Where on my site do I put this code? I want the UI to load on every page as I am utilising it in a sitewide block as well as nodes
Thanks
In a custom module, in a
In a custom module, in a hook_init() function
Absolutely no idea how to do
Absolutely no idea how to do this and no time to learn yet as i'm in the middle of a production website
Also you can add this code to
Also you can add this code to some function in template.php file of current theme (if you want to load JQuery UI for all pages), for example in
function phptemplate_preprocess_html()orfunction phptemplate_process_page.not worked
i test this but not working for me,
to add library you need to sepecify which library you want to add like this
I have be born to be mankind
Old thread, but maybe this
Old thread, but maybe this helps: you can also just paste the code in the preprocess_html function of your template.php
drupal_add_library has option to include that library for every
In the third argument if you will pass "$every_page = TRUE" then it will be included for all the pages.
drupal_add_library('system', 'ui.sortable', $every_page = TRUE).
For more details : https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_...