Thứ Năm, 16 tháng 5, 2013

J2.5:Migrating from Joomla 1.5 to Joomla 2.5 Part3


Test Your XAMPP localhost Server

Open your Browser and point it to
http://localhost
The index.php will redirect to
http://localhost/xampp
There you will find instructions on how to change default usernames/passwords. On a PC that does not serve files to the Internet or LAN then changing the defaults is personal choice.

EasyPHP

Another way that will have the same result is to install EasyPHP, is an easy to install package, Nothing to configure. It's already done! You just need to download, intall ... it installs a complete WAMP environment for PHP developers on Windows, including PHP, Apache, MySQL, phpMyAdmin, xdebug ... The complete and ready-to-use environment for PHP developer. For download EasyPHP[2]

Install jUpgrade

Go to your Joomla backend. e.g. www.yoursite.com/administrator
Extensions >> Install/Uninstall
Installing jUpgrade
Browse >> Select com_jupgrade >> Upload File & Install
Browse and Upload Component
Installing jUpgrade

Enable Mootools Upgrade Plugin

  1. Go to Extensions | Plugin Manager
  2. Search for "System - Mootools Upgrade"
  3. Enable the plugin
It is important that this plugin is installed and that it has been set to enabled, as the proper functioning of jUpgrade depends on it.

Configure the Options

As of jUpgrade version 2.5, support is present to migrate to Joomla! 1.7 and Joomla! 2.5. Configure the options by navigating to Administrator > Components > jUpgrade > Parameters.
Global
  • Distribution - Select whether to migrate to Joomla! 1.6 or 2.5
  • Prefix for old database - Your current table prefix
  • Prefix for new database - Your selected table prefix for your migrated site
Skips
  • Skip checks - Skip pre-migration checks
  • Skip download - Skip downloading the package (Note: Must have a package already downloaded to your temp folder or set this and Skip Decompress if set to yes)
  • Skip decompress - Skip decompressing the downloaded package (Note: Must have a package already downloaded and decompressed to site_root/jupgrade if set to Yes)
Templates
  • Keep original positions - Keep the currently defined positions for modules
Debug
  • Enable Debug - Enable this to have messages displayed below the migration process concerning the progress, helpful if having issues
jUpgrade 1.1.1 Options
When finished, Save the options.

Migration

Components >> jUpgrade
Accessjupgrade.png
Start Upgrade
Start jUpgrade
Run jUpgrade

Do not exit the screen until everything has finished loading. Scroll down to check if finished.
jUpgrade Finished
Note that jUpgrade currently does not migrate custom and add-on templates. Only the default templates are initially installed. You must manually migrate the other templates.

Behind the Scenes

Even if the migration process was not 100% successful, your Joomla 1.5 is still intact and none of your users are affected. You have an opportunity to check out your site both in the frontend and the backend to make sure everything is working.
So what actually happens? jUpgrade downloads the version of Joomla that you selected to the jupgrade directory (which it creates) in the root folder of your Joomla 1.5 installation. It then extracts all the files from the download. Once extraction has completed, jUpgrade installs the new Joomla version and then migrates your old database to the new database which it has created. Your new site will be installed in www.mysites.com/jupgrade assuming that your Joomla 1.5 installation is in your html root.

Check Your New Joomla! Installation

Please do a full site review of your new Joomla installation and make sure everything is set up properly. Your new Joomla site will be installed in www.mysites.com/jupgrade assuming that your Joomla 1.5 installation is in your html root. Here is a general checklist:
  • Banners
  • Categories
  • Contacts
  • Content
  • Menus
  • Modules
  • Newsfeeds
  • Users
Links to external sites probably didn't change during the migration but the internal links might have been affected. Verify that all external and internal links are correct with a program such as Xenu's Link Sleuth.

Templates

Work is currently being done on the template upgrade feature of jUpdate and it is not yet fully functional. Your module positions may have to be adjusted in the module manager.
If you had custom templates or templates other than those installed as defaults, they may have been copied from your version 1.5 files. If so, they now must be upgraded or modified and then Discovered. See Upgrading a Joomla 1.5 template to Joomla 2.5.

Backup Joomla!

If everything looks good to go, backup the new Joomla installation.

Overview of the Rest of the Process

Quick overview of what we are going to try to do now:
  1. Relocate our Joomla 1.5 installation to a subfolder as a "just in case".
  2. Relocate our new Joomla installation to the html folder.
'It should happen in this order' If you do it in reverse order, the new Joomla files will get mixed with the Joomla 1.5 files (many of 1.5 files will be overwritten) and you will have a big mess! Your site will likely still work, but it's a security ticking time bomb waiting to go off.

Going Live

