Select Page

components code migration to joomla 1.5

components code migration to joomla 1.5


I am  in the process of  moving all my open source project (7!)  to the latest #Joomla API 1.5. I’ve tried to summarize in the following table some conversion rules

Right now there IS NOT any order in that table, like my findings 🙂

Feel free to send me corrections or point me to  ressource links that may help me 🙂


In Joomla 1.0.Xhas to be converted in Joomla 1.5Where
mosMenuBar::startTable();JMenuBar::startTable();PHP code
defined(‘_VALID_MOS’) or die(‘Direct Access to this location is not allowed.’);defined( ‘_JEXEC’ ) or die( ‘Restricted access’ );PHP code
require_once( $mainframe->getPath( ‘toolbar_html’ ) );require_once( JApplicationHelper::getPath( ‘toolbar_html’ ) );PHP code
<?xml version=”1.0″ encoding=”iso-8859-1″?>
<mosinstall type=”component” version=”1.0.0″>
<?xml version=”1.0″ encoding=”iso-8859-1″?>
<install type=”component” version=”1.0.0″>
Installer XML file
global $database$database = & JFactory::getDBO();PHP code
$mosConfig_live_siteJURL_SITEPHP code
$mosConfig_absolute_pathJPATH_SITEPHP code
$mosConfig_*$config->*PHP code
$refid = mosGetParam( $_REQUEST, 'refid');
$refid= = JRequest::getVar('refid');
PHP code
Language files

are  PHP files, name like you want

 * Created on Jan 7, 2007
DEFINE("JOOMLA_ASKIMET_ASKIMET_KEY_L", "Your askimet key, can be request here for free, if you have a high intensive site, please require a commercial key to keep the system up and running");

DEFINE("JOOMLA_ASKIMET_ASKIMET_KEY_L", "Website or Blog URL, if different than the JOOMLA site");

Are now plain text files: ex en-GB.com_aksimet.ini

# $Id: en-GB.com_askimet.ini 7177 2007-04-23 06:42:21Z tcp $
# Akismet4Joomla Project
# Copyright (C) 2007 Cédric Walter. All rights reserved.
# License GNU/GPL, see LICENSE.php
# Note : All ini files need to be saved as UTF-8

JOOMLA_ASKIMET_ASKIMET_KEY_L=Your askimet key, can be request here for free, if you have a high intensive site, please require a commercial key to keep the system up and running
JOOMLA_ASKIMET_ASKIMET_KEY_L=Website or Blog URL, if different than the JOOMLA site

Language files in installer

were normal file in either the administration area or public component area.


They now have their own tag in either the administration or public area of the component

      <language tag="en-GB">en-GB.com_aksimet.ini</language>
      <language tag="de-DE">de-DE.com_aksimet.ini</language>
      <language tag="fr-FR">fr-FR.com_aksimet.ini</language>

Structure of file

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install SYSTEM "">
<install type="component" version="1.5.0">
    <author>Cédric Walter</author>
    <authorName>Cédric Walter</authorName>
    <authorEmail>[email protected]</authorEmail>
    <copyright>(c) 2007 Cédric Walter </copyright>
    <license>GNU GPL</license>
    This software is released under the terms and conditions of the
    &lt;a href=""
      target="_blank"&gt;GNU General Public License&lt;/a&gt;.
    For more information, please see the LICENCE file accompanying
    the installation package.
    <description>Akismet is an Oracle telling if comment entries are spams or not</description>
  Warranty&lt;br /&gt;
  This program is distributed in the hope that it will be useful, but WITHOUT ANY
  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  &lt;p&gt;&lt;a href="" target="_blank"&gt;Online documentation&lt;/a&gt;, and my forum at  which is updated
  regurarly as we receive bug reports.
    <credits> </credits>
    <!-- Site Main Language File Copy Section -->
      <language tag="en-GB">en-GB.com_akismet.ini</language>
      <language tag="de-DE">de-DE.com_akismet.ini</language>
      <language tag="fr-FR">fr-FR.com_akismet.ini</language>
        <menu img="components/com_akismet/aksimet.png>Akismet</menu>
            <menu task="settings" icon="config.png">Edit Settings</menu>
            <menu task="about" icon="credits.png">About Akismet4Joomla</menu>
            <menu task="troubles">Troubleshootings</menu>
            <menu task="developer">For developer</menu>
            <menu task="checkLatestVersion">Check for Update</menu>
        <!-- Site Main Media File Copy Section -->
        <media destination="com_akismet">
Your own menu

  function ABOUT_MENU() {
function ABOUT_MENU() {

no  JToolBarHelper::startTable(); or JToolBarHelper::endTable(); anymore

    $default = new MENU_Default();

has disapeared! write your own in between

require_once (JPATH_BASE . '/classes/akismetconfig.php');Use constants DS directory separator
require_once (JPATH_BASE . DS.'classes'.DS.'akismetconfig.php');
global $my;$user = & JFactory::getUser();Autorisation

Some links which may help also Help You:


About The Author

Cédric Walter

I worked with various Insurances companies across Switzerland on online applications handling billion premium volumes. I love to continuously spark my creativity in many different and challenging open-source projects fueled by my great passion for innovation and blockchain technology.In my technical role as a senior software engineer and Blockchain consultant, I help to define and implement innovative solutions in the scope of both blockchain and traditional products, solutions, and services. I can support the full spectrum of software development activities, starting from analyzing ideas and business cases and up to the production deployment of the solutions.I'm the Founder and CEO of Disruptr GmbH.