PDA

View Full Version : [TUT] How to make Joomla 1.0



Jibbish
26-05-2008, 08:12 AM
Ok, I have posted on other forums.
This tutorial will teach you how to make Joomla 1.0 layouts.

Firstly before you do anything you will need the following:

PHP Enabled Web Hosting
Joomla Installed*
Fully Coded Layout (In divs or tables)
And Basic Knowledge Of HTML

Firstly you get your coded layout and upload it to the directory your Joomla is in.

Once you have done that open up your index file with notepad or any html editor.
You will see the code below at the top of your page depending on what you have used to code the layout.

HTML Code:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
</head>


You will need to replace that to this:
PHP Code:


<?php defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php $iso = split( '=', _ISO );
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
</head>
<?php mosShowHead(); ?>
<?php
if ( $my->id ) {
initEditor();
}

if ((mosCountModules( 'user1' )) && (mosCountModules( 'user2' ))) {
//this just sets all the modules
$usera = 'user1';
$userb = 'user2';
} else if ((mosCountModules( 'user1' )) || (mosCountModules( 'user2' ))) {
//and this one
$usera = 'user3';
$userb = 'user3';
}
?>
Now we go onto displaying the modules your content boxes
To display a module you will need to eneter the following code into the table or div

PHP Code:

<?php mosLoadModules ( user1, -2 ); ?>
The user1 is the id of a module. You can check all your module ids in the administration of your Joomla CMS.

To display the main content area you will need the following code
PHP Code:

<?php mosMainBody(); ?>
mosMainBody will grab the main content.

Once you replaced the top of you page and put the module codes wherever you want, select the whole source code and copy it Administrator > Site > Template Manager > Site Templates select a template and erase the current code in the editor and paste in the you copied. Save the HTML document then voila your done.

*You can install Joomla by acessing the Fantasico of your website cPanel if you have it enabled.

seniorJOSH
26-05-2008, 09:25 AM
Briliant work! :eusa_clap

Clear tutorial, idiot-friendly.

Want to hide these adverts? Register an account for free!