Next log onto your host's file manager (e.g. cPanel, Plesk, etc) or an FTP Client, however, preferably a file manager. The general procedure is (it should take about 30 seconds if you review the steps before you start):
  1. Create a subfolder (e.g. myoldsite) for the Joomla 1.5 installation in your html root, e.g. public_html/myoldsite
  2. Select all the folders (***except the jupgrade folder***) and files in the html root and move them into the Joomla 1.5 subfolder (e.g. myoldsite)
  3. Select all the folders and files in the jupgrade folder and move them to the html root
  4. Double check the frontend and backend

J2.5:Migrating from Joomla 1.5 to Joomla 2.5 Part2


Backup, Backup, Backup

Skipping this part is perhaps the biggest mistake you can make. If you have a proper backup (or several) you can always revert if needed. However, if you don't properly backup your site and something goes wrong, you are going to waste a lot of valuable time and sometimes money, getting things back to the way they were. So please backup!

Using XCloner to Backup

  • With XCloner you can backup your site fully, both files and database
  • XCloner will produce TAR archives which can be opened with most archive clients
  • After creating the backup, they can easily be restored by using its dedicated restore script

Using Akeeba to Backup

  • Akeeba Backup produces a .jpa file
  • The .jpa file contains all the folders and files and the MySQL database of your site.
  • The .jpa file also contains an installer
  • Kickstart.php (also from Akeeba) unpacks the .jpa file and then runs the installer
Akeeba and Kickstart can be downloaded from Joomla extension directory. There is a link to full instructions as well.

Upgrading with jUpgrade

Download jUpgrade

Download the latest version of jUpgrade. It is highly advisible, especially when development still is progressing, to always use the latest available version!

Optional Testing Environment

If you are really nervous by this point and your heart is beating fast, then you should probably set up a testing environment.

Install XAMPP

XAMPP is an easy-to-install package that bundles the Apache web server, PHP, XDEBUG, and the MySql database. This allows you to create the environment you need to run Joomla! on your local machine. The latest version of XAMPP is available at the XAMPP web site. Downloads are available for Linux, Windows, Mac OS X and Solaris. Download the package for your platform.
Important Note Regarding XAMPP and Skype: Apache and Skype both use port 80 as an alternative for incoming connections. If you use Skype, go into the Tools-Options-Advanced-Connection panel and deselect the "Use 80 and 443 as alternatives for incoming connections" option. If Apache starts as a service, it will take 80 before Skype starts and you will not see a problem. But, to be safe, disable the option in Skype.

Update
As of August 5, 2010, XDebug has been updated (to version 2.1) which fixes some important bugs (for example, watching local variables for nesting functions). The latest XAMPP package (1.7.3) now includes this new version of XDebug. If you just want to update XDebug, you can download the latest module from [1]. There is a handy website that tells you which XDebug binary you need, depending on your phpinfo() information here. To use it, you just copy the output of your phpinfo() display and paste it into the form on the site.

Installation on Windows

Installation for Windows is very simple. You can use the XAMPP installer executable (for example, "xampp-win32-1.7.3-installer.exe"). Detailed installation instructions for Windows are availablehere.
For Windows, it is recommended to install XAMPP in "c:\xampp" (not in "c:\program files"). If you do this, your Joomla! (and any other local web site folders) will go into the folder "c:\xampp\htdocs". (By convention, all web content goes under the "htdocs" folder.)
If you have multiple http servers (like IIS) you can change the xampp listening port. In <xamppDir>\apache\conf\httpd.conf, modify the line Listen 80 to Listen [portnumber] (ex: "Listen 8080").

Installation on Linux

This guides you through the installation of Xampp on Debian GNU Linux or one of its derivatives such as UbuntuKnoppix or GRML. Note that this guide applies to Joomla! Joomla 1.5 Joomla 1.6 Joomla 1.7 Joomla 2.5. It has been successfully tested on Debian 4.0 [Etch], Debian 5.0 [Lenny], Ubuntu 8.04 LTS [Hardy Heron], Ubuntu 10.10 [maverick] and Ubuntu 11.10 (Oneiric Ocelot). It will work for allDebian based Linux distribution as well.
Download XAMPP for Linux to your your Home folder.
Open Terminal and enter:
sudo tar xvfz xampp-linux-1.7.7.tar.gz -C /opt
(replace xampp-linux-1.7.7.tar.gz with the version of XAMPP you downloaded).
This installs ... Apache2, mysql and php5 as well as an ftp server.
sudo /opt/lampp/lampp start
and
sudo /opt/lampp/lampp stop
starts/stops all the services
Configure Xampp Error Reporting on Linux
By default error reporting in Xampp is set Development level. This causes several error messages on the screen that need not concern the average user. To prevent that from happening:
In your Terminal type
sudo gedit /opt/lampp/etc/php.ini
In the php.ini file, locate
error_reporting =
And change the value to
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
Also locate
display_errors = On
And change the value to
display_errors = Off
Stop then restart XAMPP for the new settings to take effect
To Create a GUI for XAMPP Connected to Your Ubuntu Menu
Open up the Terminal and type
sudo gedit /usr/share/applications/xampp-control-panel.desktop
Then copy the following into the gedit and save.
[Desktop Entry]
Encoding=UTF-8
Name=XAMPP Control Panel
Comment=Start and Stop XAMPP
Exec=gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py"
Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg
Terminal=false
Type=Application
Categories=GNOME;Application;Network;
StartupNotify=true
N.B. Ubuntu 11.10 needs python-glade2 installed in order to run the GUI. python-glade2 can be found in the Ubuntu Software Center.
Avoiding File Ownership Issues on Linux
Connect to localhost with an FTP client Default
nobody
lampp
Use your ftp client to create folders in your localhost and to copy files to/from your localhost.
Important:
  • The XAMPP installation sets the correct Ownership of the files and permissions.
  • Using the CHOWN command will cause Ownership problems with xampp.
  • Using nautilus to manipulate folders/files on localhost will cause Ownership problems with xampp.

