17 votes
Accepted

Adding drag-n-drop ordering in component

There are some prerequisites and you have to do some modifications to your view template. But you don't have to develop this feature all on your own. Prerequisites You need a column ordering of type ...
fruppel's user avatar
  • 3,723
10 votes
Accepted

Best way to include helper class in sub-controller : require_once or JLoader

Actually JLoader::register('TestHelper','/path/to/test.php'); dosen't load file, it just registers it to be able to autoload file if class is instantiated. Do require it instantly, you want to use: ...
Rene Korss's user avatar
  • 3,208
6 votes
Accepted

Programmatically Add Menu Item in Component

firstly - menu items are not put into the assets table, so this question is about a non-existent problem. The link provided in the question gives the correct answer for joom 2.5 and 3.x. but for ...
jamesgarrett's user avatar
  • 3,299
6 votes
Accepted

Component Download (from a live site)

Yes, it is possible with a component, but it will take a little longer as there are more directories and files. Create a folder on your desktop (e.g "gallery"), then copy the XML file from: ...
Lodder's user avatar
  • 26.9k
6 votes

How to use com_api plugin for REST?

In the context of a REST Api, each call is stateless. So, there is no "user login". In a Joomla site, when a user is authenticated, the browser receives a cookie to authorize the navigation and ...
Anibal's user avatar
  • 7,435
5 votes

How to set get('Items') limit?

Like others have said - put this in the model's populateState function $this->setState('list.limit', $limit); #limit=0 removes limit $this->setState('list.start', $start); But you must make ...
mhorne's user avatar
  • 151
5 votes
Accepted

Site Vulnerability Check

The best tool I am aware of that can scan your whole web account is the one from Phil Taylor at https://mysites.guru (formerly https://myjoomla.com). This is a paid service but you are not locked ...
Neil Robertson's user avatar
5 votes

Site Vulnerability Check

These are the tools I use JOOMLA EXTENSIONS Watchful.li: similar to myJoomla.com and also monthly https://watchful.li/ RSFirewall: Has the best scan for malware and files that do not belong in ...
YellowWebMonkey's user avatar
5 votes
Accepted

How to call a model method from a system plugin?

This will work with ease in Joomla 3.x //load model JModelLegacy::addIncludePath(JPATH_SITE . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_foo' . DIRECTORY_SEPARATOR . 'models'); /...
Piero Marsilio's user avatar
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 to execute an ajax script to update form fields in an .xml file rendered by Akeeba FOF?

You can use JSON format in the controller directly by adding .json suffix and changing format in your URL to json. In this case the controller would be placed in /administrator/components/com_example/...
Sharky's user avatar
  • 10.9k
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

Date/time picker in component

The only downside to @johanpw's solution is by using #datetimepicker2 that means this field type can only be used once. Good solution otherwise! Instead try the following in your /modules/...
VaciDesign's user avatar
4 votes
Accepted

Get all installed Joomla extensions and their version

Any extension that is installed, is stored in the database, in the #__extensions table. So you can run a simply database query to get the name and the manifest cache (which contains the version): $db ...
Lodder's user avatar
  • 26.9k
4 votes
Accepted

How to change styling of Joomla Collapsible Sidebar in Backend?

Well, as per my answer from the link you provided, you'll need to add the following to your default.php: <div id="j-sidebar-container" class="span2"> <?php echo $this->sidebar; ?> &...
Lodder's user avatar
  • 26.9k
4 votes

How to call a model method from a system plugin?

To call a model from anywhere inside Joomla you can use this method //Load the Joomla Model framework jimport('joomla.application.component.model'); //Load com_foo's foobar model. Remember the file ...
Amit Ray's user avatar
  • 237
4 votes

How to use a custom layout with JForm subform fields?

Edited to add subform field type-specific answer: Having looked at it properly, attaching your own layout to the subform field type is super-easy. Create a layouts folder in the same parent ...
Bathmat's user avatar
  • 492
4 votes

How to find the joomla page from url

You can find any url/Alias by searching it in the search box. First go to the Menu manager and enter resource-downloads in the search box. And if you didnt find it then you can go to the article ...
Joomler's user avatar
  • 1,801
4 votes
Accepted

SQL syntax error when attempting to filter list view - how to build WHERE clause?

Try changing your query to the following: $query->select('#__users_2679886', 'name') ->from($db->qN('#__users', '#__users_2679886')) ->where($db->qN('id') . ' = ' . $db->...
Lodder's user avatar
  • 26.9k
4 votes
Accepted

Updating component language file without reinstalling it

The language files are loaded again (from their source) on each page load. You don't need to reinstall the component each time. Are you writing to the right file?
Hackwar's user avatar
  • 156
4 votes

Calling Joomla!'s Default 404 Page

In your Joomla installation directory reach templates/themeXXX/error.php file. Edit the error.php file as shown below, locate this line of code: If you don't want to change address bar url then you ...
Sudhir Sapkal's user avatar
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

Select articles to display in custom component

JControllerLegacy::getInstance() caches the first controller instance so you're actually getting an instance of your component's controller rather than Content controller. You can skip the controller ...
Sharky's user avatar
  • 10.9k
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
3 votes

I need to change "Continue Reading " to "Read more" How to do?

You can override the "Read more" text in the admin section. In the "Extensions" menu, choose the Language menu item. Then choose "overrides" and click "new". You can search for the constant you ...
Lance's user avatar
  • 533
3 votes
Accepted

Joomla Component Development: Starting Point

Legacy MVC will be supported until EOL of Joomla 3 (at least). I would just go ahead and use that. You will find many tutorials for legacy MVC and you will probably get the most help for that here or ...
fruppel's user avatar
  • 3,723
3 votes
Accepted

Installing a PHP based sig. banner generator

It sounds like you should be looking into making a Joomla module. It's fairly simple to build a basic module, and you can also make it as complex as needed. In addition, the end user can publish the ...
johanpw's user avatar
  • 13.3k
3 votes
Accepted

Usage of JLog in a component controller

It seems that the third parameter of JLog::add() is wrong. This parameter is a category and you have set it to 'com_tdsmanager' in JLog::addLogger(). So you should use the same in JLog::add(): JLog::...
Dmitrijs Rekuns's user avatar
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

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