5 votes
Accepted

Using external library with a component

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 ...
user avatar
  • 3,134
5 votes
Accepted

Is it possbile to create custom library with namespace

Sure. For example, create mylib folder in /library, and a file Myclass.php with the following content: namespace mylib; class Myclass { } You can register your namespace with JLoader::...
user avatar
  • 471
4 votes
Accepted

Manifest file format for installing a Library package

Create a folder structure like so: /my_library.xml /my_library file_1 file_2 etc Then in your my_library.xml file, add the following <?xml version="1.0" encoding="utf-8"?> <extension ...
user avatar
  • 26.4k
3 votes
Accepted

How to use external PHP library in Joomla! CLI application - Class not found

Use JLoader::registerNamespace() to register this library's namespace. This should work for you current folder structure: JLoader::registerNamespace('EmailReplyParser\\Parser', __DIR__, false, false, ...
user avatar
  • 8,222
2 votes

Edit Joomla 3.x library file (to customize form validation error messages)

You can override the JForm class with your own version in one of two ways: System Plugin Via a System plugin that triggers onAfterInitialise(): /** * Registers core library overrides. * * @return ...
user avatar
  • 890
2 votes
Accepted

Including extension configuration for a library

No (as far as I know), but you can register your lib through a plugin and plugins can have config manifests: https://docs.joomla.org/Using_own_library_in_your_extensions I would just load the lib ...
user avatar
2 votes

What directory should contain GPL scripts from external source? Best practice?

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 ...
user avatar
1 vote

How to find what is dependent on a particular library?

There may be more elegant solutions to this question but you could use grep or similar to search all the files on the website for references to the library. If you don't have direct access to a ...
user avatar
1 vote
Accepted

How to use 3rd party libraries with a Namespace?

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 ...
user avatar
  • 8,222
1 vote

Sharing a MVC resources library between two components

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 ...
user avatar
  • 8,222
1 vote

What directory should contain GPL scripts from external source? Best practice?

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 ...
user avatar
  • 1,313
1 vote
Accepted

Joomla Framework folder "libraries" missing

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....
user avatar
  • 802
1 vote
Accepted

Creating a Library with multiple classes within a single file

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 ...
user avatar
  • 802
1 vote
Accepted

How stop update/installation by install script and mantain actual folder?

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: ...
user avatar
  • 26.4k
1 vote

Joomla got hacked. Is it safe to replace the entire library directory

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 ...
user avatar
1 vote

Popup window for a custom backend button

Popup windows are part of core Joomla. What you need to do to activate functionality is: JHtml::_('behavior.modal','a.popuplink'); "a.popuplink" can be replaced by any jQuery selector. Script used ...
user avatar
  • 1,120

Only top scored, non community-wiki answers of a minimum length are eligible