Joomla CMS Notes

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

<p>We have recently converted our site to Joomla.  It's an open source content management system (CMS) that runs on PHP and MySQL. This CMS =
system has many feature which we will start exploring and hopefully =
report back to you.  This is to serve as notes for those with solid =
Unix/Linux/FreeBSD, HTML, CSS, PHP, and MySQL background.  It does not =
cover a step by step scenario, with key by key directions, but notes on =
the process went through.</p><h1>Exploration</h1><p>We initially =
explored setting Joomla up on an internal FreeBSD development machine.  =
Here we received first hand experience installing, configuring, and =
tinkering around with Joomla.  The for those new to CMS, the structure =
an organization of the administration UI will be a little foreign.  Our =
first objective was to structure the site like our old one.  This is a =
visual and content similarity.  One thing we were not looking for was a =
"blog" layout.</p><h2>Planning, Development and Design</h2><p>After =
getting the basics under control, we started working on template =
creation.  Our template started out as a static HTML file generate by =
Adobe Photoshop.  This was chosen as Photoshop efficiently slices and =
optimizes the images, and create the HTML table that will be used for =
the layout.  We then stripped the images out of the html file, and =
modified the emptied table for use of CSS rather than HTML for layout =
purposes.  At this point we moved the images into the background and =
back into their cells as needed.  This is also a good time to rename the =
images.  Once this was done we started to massage the template on the =
FreeBSD development box that was loaded with Joomla.We changed the =
system settings and added CSS as needed until all the pages looked =

sufficient.</p><h2>Website Organization</h2><p>While creating your template is a good time to decide what features your site will have.  =
For example, now is a good time to decide on navigation, content =
organization, polls, searches, and other modules you might chose.  Let =
start with the basics of CMS organization.  First is the menu structure. =

</p><h3>Menu Items</h3><p>Each navigational menu item works it's way down to content, modules, or articles.  The problem with CMS is that =
most people plan from top down, breaking big items into smaller and =
smaller groups, while CMS systems generally want to work in the opposite =
direction.  For example, before we can make a menu that lists a category =
of articles, we first have to create the category be for we can create =
the menu item.</p><p>Content is organized into articles, categories, and =
sections.  We might think of the news paper analogy: the paper is made =
up of sections for home, business, local, politics... And the list goes =
on.  Each one of these sections is broken into different categories: =
local's section includes restaurant reviews, community events, and =
editorial categories.  Each category must be in a section.  Each article =
must be in section/category.  You will need to define the sections and =
categories before you may create the menu structure. =

</p><h3>Articles</h3><p>For you pages composing of mostly static content, such as the about us page, or the home page, you will want to =
create some static articles for their content.  You can either create a =
specific section/category to pus these single article pages, or you can =
leave them as uncategorized.  Next, using the <em>"Articles &gt; Article =
&gt; Article Layout"</em> menu item type, link the article into the menu =
structure and now you have create a page.</p><h3>Design and =

Development</h3><p>At this point, we continued the process of creating our menu, and tweaking the CSS for each view until the site was built =
out on the development system.  In the Joomlafolder, thier is a =
directory for templates.  Create you a new folder for your template.  =
You template will need a <em>"templateDetails.xml"</em> file proving the =
system with required meta data about you template, and how to install =
it.  Copy this file from another template and edit it to fit your needs. =
 We will need to place our template HTML file into this folder and =
rename it to <em>"index.php"</em>.  Copy all required images, scripts, =
and CSS files you template uses.  Create empty <em>"params.ini"</em> and =

<em>"component.php"</em> files.  These are used for advanced configuration and rendering.</p><p>Before we start inserting the 'Joomla =
tag' -- probably a bad term since it is PHP code -- into the page, we =
need to define Joomla's page structure.   A page is made up of modules =
and one component.    The modules are forms of navigation that when =
selected will change the component on the screen.  The component is the =
pages content, the body of the page, and their can only be one. =

</p><p>Now we need to start editing the <em>"index.php"</em>.  We will need to add <em>"&lt;? defined( '_JEXEC' ) or die( 'Restricted access' =
); ?&gt;"</em> to the top of the file before the opening HTML tag.  The =
following code is to insert modules into different parts of the page.  =
For example the main menu is a module.  A poll, search, contacts, and so =
on are modules.  You assign a unique name to each area where the modules =
appears and insert the following code:</p><blockquote><p><em>&lt;? =
if($this-&gt;countModules('left')) : ?&gt;<br />    &lt;jdoc:include =
type=3D"modules" name=3D"left" style=3D"xhtml"/&gt;<br />&lt;? endif; =

?&gt;</em></p></blockquote><p>And finally the body of the page is =
"<em>&lt;jdoc:include type=3D"component" style=3D"xhtml"/&gt;</em>".  With this knowledge you can link your HTML template to Joomla and start =
tweaking the CSS for Joomla. Make sure to test the pages in booth IE and =
Firefox.  While HTML has become highly reliable in consistent rendering =
from browser to browser, the industry has moved to new standards that =
don't render as reliable from browser to browser live CSS. When I can't =
get the CSS working 100%, I will use some HTML in the name of efficient =
using my time.  Once the CSS has been tweaked, and each screen tested =
the the highest anal design standards, it's time to go =

production.</p><h3> Going Production</h3><p>The process of going production is more or less testing your <em>"templateDetails.xml"</em>.  =
To do this we will want to move out template out of Joomla's template =
folder.  We will then zip up the folder and upload the template to =
Joomla.  Joomla will check the XML file and provide feedback as to =
errors.  Correct these and try again.  Once the file has successfully =
installed, set it as the default template and start test =

browsing.</p><p>Next is backing up your database.  Who wants to spend all that time retyping the content and/or recreating the structure.  To =
do this, we will use MySQL Administrator.  Using MySQL administrator, =
backup the database using the default setting.  This is enough to =
restore the content and structure should a disaster occur.  Along with =
the template file, and the original installation, you should have what =
is needed in the case off a worst case scenario. =

</p><h2>Installation</h2><p>The installation of the site is alot like we did before, but it's probably occuring on a remote shared hosting =
server.  Our host provides us with a linux system that has shell access, =
Apache, PHP, MySQL, and phpMySQLAdmin.  Make sure to create and test you =
database with phpMySQLAdmin.  Next, uploaded the required files in =
compressed format and log into the shell to uncompress them.  This cuts =
the time down significantly, and would not be possible without shell =
access.  Install the template.  Once Joomla is functional, and the =
administration and public side have been verified, it's time to delete =
all Joomla's tables from the database and restore our backup copy.  We =
need to remove the "create/use database" lines from the SQL backup file. =
 Not using phpMySQLAdmin, upload the code and execute it.  If all goes =
well, you sites content has been uploaded and is running.  Make sure to =
change the administrator password as it now is that same as was on the =
development servers. </p><h3>Backup</h3><p>I should not need to say more =
about why, but I will say backing up it the same process as going =
production again.  Make sure you have a template, database backup, and =
the original software should your server defecate on it's self. =

</p><p>---------------------------------------- </p><p>Shawn =
Zernik</p><p>(c) Copyright <a href=3D"/">Internetwork Consulting</a> =
2009</p> <p>You may use this document, but must preserve the copyright and the link to Internetwork Consulting &lt;<a =
href=3D"/"></a>&gt;.<br /> </p>

Site Timeline