joomla 3 vs 2.5 extension development differences - joomla

I am joomla user and I have created some extensions's and templates for joomla 2.5, but now I upgraded to joomla 3 because of bootstrap framework and responsive templates. I need your help here:
How to update joomla 2.5 extension to work with joomla 3 and be responsive?
I googled for a wile and couldn't find any answer about "extensions".

It's a big question, but here are some baseline steps.
First, make sure that your 2.5 code is clean. That is if you are still using any classes that were deprecated in 2.5 first go ahead and update them in your 2.5 version or else do that first in your 3 version. If you aren't logging deprecated classes you should do so to make sure you don't miss any. In particular you want to get rid of JRequest and look for any methods you might have extended that themselves extended JObject and make sure you are not relying on those methods. Also, you need to make sure you have changed any extends JModel to extends JModelLegacy (and similar for JView and JController). Depending on the complexity of your outputs you can likely follow the core code as a model for your administrator layouts. For the front endin my experience you are mainly just changing layout files to use the newer classes and ids.

If you use the Component Creator to develop your component framework you can specify if you want to build Joomla 2.5 or Joomla 3.0 compatible code.

Since 2.5 is the current LTS version until 3.5; the majority of the core changes are deprecated versus being completely removed. Meaning you can still use them and there are overall not many things required to migrate a 2.5 component, for now. I would definitely read through the walk through provided by Soren, but here are the three "major" required changes to get a 2.5 component working on 3.1 and above Joomla... with caveats of course! :D
1) Make sure all your view classes extend JViewLegacy
2) Make sure your primary controller extends JControllerLegacy instead of JController
3) Make sure your primary component entry point (my_component_name.php file in component root) use JControllerLegacy::getInstance('my_component_name') instead of JController::getInstance('my_component_name')

Related

Simple way to convert Joomla 1.5 template to joomla 3.x

I was using joomla 1.5 on PHP4 recently my hosting provider updated to PHP5 then my joomla 1.5 crashed.
I have installed joomla 3.x
Could anyone please tell me the simplest way to convert a joomla 1.5 template to 3.x ?
Thanks in advance.
It really all depends on how complex your template is. If you have a simple template without a lot of overrides what I would do is treat your template like a PSD and just make a fresh template based on Protostar's blank slate.
Put your jdocs where you want them and create the basic less file with the basic colors, fonts, styles that you need.
Add the template parameters if you need them in a new XML file since some of that has change.
If you have a lot of overrides again you probably want to start from scratch by copying the new core layouts and modifying them to match what you had.
Custom JS will be the biggest pain point, but if you are still running MooTools 1 you really are ready to update that.
I used this : SP Upgrade and everything works fine except some minor changes I had to make because the 1.5 version was extremely customized. The most important thing for us was the content and template which successfully migrated.

Disabling Joomla component com_content

Just trying to understand the working of com_content component in Joomla 3. Is it possible to disable or uninstall com_content component? Is it a core component that is essential for the functioning of the entire framework, so it cannot be removed?
You can't disable or uninstall any core components such as com_content. They are protected. I'm not sure of the exact things that require com_content, however completely removing it which would have to be done by deleting the folders and removing any reference to it in the database could possibly and most likely result your site malfunctioning. It's therefore protected for good reason ;)
I do know that in either Joomla 3.5 or 4.0, there will be an option to install core components with installing Joomla.
While there might be some benefits in making Joomla lighter, in the current configuration I would say that IS NOT RECOMMENDED to even try something.
Consider using ACL to hide it for the users that don't need it.

Joomla component upgrade with custom code

My client purchased a Joomla component, the comoponent need a customization in both front end and back end.
But his requirment is, custom code in front end and back end to be upgrded while upgrading original component.
Example : I bought a component from a company XYZ and the component name is joomla_events, current latest version is 2.0. I done the customization in the version 2.0. Later on the company releases new version 3.0, If the client upgrade the component from version2.0 to version 3.0 then the custom code in the version 2.0 also updated in version 3.0
Please help to do the custom code upgrade in Joomla component.
This is why editing core files is never recommended, because it gets overridden when updated and people then start to have problems.
A simple answer to your question is, you can't have the custom code you added into version 2.0 appear in version 3.0.
You will need to re-add the code you added before. Yes, it is pain taking and annoying, however you would have been better in the first place to develop a plugin which could have been used to extend the component and would make upgrading easy. Not only will you have to add your code again, but you will need to thoroughly test it to ensure it works.
check this may be it helps you....
http://docs.joomla.org/J2.5:Managing_Component_Updates_(Component_release_files)

How to develop Joomla 1.5 componenets?

How can I start developing a component for the Joomla 1.5 framework? Does anyone know of a good tutorial, or has a good reference?
I have read the tutorial on the wiki and I didn't understand it well, so if you could point me to another one, that would be great.
I know that ideally I should work with Joomla 2.5 or 3.0 but I am being asked to develop this for an existing website, I can't decide which version to work on.
I think the official tutorials in Joomla! Documentation really do cut it. Give it a try - http://docs.joomla.org/Component_Development
I can't decide which version to work on
I personally would use Joomla 2.5 as it's the long term lease of the Joomla series and has much more documentation and support. Joomla 3.0 is the short term release, therefore is a beta version of 3.5 so to speak.
Seeing as you are using Joomla 1.5 at the moment, you could always upgrade to Joomla 2.5 using JUpgrade which is a free extension. Note that this won't upgrade 3rd party extensions, so you will need to install the Joomla 2.5 compatible versions for each one (providing there is one).
To get you started on a Joomla 2.5 component, have a look at the Joomla 2.5 MVC Documentation. This also provides zip files of a HelloWorld component for you to download at various stages.
You might also be interested in a Component Generator.
Hope this helps.

How to preserve customization while upgrading to a new version of nopCommerce?

I'm working on NopCommerce 2.60 and I have extended Affiliate Module in NopCommerce 2.6 by adding two new fields like "WebsiteURL" and "Picture Upload".
For that I have made changes in Affiliate Services, Affiliate Controller, Affiliate.cs, Affiliate Map, Affiliate Model files. Now If I want to integrate these changes in upcoming versions of NopCommerce.
So What is better way to make changes in NopCommerce code and easily integrate in upcoming versions of NopCommerce?
There is no any way in nopcommerce to upgrade custom functionality in higher version. instead of that i would suggest right you function independent to nop means write separate classes for all Affiliate functionality, copy it in next version as you see in nopcommerce2.65 they have change some service, properties name.
I have recently looked into this since our company wanted to make sure nopCommerce could be upgraded at later dates if needed. The best solution we found was to make our modifications into plugins so that we could refrain from modifying the core as much as possible. Like Shivkumar said, it's not really possible to make nopCommerce upgrade proof.
Hope this helps.

Resources