If you're only ever using a library within a single component then there's no reason not to include it in a folder in the component - this is the way that distributed components will generally handle it. That being said, you can put anything you like in the libraries folder and Joomla won't mind, the issue is how you go about loading the classes. Joomla ...
Sure. For example, create mylib folder in /library, and a file Myclass.php with the following content:
You can register your namespace with
JLoader::registerNamespace('mylib', JPATH_ROOT . '/libraries');
And access your class with \mylib\Myclass. Personally, I create a system plugin to do it automatically:
Create a folder structure like so:
Then in your my_library.xml file, add the following
<?xml version="1.0" encoding="utf-8"?>
<extension type="library" method="upgrade" version="3.4">
Use JLoader::registerNamespace() to register this library's namespace. This should work for you current folder structure:
JLoader::registerNamespace('EmailReplyParser\\Parser', __DIR__, false, false, 'psr0');
Or you can use the included autoloader:
require_once __DIR__ . '/autoload.php';
Then add import statements before using the classes:
You can override the JForm class with your own version in one of two ways:
Via a System plugin that triggers onAfterInitialise():
* Registers core library overrides.
* @return void
public function onAfterInitialise()
// Override /libraries/joomla/form/form.php
JLoader::register('JForm', JPATH_LIBRARIES . '/core-...
No (as far as I know), but you can register your lib through a plugin and plugins can have config manifests:
I would just load the lib into my component and would set params there.
If the external resource is just 1 file (even if it has a minified version with it), I would place it directly in the /assets/js directory. If the resource is a collection of 2 or more files, I would give it a subdirectory within the /assets/js directory.
This is just personal opinion since in many years of joomla experience I've never come across definitive ...
Without knowing what errors you're getting or what your Joomla code looks like I can only think of two potential issues.
First is the unnecessary and wrong use of namespace declaration. If you add it to your controller class file, your controller class will no longer be found by Joomla. Another issue could be related to relative paths. As good practice you ...
First of all, you're using different file structure and class naming conventions than Joomla! core. This won't work without rewriting related methods such as controller's getView().
That said, using standard naming conventions, I was able to get this to work by setting base_path option when fetching the controller in component's entry file:
$controller = ...
If you want to distribute your module so that other people can use it, then you should keep flexibility in mind. In that case the best practice would be to put images, script and CSS style sheets in their own extension folder in Joomla's /media/mod_yourmodule/js/. The media folder is used for files that are served by components, modules and plugins and can ...
That doc page references a dead version of the project (joomla/joomla-framework which hasn't seen activity for a half-decade or more) which is a good indication that the rest of it is outdated as well. The current project files are at https://github.com/joomla-framework and the official site is https://framework.joomla.org
For a current example application, ...
Just curious, but what's the issue with breaking it up? Seems to me it's much better programming practice and better for tracking down issues to not have to dig past 17 other classes to find that one that's causing a problem, so I'm curious what the reasons might be for not doing that.
Aside from that, I think the syntax you're after is:
To get the current version, you need to get the vesion from the #__extensions table and compare them. This is the script I wrote for my extensions...I've dded some comments in there to help you:
protected $release = '';
protected $extension = 'lib_mylibrary';
public function preflight($type, $parent)
Assuming core files have not been modified it should be safe to reinstall the Joomla files. Ideally, run a backup before you start in case anything goes wrong.
I highly recommend upgrading to the latest version of Joomla (currently 3.6.4) where the Joomla Update component has an option to reinstall core files (this feature was added around Joomla 3.6.0).
Popup windows are part of core Joomla.
What you need to do to activate functionality is:
"a.popuplink" can be replaced by any jQuery selector.
Script used by Joomla is squeezbox.
Also 3+ versions of Joomla you can use bootstrap modals, but it will be a little bit mode complicated.
anywhere in your ...