J2.5:Migrating from Joomla 1.5 to Joomla 2.5 Part 1

This guide will take you step-by-step through the general procedure of how to migrate from Joomla 1.5 to later versions such as Joomla 2.5. Please read through all the material as this is not a light undertaking.

Before Upgrading

Joomla 2.5 is the stable release that is based on the development version that was called "1.6". Don't let the numerical closeness of 1.5 and 1.6, mislead you. Joomla 1.6 took three years to develop and has been a major undertaking. Countless hours have been spent by many volunteers from around the world to put it all together. Although much of the code is the same from Joomla 1.5, much of it has been written from the ground up, and the changes between 1.5 and 2.5 are comparable in size and complexity to the changes from Joomla 1.0 to 1.5. Because the changes from Joomla 1.5 to 2.5 are so large and because of the massive effort put into getting Joomla 2.5 to where it is today, there is no core upgrade path. This is indeed a migration. In planned future releases of Joomla, such as Joomla 3.0, 3.5 and so on, the changes from version to version will be more incremental and a core upgrade path is planned.
Now that Joomla 2.5 is finally here and stable, a community initiative led by the developers of Joomla is turning towardsjUpgrade (a 3rd party Joomla extension on the JED originally developed by Matias Aguirre) for help and to help. Many of Joomla's developers (who are all volunteers that freely contribute their time) are volunteering to put the finishing touches onjUpgrade.
jUpgrade allows you to migrate from Joomla 1.5 to 2.5.
Other migration solutions including commercial solutions are listed on the Joomla Extensions Directory and should be considered as well. Other tools are not included in this tutorial but should be given consideration before you use jUpgrade if your time is highly valuable and limited.
Let's get started!

Review the Requirements

Please, please save yourself (and possibly your clients) a lot of headaches and make sure that your server (and in the case of jUpgrade, your browser too) is up for the task. Please review the technical requirements for Joomla! 2.5. Please review therequirements for jUpgrade as well.

Before You Get Started

Before you get started, there are a few things that you are going to have to check and/or think about:
  1. Is your Joomla 1.5 version up to date? The most up-to-date version of Joomla 1.5 is 1.5.26. If your version is not up-to-date, upgrade to 1.5.26 before migrating, especially if you are running Joomla 1.5.19 or lower, as JUpgrade does not support older versions. Read how to download older releases of Joomla!. You will need the Joomla! 1.5.0 to Joomla! 1.5.26 package with file name: Joomla_1.5.0_to_1.5.26-Stable-Patch_Package.zip < direct download link. Read how to update from Joomla! 1.5.x to the latest version how to update from Joomla! 1.5.x to the latest version.
  2. Do all your extensions have Joomla 2.5 native versions? You can use Advanced Search on the Joomla! Extensions Directory to see what extensions support 2.5. Please note that jUpgrade is not currently able to upgrade all Joomla 3rd party extensions, so those will have to be done via their respective upgrade procedures. Supported by jUpgrade on January 2012 are AdminPraise, Kunena, K2, JoomComment, Virtuemart, redSHOP, CommunityBuilder, JCE, Contact Enhanced, JomSocial, redForm, JEvents, Akeeba Backup, Jumi and redMEMBER.
  3. Have you modified any core files? Any changes that you have made to core files in Joomla will be lost so please be forewarned.
  4. Is there a Joomla 2.5 compatible template available from your template provider? If not, do you feel comfortable making the changes yourself? There are a couple good resources:
    1. Chad Windnagle's Joomla Community blog
    2. Chris Davenport's "Template Changes for Joomla 1.6" presentation
    3. Joomla's Docs Template Tutorial Please note that although jUpgrade is not able to currently upgrade templates, the developers are working hard at implementing the feature.
  5. Is your language pack available in Joomla 2.5? Find your Joomla 2.5 Translation.
  6. Do you have folder or file permissions issues in your Joomla 1.5 installation?
  7. For a massive list of changes from Joomla 1.5 to Joomla 1.6, please see What's new in Joomla 1.6.

