5 votes
Accepted

How to add a composer package without modifying the core composer.json file

I suspect that modifying Joomla's root composer.json file will come with Joomla 4. In the meantime, I think the best way to use composer packages is to include a composer.phar in a custom system ...
jamesgarrett's user avatar
  • 3,299
5 votes

How to reverse-engineer a 3rd party Joomla extension to clone it and to be able to make modifications to it?

Normally a template should deal with the layout and the presentational elements. Having said that, I have to say that I haven't seen any template (including quickstart packages) coming with ...
FFrewin's user avatar
  • 19.7k
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 ...
jamesgarrett's user avatar
  • 3,299
5 votes

Component Development PHP Version Check

Lots of components have a check like that. Here's the top of admin tools core install script eg. protected $minimumPHPVersion = '5.3.3'; public function preflight($type, $parent) { // ...
jamesgarrett's user avatar
  • 3,299
5 votes
Accepted

How is the relationship between template styles and menus stored in Joomla 3.x?

template_style_id column in #__menu table.
Sharky's user avatar
  • 11.2k
5 votes
Accepted

Why is my plugin not hooking into events?

Plugin class name must match the plugin name defined in manifest file. If you have this in the manifest: <filename plugin="installer_log">installer_log.php</filename> Then class name ...
Sharky's user avatar
  • 11.2k
4 votes

Available fields in Joomla XML manifest

There is also one other neat trick - when using Radio buttons, you can add Bootstrap class and they will look nicer. Look for class attribute in this code: <field name="some-choices" type="radio" ...
Vladimir Jovanović's user avatar
4 votes
Accepted

How to automatically create the installation zip archive of a Joomla extension?

You can try a (free) component called JDeveloper. It's mainly for extension development, but it also has a function to create and download a zip-file from any existing Joomla extension. Just install ...
johanpw's user avatar
  • 13.3k
4 votes
Accepted

Get Title from ID

