Im creating a custom template for joomla 2.5 and I want to know if is it safe to disable mootools for my template?
If its safe, how can I disable mootools?
You can find several extensions that disable MooTools in the Core Enhancements/Performance section of the Joomla! Extension Directory (JED)
As mentioned already it is safe to do it as MooTools is only really required for the Joomla! 2.5.x backend i.e. /administrator.
Having said that you should be aware that some aspects of Joomla! 2.5 front-end do require MooTools to be loaded and many extensions "expect" it to be there (although they are not particularly good ones).
Generally Mootools is loaded by a PHP call of the form JHTML::_('behavior.mootools'); or JHTML::_('behavior.framework')
Core elements that load MooTools in the front-end include:
Contacts (com_contact)
Content (com_content in the blog, category views)
Advanced Search (com_finder)
Newsfeeds (com_newsfeeds)
Weblinks (com_weblinks)
Popular third party components that use it in the front-end include:
1. RokGallery — infact a lot of their stuff prior to RokSprocket
2. Akeeba Subscriptions
3. Akeeba Release System
4. and many others...
The thing to remember is MooTools has been in the 'core' for a long time and developers expect it to be there, rightly or not, so, you will have to check any extensions and see if any core components are impacted adversely when you do remove it.
To add to cppl answer:
As far as I know, every library in Joomla is/should loaded only when it's required.
If MooTools loaded on your site, some extension/ core functionality is using it so if you just remove it, some things may break.
What you can do:
Inspect the code that's using MooTools
If it's inline code, probably you may overwrite it using template overwrites to use jQuery
If there's a library (like validate.js) you can provide alternative libraries (utilizing jQuery), put these in /templates/[your_template/js/system/ folder.
Removing MooTools and loading jQuery would make perfect sense than.
Judging by the number of extensions that do this, I'd say it's not only safe, but often desirable.
http://extensions.joomla.org/extensions/core-enhancements/performance/mootools
Related
Since, I believe, the 3.5 update a site I manage has exhibited some odd behavior. One of the issues is the Custom Contact Form Plugin (this Advanced Sensors branch was written specifically for the site) is having trouble including some JavaScript it needs.
As seen in the plugin's base file...
/**
* Defer loading of JS until later in the execution cycle
*/
function onBeforeRender()
{
$this->doc->addScript(JURI::base(true) . '/media/plg_customcontactform/js/form-actions.min.js');
}
When "Conservative caching" is enabled (as it has been for years) the JavaScript file is included only on the initial load. Subsequent page refreshes do not include the file in the list of resources at the top of the page.
After not finding anything on here or in Google searches (nor in the list of issues for the project) I started throwing proverbial darts at the code with no success. The creator of the plugin has been away from Joomla for a while so I thought I'd see if anyone here has more knowledge of the inner workings of Joomla and can help me sort this out. For now I have caching disabled. Thanks!
I was having exactly the same problem, I'm using a RSForms Pro, and the forms are added to pages via modules. After pinpointing that the cause as was related to caching the solution was easy enough:
module manager > module > advanced > caching > no caching
You mention you're using a plugin so you have less control unfortunately.
One option could be a caching component or plugin like JotCache or CacheContol, both of which will give you greater control of what get's cached
Or if you have enabled
extensions > plugins > System - Page Cache
you can specify menu items or page urls which you don't want to be cached, this might work. These options are new, and are included with recent Joomla updates.
Good luck!
How can I disable Mootools in Joomla 3.2 without hacking core files? I have already tested this link, but it does not work for me.
Simple way is edit your templates not to include it but some things still require it.
http://pbwebdev.com/blog/removing-mootools-core-js-caption-js-joomla
Newer versions of 3.2.3 remove the tooltip js that was built in mootools but earlier ones will give you a console error if you have forms using it for the tip on the input label.
Also Kunena Forum uses mootools for the profiles and post edit tools, so I tend to write code that just includes it there.
Outside that there are plugins in the JED
http://extensions.joomla.org/extensions/core-enhancements/performance/mootools/22236
I found this page on docs.joomla.org helpful. I was using JHtml::_('behavior.framework') which loads mootools.
Just trying to understand the working of com_content component in Joomla 3. Is it possible to disable or uninstall com_content component? Is it a core component that is essential for the functioning of the entire framework, so it cannot be removed?
You can't disable or uninstall any core components such as com_content. They are protected. I'm not sure of the exact things that require com_content, however completely removing it which would have to be done by deleting the folders and removing any reference to it in the database could possibly and most likely result your site malfunctioning. It's therefore protected for good reason ;)
I do know that in either Joomla 3.5 or 4.0, there will be an option to install core components with installing Joomla.
While there might be some benefits in making Joomla lighter, in the current configuration I would say that IS NOT RECOMMENDED to even try something.
Consider using ACL to hide it for the users that don't need it.
I need to have several textfields (may be articles, but not neccessarily) on a page, that is easily edited from frontend for registered users.
How do I best achieve this?
It is for Joomla 3.1
You can go several ways:
Use a cck: this is the easiest, no coding required, browse the JED for Sobi, K2, Zoo, Content builder...
Write a simple component: using componentbuilder or the like it won't take long and you'll only need to write very little code if this is the only requirement.
Upgrade to J3.2 and use the bundled FOF (by akeeba, introduced in Joomla core as of 3.2); Joomla! 3.2 will be available in 3 days, but you can already download the beta. With FOF you can achieve much the same as 2. by writing a simple xml file.
Depending on what you plan to do with this data, and your coding skills, the right answer may be any of the above.
I had an issues with some joomla api. The issue was that I was using the latest version of joomla and couldn't find where a joomla class, that was being called in my code, was derived . I searched the joomla api docs and found nothing relating to the class I was looking for.
I then stumbled across the refactoring change log for joomla and noticed that the function i was after had actually been moved from /libraries/joomla/form to libraries/cms/form.
Why would this be the case? There doesn't seem to be any reference to /libraries/cms in the api docs. How are we suppose to know that there are classes living there? Very confusing.
Since Joomla! 1.6 the code has been progressively split into the Joomla! CMS and the Joomla! Platform. You can see this separation in the github repository - a good place to also keep track of changes that are committed to both the CMS and the Platform. The simplest way is fork each repository and keep track of them.
As classes are updated they may be migrated to the /libraries/cms directory if they apply specifically to the CMS application (e.g. html forms are an application level function not a platform level).
I find the best place to hear about changes under discussion are in the respective Google Groups - Joomla! Platform Development and Joomla! CMS Development
[Edit]
Documentation of class's is the hardest thing to find for Joomla! CMS - there doesn't appear to be a current api listing for it, unlike the Platform API reference. Often it is just easier to read through the code.
It's also worth keeping a watch on the developer sub-site.
If you want to define excellence in CMS without coding, Joomla is the right option for you.Joomla the most preferred content management system among developers is an easy-to-use open source solution.If you want to define excellence in CMS without coding, Joomla is the right option for you. In this post, you will find few of its features that make the website development easy and most preferred option for developers.