47

PLEASE NOTE THAT THIS ANSWER is already a few years old and was not updated. Feel free to edit / comment if you think something is no longer exact. Abstract There is almost no really official way of dealing with this, it much depends on the complexity and how much you want to rely on the MVC pattern to do the work. Below are some possible solutions what ...


23

Joomla: Accessing User Info - The User Object To get user information for the current user: $user = JFactory::getUser(); It will return the User Object. Here, some of the most common User Object's Properties: id ($user->id) name ($user->name) username ($user->username) groups ($user->groups) email ($user->email). You can check if the ...


23

I will provide the list of my bookmarked links and a list with links for Joomla Development Books, with various resources all around Joomla Development. I hope they will be useful for anyone interested: Joomla Beginner Users start here: Joomla Beginner Tutorials - How to start with Joomla? Glossary - It's a good idea to get familiar with Joomla Glossary ...


20

This is a late answer for this very well answered question, but I wanted to add this cut-to-the-chase solution for those that just need a simple way to get to their components's data with an AJAX call. With all the Joomla versions, 3rd party possibilities, and hacks that I found over several days of googling, this was the simplest approach I could come up ...


17

Learning Joomla Module Development The way I learned, was by studying and customizing the core or other 3rd party modules. Modules as concept are simpler than the components (which we could say are 2 apps front-end/back-end) and are designed to display a piece of information. So if you open the module folder/files and start reading the code, you will ...


17

Development General Composer Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you. Joomlatools Composer Installer This Composer plugin will install extensions into your Joomla setup. FOF2 (Framework on Framework 2) FOF is a rapid application ...


16

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 INT to your database table Your list view should already be sortable (by clicking on the table column headers) Modifications This is the most important part ...


15

Have you seen the following tutorials in the joomla documentation? http://docs.joomla.org/J2.5:Creating_a_simple_module http://docs.joomla.org/J3.3:Creating_a_simple_module In particular, make sure you look at all the articles in the series. http://docs.joomla.org/J3.3:Creating_a_simple_module/Introduction http://docs.joomla.org/J3.3:...


15

Environments: Wamp (Windows) WampServer is a Windows web development environment. It allows you to create web applications with Apache2, PHP and a MySQL database. Alongside, PhpMyAdmin allows you to manage easily your databases. Mamp (Mac: Both Community and Commercial versions) MAMP installs a local server environment in a matter of seconds on your Mac ...


12

I use this way: // Check for component if (!JComponentHelper::getComponent('<component name>', true)->enabled) { ..... } <component name> - without "com_" prefix


12

Even the link you have provided in your question does not provide everything single thing that need to be change when migrating an extension. There are always fairly big API differences between each Long Term Release version of Joomla. For Joomla 3.x, the main thing I tend to look at is the following: Potential backward compatibility issues in Joomla 3 In ...


11

Valentin answer is good but is a bit overly complex if all you need to do is add 1 or 2 ajax calls to a component that is already built. It's perfectly possible to get away with not making separate controller.raw.php or view.raw.php files. To make this ajax call index.php?format=raw&option=com_example&controller=job&task=keep_alive&...


11

Numerous types of form field are built into Joomla, with many usefull fields like calendar, color picker, image picker, file upload, file selection etc.: Available Fields +---------------------+-------------------------------------------------------------------------------------------------------+ | TYPE | DESCRIPTION ...


10

So technically you start transitioning to the new MVC classes now - there's nothing stopping you. For example com_config in Joomla core is already using the new MVC classes. However as you probably know the Jxxx classes are pretty much empty so a lot of the work will be putting in the same level of code as in the current JxxxLegacy classes. This will mean ...


10

