net/fr/
This tuturial for help you to have only one joomla folder installation for many websites. 1- Choose one folder for joomla files: In your Control Panel (CPanel), enter to Filemanager and create one folder to be used in all your websites: In this tuturial I call it joomla. Unzip the Joomla files in this folder /joomla 2- defines.php Create this file /joomla/defines.php
<?php // No direct access. defined('_JEXEC') or die; define('JPATH_BASE', dirname(__FILE__)); $parts = explode(DS, JPATH_BASE); //Defines. define('JPATH_ROOT',implode(DS, $parts)); include_once dirname(__FILE__) . '/configuration/sites.php'; $host = $_SERVER['HTTP_HOST']; $site = $sites[$host]; define('JPATH_SITE',JPATH_ROOT); define('JPATH_CONFIGURATION',JPATH_ROOT . '/configuration/'.$site); define('JPATH_ADMINISTRATOR',JPATH_ROOT.DS.'administrator'); define('JPATH_LIBRARIES',JPATH_ROOT.DS.'libraries'); define('JPATH_PLUGINS',JPATH_ROOT.DS.'plugins' ); define('JPATH_INSTALLATION',JPATH_ROOT.DS.'installation'); define('JPATH_THEMES',JPATH_BASE.DS.'templates'); define('JPATH_CACHE',JPATH_BASE.DS.'cache'); define('JPATH_MANIFESTS',JPATH_ADMINISTRATOR.DS.'manifests'); define('_JDEFINES', 'anezi');
3- Configuration folder Create this folder /joomla/configuration This folder will contain the configuration file for each website. Create a folder for each website. Here I have two websites, so I need two folders: /joomla/configuration/promotionsociale.com /joomla/configuration/new.anezi.net 4- Configuration file You need to create a configuration file for each website, here I need two files:
public $MetaRights = \"2011 All rights reserved\"; public $sitename_pagetitles = \"1\"; public $force_ssl = \"0\"; public $feed_email = \"author\"; public $cookie_domain = \"\"; public $cookie_path = \"\"; public $MetaTitle = \"1\"; }
You need to change the parameters for each web site. 5- Liste of web sites file You need to create a file which contains the list of host names of each web site: /joomla/configuration/sites.php In my case, this file contains:
<?php $sites["new.anezi.net"] = \"new.anezi.net\"; $sites["www.new.anezi.net"] = \"new.anezi.net\"; $sites["promotionsociale.com"] = \"promotionsociale.com\"; $sites["www.promotionsociale.com"] = \"promotionsociale.com\";
After that you can use the same extensions, templates, modules, plugins for all your websites, and you can do updates easily. I used it for 6 websites. Enjoy it :) Framework del flautas http://www.nooku.org/partners.html http://gantry-framework.org/documentation/joomla/basics/key-features http://www.anahitapolis.com/download/anahita-shiraz-template http://blog.hycus.com/2011/08/10/top-10-things-you-should-not-share-on-social-networks/ http://www.bestofjoomla.com/component/option,com_bestoftemplate/Itemid,46/
} function minimizeimg($src_image, $dest_image, $newwidth = 200, $jpg_quality = 90) { // Get dimensions of existing image $image = getimagesize($src_image); // Check for valid dimensions if( $image[0] <= 0 || $image[1] <= 0 ) return false; // Determine format from MIME-Type $image['format'] = strtolower(preg_replace('/^.*?\//', '', $image['mime'])); // Import image switch( $image['format'] ) { case 'jpg': case 'jpeg': $image_data = imagecreatefromjpeg($src_image); break; case 'png': $image_data = imagecreatefrompng($src_image); break; case 'gif': $image_data = imagecreatefromgif($src_image); break; default: // Unsupported format return false; break; } // Verify import if( $image_data == false ) return false; // Calculate measurements list($width,$height)=getimagesize($src_image); if($width > $newwidth){ $newheight=($height/$width)*$newwidth; }else{ $newwidth = $width; $newheight = $height; } // Resize and crop $canvas = imagecreatetruecolor($newwidth, $newheight); if( imagecopyresampled($canvas, $image_data, 0, 0, 0, 0, $newwidth, $newheight, $width, $height )) { // Create thumbnail switch( strtolower(preg_replace('/^.*\./', '', $dest_image)) ) { case 'jpg': case 'jpeg': return imagejpeg($canvas, $dest_image, $jpg_quality); break; case 'png': return imagepng($canvas, $dest_image); break; case 'gif': return imagegif($canvas, $dest_image); break; default: // Unsupported format return false; break; } } else { return false; } }