JOOMLA! PLATFORM 12.1

The Joomla! Platform is a software development framework for the developemt of web applications. This website documents the API of the Joomla! Platform and so does not include code from the Joomla! Content Management System (CMS).
On this page you can find the following information
  • The Joomla! Platform API reference, this information is available in the package called Joomla-Platform.
  • A number of third-party libraries used by Joomla! and/or is available for use by third-party Joomla! extensions.
Third-party libraries are documented here for completeness and because they contain valuable information not available elsewhere. However, to get the most out of the Joomla! Platform, and because libraries may be modified or replaced, please try to use the Joomla! Platform API in preference to calling the libraries directly.
Additional documentation is available on the Joomla! Documentation Wiki and in particular there is a manually produced API Documentation which has additional information and example code for classes and methods in the Joomla! Platform.
This website covers the 12.1 release of the Joomla! Platform. Source code is available on GitHub
These pages were generated from Joomla! Platform 12.1 Stable
(Sun, 20 May 2012 20:00:22 +0000)
SymbolDescriptionSymbolDescriptionSymbolDescription
ClassClassMethodMethodVariableVariable
Private classPrivate classPrivate methodPrivate methodPrivate variablePrivate variable
Abstract classAbstract classAbstract methodAbstract methodStatic variableStatic variable
Abstract private classAbstract private classGlobalGlobal
Static methodStatic methodConstantConstant
File folderFile folderConstructorConstructor
Class folderClass folderDestructorDestructorFileFile
Function folderFunction folderFunctionFunctionIndexIndex
Tutorial folderTutorial folderTutorialTutorial
Package folderPackage folderSubpackageSubpackage
If you notice any errors on any of these pages then please take a moment to report the problem on the Developer Documentation Forum. You can also ask questions on the Joomla! Platform Development Google Group

J2.5:Developing a MVC Component/Introduction


This is a multiple article series on how to develop of Model-View-Contoller Component for Joomla! Version Joomla 2.5. You can navigate the articles in this series by using the navigation box.

Read the Introduction or Start here. On any page you can use the links in the navigation box above.

Requirements

You need Joomla! 2.5 (with PHP, MySQL, Apache and Microsoft II) or greater for this tutorial.

Introduction

Joomla! 2.5 is constructed using three different applications:
  • installation (used for installing Joomla)
  • administrator (used for managing content)
  • public (used for displaying content)
The installation application is used once. The administrator and public are used through the concept of components. Each component has two entry points:
  • one is located in the components directory (it is used for displaying content)
  • one is located in the administrator/components directory (it is used for managing content)
Both are called com_componentname/componentname.php (the com_ prefix is a historical trace)

Thứ Tư, 15 tháng 5, 2013

Get locally hosted Joomla! website e-mail functions to work


Most ISPs block port 25 so you cannot send email from your own computer's SMTP server. This is to block spammers. If you don't intend to spam, you can use your ISP's mail server.
To get the email function from your ISP SMTP server even if you are hosting your own Joomla site on your own computer to work sign in as administrator to your Joomla site. In the menu bar: Site - Global Configuration - mail tab. Your data should look like the following:
Mailer: SMTP Server
MailFrom: someone@example.com
From Name: SomeName
Sendmail Path /usr/sbin/sendmail
SMTP Auth: Yes
SMTP User: johndoe (username at one of your email accounts at your ISP)
SMTP Pass: trr33459 (password at one of your email accounts at your ISP)
SMTP Host: smtp.charter.net (Whatever your ISP tells you to use for their SMTP servers)
The SMTP User, Pass, and Host are the same fields you enter when adding an Outlook Express Account, or Eudora, or any client email you may use on your computer.
You may run into problems with extensions that change the "from" address in the emails being sent out. For example, the ProjectFork extension sometimes sends emails as if they are coming from person in control of the project. This can cause a problem because some ISP SMTP servers will not allow a "from" address that does not match the user name (e.g. Rogers in Canada). You will get a message like this: "PHPMAILER_FROM_FAILEDname@whatever.com." A work around is to make sure that you always use a valid email address from you ISP for your users.

To access the Template Manager


  • Log in to the Administrator (Back-end). If you are not sure how to do this see: To log in to the Administrator (Back-end)
  • Click on: Extensions -> Template Manager
Tpl tut switch template 1.png
You will now see the Template Manager screen.
Note: If you do not see Template Manager listed as an option on the Extensions menu, then it is most likely because you are not logged in as a Super Administrator. Only Super Administrators will see this menu item.