Here is a draft idea using a plugin: You need to create a system plugin (I am not getting into that) and to use the event onBeforeRender. Inside you get an instance of your Toolbar and append the button. class PlgSystemCustomtoolbar extends JPlugin { public function onBeforeRender() { // Get the application object $app = JFactory::...


9

The developers have a roadmap at this link : http://developer.joomla.org/cms/roadmap.html which essentially states that the main focus right now is to unify and streamline the development process for the good of the project. That is, they will wrap the Framework back into the CMS development so that it can have the same Bug Squad. The roadmap further ...


9

First of all you need to pass article ID with your request. Then you can use JTable class to update the state: public function onAjaxDeletearticle() { // Get id from the request $id = JFactory::getApplication()->input->getInt('data'); // Get the new instance of #__content table $table = JTable::getInstance('content'); // Load the ...


9

At work we try to resolve all PHP warnings, errors and strict standards violations. In situations like this, where the signatures are different, there's no way to resolve it other using two separate, version specific class files. I'm curious though why that's not an option for you? Version specific class files are actually simple to implement, but a bit ...


9

As Milton already wrote you specify where those SQL files are in the install manifest file. There are three different locations for install, uninstall and update. <install> <sql> <file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file> </sql> </install> <uninstall> <sql> ...


9

So I just spent the day setting up PHPStorm for the purpose of component development. Although it was a bit of work, now that I've finished the setup my life is going to be SOOOO much easier. I don't have a tutorial to point you to, but here is the step-by-step for setting up PHPStorm with Git, VirtualBox, Vagrant, and Joomlatools/box Install PHPStorm ...


9

You can create a system plugin to handle all the request to your custom component before sending control to the component. Use onAfterRoute event to perform all the access checking. function onAfterRoute() { $user = JFactory::getUser(); $groups = $user->groups; $jinput = JFactory::getApplication()->input; $option = $jinput->get('option', '...


9

Ok, looks like digging a bit more I found an answer to my own question. Basically I found this plugin: http://extensions.joomla.org/extensions/style-a-design/popups-a-iframes/25240 It's not exactly what I need, but checking its code I figured out the way to go, which could be summarized as follows (in case someone gets here looking for the same question): ...


9

You should use Joomla's JInput class https://docs.joomla.org/Retrieving_request_data_using_JInput e.g. public function add() { // Get Joomla's input object: $input = JFactory::getApplication()->input; // Get the variable $value = $input->get('id'); $session = JFactory::getSession(); $cart = array(); $cart['item'] = array('id' => $...


9

Testing: If you're planning on writing a significant amount of either PHP or JavaScript code then all of the standard PHP and JavaScript development tools will be useful, regardless of the fact that your code will be running within a Joomla environment rather than stand-alone. On the PHP side: XDebug: A PHP extension for developers that allows you to do ...


8

Simply install the extension or template again (without uninstalling the original) by uploading it to the Extension Manager. We typically create fully installable extensions for our sites. We install them on our development server for testing, and when they are suitable, we simply install them on the production server. As long as the method in the manifest ...


8

JHtml::script has additional logic included. See http://api.joomla.org/cms-3/classes/JHtml.html#method_script for the API reference By default it will detect debug setting and browser used and load the matching script. For example when debug is enabled it will load an uncompressed version of the file if present. There are optional settings which allow to ...


8

One main thing which you have pointed out is SQL Injection. This is one thing which a few people I've seen seem to miss completely and start developing using non Joomla coding standards and start writing SQL queires using mysql_* commands. Second thing which I kind of mentioned in the first point, which is always stick to Joomla coding standards. The only ...


8

From my experience: About Joomla framework I tried to build a simple RESTful API for integrated authentication based on Joomla framework. It's fairly complex, quite different than the current Joomla API. Also, current source code can't be copy-pasted, and libraries may return unexpected results (being executed in a different environment). I'm going to wait ...


8

I can recommend the official doc page. There is a section for developers which includes also tutorials. http://docs.joomla.org/Portal:Developers David Hurley is currently doing a series of short videos which explain how to develop various things. http://dbhurley.com/jd101-joomla-development-tutorial-series/ The API page is a good ressource as well. http://...


8

Actually it would be a bad idea to have a Joomla site nested inside the root of another Joomla instance. The better scenario (which would require shell access to configure) is to have each one in it's directory outside of the webroot, and symlink the files into the webroot. This way the new site can be accessed via a subdomain during testing and content ...


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