Joomla 2.5 component upgrade while keeping file unchanged - joomla

I have wrote a custom joomla 2.5 component and I its deployed on various sites with each having its own style sheet changed on server.. is there a way I can keep upgrading the component (add new features etc) but make sure that a specific css file is not not changed? i.e. remains the same as updated on each website?

Considering you have the xml file correctly set to method upgrade <extension type="component" version="1.6.0" method="upgrade"> just skip the <folder>css</folder> on your upgrade package.
<files folder="site">
<filename>index.html</filename>
<filename>keywords_editor.php</filename>
<filename>controller.php</filename>
<filename>router.php</filename>
<folder>views</folder>
<folder>css</folder> // This should not be included in your case
<folder>models</folder>
<folder>controllers</folder>
<folder>helpers</folder>
</files>
As Valentin mentions, the old files will remain on server if you're doing an upgrade to the component and not a fresh install.

Related

Specify multiple versions in manifest file

I've developed an extension(component + plugin) that is compatible with both joomla versions 2.5 and 3.0.
Now, my question is how to declare the version attribute in extension tag in manifest file, since same extension will be used for joomla 2.5 and 3.0 installs. Or does it not matter?
<extension version="2.5" ... ></extension>
<extension version="3.0" ... ></extension>
Although during install, it doesn't create any problem, as I've tried setting it to 2.5 for joomla 3.0 also
Thanx in advance...
Ok, so not having received even a single response in so much time, I checked the versions mentioned in other commercially successfdully extensions from joomla site those were supporting both the joomla versions, and found out that they were mentioning 2.5.
Hence, im going by the same...

Where to Place Custom Classes in Joomla (Component, Plugin, Module?)

I am new to Joomla (a seasoned WP dev) and I have just barely managed to wrap my head around the components and the plugins.
The thing is, that I want to include a shared component (a class), that should be callable from both the component and the plugin.
Any ideas? A library maybe? Can I bundle a library in a Joomla installer Package in this case?
If you create a lib_yourlib.xml file in the root directory and specify :
<extension type="library">
<files folder="yourlib">
it should be installable like any package, and it will be copied in libraries/yourlib after installation.

Convert module from 1.5 to 2.5 version

Have been Googling for hours to find the solution on how to convert my modules from Joomla version 1.5 to 2.5.
The modules doesn't show up in the administrator area under "Extensions > Module Manager".
Where should I start and how should I do to migrate my modules?
Updating fairly simple modules to be 2.5 compatible is very simple. The first thing you start with is the XML file.
<install version="1.5"> needs to be replaced with <extension version="2.5">
The same goes for the tag at the very end: </install> to </extension>
Then, you will need to start with the parameters. Each parameter is defined with <param> and needs to be changed to <field>. However a little more needs to be added to the beginning and end of the fields as shown below:
Updating fairly simple modules to be 2.5 compatible is very simple. The first thing you start with is the XML file.
<install version="1.5"> needs to be replaced with <extension version="2.5">
The same goes for the tag at the very end: </install> to </extension>
Then, you will need to start with the parameters. Each parameter is defined with <param> and needs to be changed to <field>. However a little more needs to be added to the beginning and end of the fields as shown below:
<config>
<fields name="params">
<fieldset name="basic">
//Fields go in here
</fieldset>
</fields>
</config>
Also, if you are using language files, you will need to copy and paste the following one you have and add .sys into the name like so en-GB.mod_example.sys.ini. Then open this file and ensure that the description of the module is the only translation in the file. Once done, specify the language file in the XML. Don't forget that language file's for Joomla 2.5 don't support # at the beginning of the data lines, and will need to be replaced with ;
It might also be an idea to keep up to date with any functions that are removed or deprecated.
Hope this helps.
Modules, Components and Plugins are all extensions, with different purposes.
As mentioned by #Irfan already check the Joomla! Documentation pages:
Adapting a Joomla 1.5 extension to Joomla 1.6
Joomla! Manifest files
As mentioned before it may work just by updating the manifest file (xml file) for the module. If it's a component things can get more complicated.
As a side-note, the more vague are about your problem, the more vague will the answers be. Get back to us with more details (like component name or errors that you get).

joomla 3.0 extension manager not finding update of module

I developed a module that can be updated in Joomla 2.5 Extension Manager.
I can't find information anywhere that indicates that something needs to be different in order to work properly in Joomla 3.0
I don't intend to advertise this module by providing the link to it, I'm just trying to find help to fix this problem.
Here is the page where you can download it:
http://code.google.com/p/mod-random-article/downloads/list
If you install v1.1 on Joomla 2.5, the Extension Manager will find the new update v1.2.
If you install it on Joomla 3.0, the Extension Manager won't find the new version.
Can anyone help?
Thanks
I found the solution for my problem.
This looks so easy.. I don't know how I couldn't find this earlier.
I had to add another tag to the manifest file on the update server targeting Joomla 3.0, like this:
<updates>
...
<update>
...
<targetplatform name="joomla" version="3.0"/>
...
</update>
</updates>
I had renamed everything to the respective plugin name but still joomla wasn't finding the new copied and modified plugin that I had created.
Finally I found out that the plugin attribute of the XML object, needs to be the same name that of the plugin. So lets say that the new plugin name is xxyyzz, As shown below with the other respective changes, the plugin attribute should also be updated.
<files>
<filename plugin="xxyyzz">xxyyzz.php</filename>
</files>

How to correctly set the dependecies settings when generating packages

I'm relatively new to modules development on Magento 1.6.2, I have to modules :
Company_JQueryUI (adds jqueryui + theme files to the Adminhtml heading)
Company_Slider (A simple image slider with file upload)
These modules I made work fine on the development environment and I've been asked to generate them separately, in a way that any modules that requires JQueryUI on the backend should activate it on demand and requires it in the installation process.
I've followed the wiki page concerning the packaging phase, on the dependencies tab I've set the following :
Package : Company_JQueryUI
Channel : community
Min : 1.1.0
Max : 1.1.0
Files : (I really don't know whether this field is required and what should I put there, but the wiki just ignores this part.
All the other settings are correctly set.
The problem is that when I start the installation process of the slider module, Magento Connect doesn't generate any exception regarding the missing dependency, So I though maybe I need to set the dependency in the /etc/moduels/Company_Slider.xml
<?xml version="1.0"?>
<config>
<modules>
<Company_Slider>
<active>true</active>
<codePool>local</codePool>
<depends>
<Company_JQueryUI />
</depends>
</Company_Slider>
</modules>
</config>
But then I got a bigger problem, Magento Connect still ignores the dependency on the deployment phase, but once it's done, it generates an exception, and the website is put on maintenance mode, blocking any access to it, and Showing the dependency exception on a blank page (Magento Connect).
So far all I could do is remove the module files manually to get the site working again, I don't know if I'm missing something or it's a bug in the deployment process.
PS : bug resolved in 1.7

Resources