You could try something like the following: public function onYOURFUNCTION($context, &$article, &$params) { $id = JFactory::getApplication()->input->getInt('id'); $load = $...
Lodder's user avatar
  • 26.9k
4 votes

How to use Github as an auto-update deployment server for Joomla 3.x extension

Have a look at the Weblinks repo It does exactly what you want to do. The updateserver points to the manifest hosted on that repo. Download packages are served from the repo as well. Of course you ...
Bakual's user avatar
  • 5,582
4 votes
Accepted

Errors de-crypting libsodium encrypted values from database

This works fine with a simple encrypt then decrypt, like... ...but when I write to a database and read back, I get the errors mentioned above. This is actually expected behavior, because the ...
Scott Arciszewski's user avatar
4 votes
Accepted

How to write a query with GROUP BY and ORDER BY using Joomla's query methods?

I see minor typos in each of your coding attempts (misspelled method names: selcet and loadObjectLsit). Write the GROUP BY order like so: (Reference Link) SELECT id, DATE_FORMAT(estEventDate, '%b %Y'...
mickmackusa's user avatar
  • 4,791
4 votes
Accepted

What is the different between JPlugin and \Joomla\CMS\Plugin\CMSPlugin

JPlugin is an alias of Joomla\CMS\Plugin\CMSPlugin. It is the same thing at the moment, but one should start using fully qualified class names because all aliases in Joomla! are deprecated and will be ...
Sharky's user avatar
  • 11.2k
4 votes

Coding Standard Question - defined( or \defined(

I asked this on the Joomla! internal development chat and was told the second one is the optimised version currently in namespaced files. Richard, a lead Joomla! developer wrote "Backslash makes ...
mfleeson's user avatar
  • 128
4 votes
Accepted

How to remove a file from a template using the installer?

You have to create an installer script. The provided generic installer, Joomla\CMS\Installer\InstallerScript, has some functionality for removing files and folders so you could extend it. Create a ...
Sharky's user avatar
  • 11.2k
4 votes

How to create a (better) development environment for Joomla 4

I've not used Docker so I can't help with that, but I have xdebug set up on my local environment in combination with PHPStorm and that is a big help in enabling me to figure out why something's not ...
Grant Hood's user avatar
3 votes
Accepted

com_ajax and JFactory::getUser()

Assuming you using the correct naming conventions for you Ajax task in the URL and PHP function, you should have something like this: helper.php public static function myFunctionAjax() { } ...
Lodder's user avatar
  • 26.9k
3 votes

Check if a string is an URL

The best solution would be to use preg_match() with a regular expression. One I've used before is: ((mailto\:|(news|(ht|f)tp(s?))|telnet|webcal|rss|nntp|file\://){1}\S+) You can also search and find ...
George Sexton's user avatar
3 votes

How to automatically create the installation zip archive of a Joomla extension?

Good question. I personally keep my extensions (modules only) on Github using the same directory tree as you'd find with any other extension. So when I make changes to a file on my localhost, I copy ...
Lodder's user avatar
  • 26.9k
3 votes
Accepted

{emailcloak=off} any way to do this programmatically?

He will distribute it. So he is trying to find a workaround inside the plugin. One solution could be to encrypt the email in base64 on php side and decode it on javascript with Base64.decode(...
Pierre-André Vullioud's user avatar
3 votes
Accepted

jquery.minicolors.js with opacity

As said in comment, I would extend JFormFieldColor and override getInput method. As it turned out, Joomla! current jQuery minicolor plugin is outdated, so you should include your own. There is PR for ...
Rene Korss's user avatar
  • 3,208
3 votes
Accepted

How to properly setup Snipcart inside custom components

Okay, I found the mistake. I needed to set the character encoding to UTF-8 at the external script, because the name values were getting converted to boxes and that caused value collisions. I'll ...
IseNgaRt's user avatar
  • 689
3 votes

What is the proper way to make an AJAX call in component?

You can access a controller directly by using the controller name in the task: index.php?option=com_similar&task=controller.abc&format=raw will call: controller.raw.php (return is raw) ...
Dennis Heiden's user avatar
3 votes
Accepted

How to develop only a back-end Joomla! component?

Unfortunately the directory is always gets created. File: libraries/cms/installer/adapter.php line 679 $this->createExtensionRoot(); The above line will create the extension root directory ...
Nagarjun's user avatar
  • 2,991
3 votes
Accepted

Content Plugin 'loads' multiple times on Category Page

Right, so the function executes 15 times and you have 14 articles assigned to a category. If you open the following file: components\com_content\views\article\view.html.php you see the event ...
Lodder's user avatar
  • 26.9k
3 votes
Accepted

What dictates the HTML that is generated for Front-End Search Tools?

Your problem is jQuery's Chosen plugin. JS scripts are almost always added using the JHTML class and its child classes. I've only had a quick look, but I think the problem script is injected at ln: ...
Bathmat's user avatar
  • 492
3 votes

joomla loadFormData

I ran into this as well and have learned the following: the loadFormData can indeed used to load previously saved data back into the form and Joomla does not seem to set the form data to the user ...
Isolde's user avatar
  • 131
3 votes

How to use joomla getUserState and setUserState to keep form field values

This is the way I do it, I hope it helps you. in you view.html.php (view file) $app = JFactory::getApplication(); $this->data = $app->getUserStateFromRequest('com_yourcomponent.yourform....
Piero Marsilio's user avatar
3 votes

Custom message by menu item

Option 1 A quick way to do this is to install Regular Labs Sourcerer (or similar) and use a Custom HTML module with similar code to the following: {source} <?php $app = JFactory::getApplication();...
Neil Robertson's user avatar
3 votes
Accepted

Subform multiple data not saving

In your table's bind function, add this: if ( ( !empty( $array[ 'list_links_url' ] ) && ( is_array( $array[ 'list_links_url' ] ) ) ) ) { $this->_jsonEncode[] = "list_links_url";...
Stuart Steedman's user avatar

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