v WebsiteSupport: Joomla Help
Showing posts with label Joomla Help. Show all posts
Showing posts with label Joomla Help. Show all posts

December 18, 2010

CSS and Joomla

What is CSS?

If you know HTML and CSS, you have a huge advantage when trying to customize your website. Most extensions are fine the way they look when you install them. However, if you want the look of your website to be consistent, you often need to do some CSS tweaking. So if you don't know any CSS, you'd better start learning now. This post is not about learning you the specific techniques of CSS. Rather it is written to give you an overview on how CSS is used in Joomla.

This is what Wikipedia has to say about Cascading Style Sheets:

"Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics (that is, the look and formatting) of a document written in a markup language. Its most common application is to style web pages written in HTML and XHTML, but the language can be applied to any kind of XML document, including SVG and XUL.

CSS is designed primarily to enable the separation of document content (written in HTML or a similar markup language) from document presentation, including elements such as the layout, colors, and fonts.

The bold part of this excerpt from Wikipedia is the most important thing to know about CSS, in my opinion: Separation of content (HTML) and visual presentation (CSS). By using CSS, we can use one, centrally located file with all the styles. Keeping the styling separate from our Joomla articles. That way, site-wide style changes are easy to do. Just imagine if you did article specific styling in each and every article on your site. It would be a nightmare to do style changes - in the case of a redesign or template change.

Joomla CSS and templates

I'm always amused when I read a tweet saying something like: 'Joomla doesn't support IE!'. Or: 'Joomla is not search engine optimized'. Of course it is! But the template might not be. It all comes down to how the template HTML is built and how the CSS (Cascading Style Sheet) codes are implemented. 

Most of the time, the template CSS files are found in the /templates/TEMPLATENAME/css/ folder.

Some templates use only one CSS file (called template.css, mostly), others have several. For optimal page performance, you should keep the number of CSS files to a minimum. This reduces the number of server requests necessary to show the page. You may sometimes see that the template uses a main CSS file which imports all of the other files by the following syntax (example):
@import url('reset.css');
@import url('joomla.css');
@import url('typography.css');
@import url('modules.css');
@import url('custom.css');
CSS Best Practices

Let's say you have installed a template from YooTheme. You could go bananas and change all of the CSS files wildly. Probably won't be a terrible thing to do either, as you can download the original files again if you screw something up.

However, there is a better way. When you want to override CSS in a template, use a separate stylesheet. YooTheme has actually implemented this structure in their templates already. They have included a blank CSS file called custom.css which is loaded after all other CSS files. This is where I keep all of my style changes.

If I want to upgrade my template, I can just copy this custom.css file, upgrade my template to the latest version and upload the custom.css file again. All set!
Don't repeat styles if you don't need to

When styling elements with CSS it's important to be specific. And to keep your stylesheet lean. What I mean is you don't need to repeat styling just because you want to restyle an element. Let's say, for instance, that you have the following style for the H1 tag in your main CSS file (template.css or similar):
h1 {
font-size:24px;
color:#d7d7d7;
margin-bottom:1em;
text-transform:uppercase;
}

The normal styling for H tags are bold. Maybe you want to add the styling to make the header tag use the normal and not the bold style of the font. And, at the same time you don't want to have uppercase letters in the H1. Of course, you could do it like this, adding the following code to your custom.css:

h1 {
font-size:24px;
color:#d7d7d7;
margin-bottom:1em;
text-transform:none;
font-weight:normal;

This works, but it's not good code. You repeat all of the styling even though you just want to alter one style and add another. This is a better way:
h1 {
text-transform:none;
font-weight:normal;

In this case, you only add the styles that are different from the original. The other styles are left untouched.
Use Firebug to Test Your CSS

One of the tools I use to test my CSS is called Firebug. It's an add-on to Firefox which gives you a lot of information about the CSS and HTML structure of a web page. When you have Firebug installed, you can right-click on an element and choose 'Inspect element'. The Firebug window will open at the bottom of the screen. Now, you can see the HTML structure (left) and the CSS (right).

Now the fun begins! You can start experimenting with the CSS directly in Firebug. Want to change the margin of an element? The background color? Remove the border? Every tweak you would like is available to play with, and the result is instantly shown in the browser. Of course, if you refresh the page the changes are lost. When you're happy with your changes, copy the CSS into your custom CSS file and upload to your server.

Take a look at my previous post about top 10 Free joomla extensions every Joomla user should have.


Take some time to learn CSS

I believe every Joomla user / web site developer should learn some CSS and know HTML by heart. It makes it so much easier to modify your templates and to achieve what you (and your client?) wants.

It's not like learning PHP. I hardly know more than a handful things about PHP. HTML and CSS, however, are like second nature to me. That's because I've invested time into learning and practicing the use of these skills. This is especially true for CSS.
Easy to get started with CSS and Joomla

The easiest way of starting to learn CSS is to look at your existing template.css. Look at the structure of it and try changing some of the styles. Do a backup of the file first.
You could try and change the header tags first. Want the H2 tag to be smaller? You got it :) And now it's a site-wide change, valid for all instances of the H2 tag. Other tags to change are the a (link) tag, the p (for instance adjusting the line spacing) and the UL and LI tags (bullet list). 

March 22, 2010

How to make joomla site load fast?

Compressing Web pages with GZIP

Compression is a quick and efficient way to save your server bandwidth and speed up your website load time. By adding a piece of PHP code to the top of your Joomla generated Web pages, you can instruct the Web server to compress files for transit to your visitors' Web browser. This is especially useful for text-heavy Web pages that are over 100K in size.

To Optimize Your Joomla Site with GZIP Compression

Go to Extension >>Templates Manager
Open your default template and click on Edit Html button

Add the following code to the very top and above the DOCTYPE:



Done.

Note: make sure you have GZIP Page Compression turned on in Joomla Global Configuration>>Server

This will decrease website load time significantly for sites that are larger than 100k. For sites that are less than 100k in size, it may not have too much affect on page load time.

August 07, 2009

Top 10 Websites for Free Joomla Templates

1.http://www.joomla24.com/

This is the Downloadbase for Joomla Templates. In collaboration with the biggest german Downloadbase "www.joomlaos.de" which offer more than 2200 Templates with live preview for Joomla.

2.http://www.siteground.com/
SiteGround web hosting company has the largest collection of free Joomla 1.5 and 1.0 templates with new releases every week!This offer free installation of Joomla 1.5 and Joomla 1.5 or 1.0 Templates with their professional Joomla 1.5 hosting services.

3.http://www.bestofjoomla.com/
Bestof joomla contains commercial,free as well as paid joomla templates.

4.http://www.joomlashack.com
Joomlashack also contains commercial,free as well as paid joomla templates.

5.http://joomlartwork.com
This site provide free Joomla templates as well. But it needs to registered in this site.

6.http://www.joomladesigns.co.uk

This site have developed a number of free joomla templates for Joomla 1.5 and 1.0 which you can download from here. You do not need to register to download the free joomla templates.

7.http://www.themza.com

Here you can see all free templates for Joomla, Wordpress, Moodle and 4Images offered on our website. They are all available in .ZIP format. For more information on how you can make use of these free cms templates for your personal or business blog, forum, cms or photo gallery website.

8.http://www.themebase.com

Free Joomla, WordPress, phpBB, vBulleting, XOOPS, PHPNuke,templates

9.http://www.themebot.com

Preview and download free Joomla templates to use on your website. All module positions are published in the Themebot demos. Because the Joomla templates in the Themebot demos are all running on a single Joomla installation, there may be minor display issues on some templates. To see a template in it's full glory, please also check the template details for the author's demo or website.

10.http://www.kangainternet.com.au

Kanga give you a ton of free joomla templates to use on your websites. This have a wide variety so please browse, choose and download as many as you would like. The Joomla templates here provided totally free and without charge. Download them and take full advantage.


July 29, 2009

Top Ten Joomla Extensions

We have been using Joomla on a daily basis since its beginning, we have compiled a list of our top ten Joomla extensions (Components, Modules, Mambots and Plugins) which have been tested and proven. These will add substantial functionality to your Joomla CMS Website, download them and judge it for yourself!

1. Community Builder Community Builder

Community Builder suite (CB) extends the Joomla! user management system. Key features: extra fields in profile, enhanced registration workflows, user lists, connection paths between users, admin defined tabs and user profiles, image upload, front-end workflow management, integration with other components, like PMS, Newsletter, Forum, Galleries. Release 1.1 is compatible with all Joomla! 1.0.x (including 1.0.15) and Mambo 4.5.2-4.6.4. New CB version 1.2 RC brings Joomla 1.5 native compatibility (and keeping Joomla 1.0.x and Mambo 4.5.2-4.6.4 native compatibility), multi-criteria user searches, full field controls of core fields, ajax email and username checkers, new lost username/password form and many more features and fixes.
note: This extension requires registration to download.
2. JCE JCE
An advanced, configurable WYSIWYG editor for Joomla! based on Moxiecode's TinyMCE.
Includes advanced Image/Media and File handling, plugin support, and an Administration interface for editor configuration.
note: This extension requires registration to download.
3. sh404SEF sh404SEF
sh404SEF rewrites Joomla URL to a more user-friendly format (SEF URL or URL rewriting): mysite.com/index.php?option=com_content&Itemid=69&id=34... becomes mysite.com/en/sh404SEF-and-url-rewriting/list-of-available-plugins.html). It is also a security component and manages title and meta tags : automatic tags, or manual for every page. It works with or without .htaccess file. Fully Joomfish compatible. Caching system for high speed and very small DB queries overhead. Support many components natively but uses also sef_ext from OpenSEF/SEF Advanced. VirtueMart, Fireboard, Community Builder, mosetsTree, HotProperty, Sobi2, Docman, myBlog, iJoomla Magazine,News Portal, Remository and more supported natively. SSL switch, automatic 301 redirection from non-sef to sef and from Joomla SEF to sh404SEF, insert Google news style numerical ID,.. Many backend parameters to control URL construction behavior.
4. JoomlaPack Joomla Park
JoomlaPack is an open-source backup component for the Joomla! CMS, quite a bit different than its competition. Its mission is simple: create a site backup that can be restored on any Joomla!-capable server. It creates a full backup of your site in a single ZIP archive. The archive contains all the files, a database snapshot and an installer derived from the standard Joomla! installer. The backup and restore process is AJAX powered to avoid server timeouts, even with huge sites. Alternatively, you can make a backup of only your database. If you want a reliable, easy to use, open source backup solution for your Joomla! site
5. VirtueMart VirtueMart
The complete e-Commerce shopping cart solution for Joomla! - used by thousands of store owners. It can be run in Store- and Catalog-Mode. With its powerful Administration Tool you can handle an unlimited Number of Categories, Products, Orders, Discounts, Shopper Groups and Customers.
6. JEvents JEvent
This project brings the well known and loved Events Calendar to Joomla. JEvents consists of a Joomfish compatible Joomla component and a number of modules and mambots.

Component
* One-off Events and complex repeating patterns of events can be created and viewed in an attractive calendar and a variety of list formats.
* Events can be categorised and calendar views can be customised to show all or some of these categories

Modules
* Mini-calendar module (events_cal) which gives a quick overview of events which can be placed on any page
* Latest events modue (events_latest) which gives a highly configurable summary of upcoming events
* Events legend (events_legend) - displayed alongside the component gives you a summary of event categories and an easy way to limit the events shown to specific categories

Mambots/Plugin
* A search mambot/plugin that enables the global Joomla search to return results from the events calendar
* Post event report feedback that allows event reports or photo gallery links to be shown in the event detail after a set date
7. AllVideos AllVideos
AllVideos (by JoomlaWorks) is truely the all-in-one media management solution for Joomla!.

You can use the plugin to easily embed videos hosted on popular services like YouTube, Metacafe, Vimeo (and many more) inside your Joomla! articles (content items). Additionally, it allows you to playback almost any video/audio filetype directly from your server or a remote server, giving you the competitive edge when it comes to rich media content.
8. Joom!Fish Joom Fish
The Joom!Fish project is your add-on for managing multilingual content within the content management system Joomla!. The project, which was formally known as MambelFish is rewritten and enhanced in order to be compatible with the new versions of the Joomla! project.

The Joom!Fish is an add-on component for Joomla! which allows you to maintain and organize your manual translated content in your Joomla! database. Check out our website for more details about the features and possibilities.

The new version Joom!Fish 2.0 incorporate natively with Joomla! 1.5 and allows you to manage your translations now also within the new Joomla! Framework.
9. FireBoard Forum Fireboard (JED no longer offers or endorses Fireboard)
FireBoard is fully integrated forum solution for Joomla!/Mambo which requires no bridges or hacking core files. It can be easily installed like any other component.
note:FireBoard is compatible with joomla 1.5 in legacy mode.

!!Update!!
Kunena Forum (Replacing Fireboard)
Kunena, translated from Swahili meaning "to speak", arose out of a fork of the former Fireboard forum with a new team and some of the previous developers, including several Joomla core developers.

10. JoomlaXplorer Joomla Xplorer
joomlaXplorer is a File- and FTP - Manager. It allows you to edit files, delete, copy, rename, archive and unpack files/directories directly on your server. You can - Browse Directories & Files - Edit, Copy, Move and Delete files - Search, Upload and Downloading files - Create new files and directories - Change file permissions (chmod) and much more This script is based on QuiXplorer 2.3.1

June 17, 2009

PHP code in Joomla content

Joomla is great for building all sorts of websites, but Websitesupport find that the real power comes from being able to mix and match PHP/MySQL code with the rest of the Joomla code.

There are numerous ways to do this:

  1. If you want to do it the right way then you can always write a custom module or component. A module is not that difficult, but a component is a bit of a different story. I am not going to go into how to write a component here, since the focus of this entry is rather on doing a quick and dirty!

    I've seen this Extension on the Joomla site:
    It is a Developer Toolkit for Joomla that, among other things, "creates boiler plate components" - will check it out one of these days and write up some feedback.

  2. You can use the Static Files component. I used this quite extensively on some of my sites, and it works quite well.

    You can download it from http://www.joomlaxt.com/ and the author has now written up a quick guide that should help you get going with it. You can find it on joomlaxt.com.

    Update : 26 Jan 2008: I do not use this at all any more, but rather KL_PHP, as described below.

  3. But here is the clincher! The BEST way to do 'quick-and-dirty' PHP programming inside Joomla is to use this mambot: KL_PHP. This mambot is not publically available any more but you can download here KL_PHP Mambot.
    Also, you cannot use this bot directly in modules, for that you require the module: mod_kl_evalphp.zip
    Now, I do realise that there are other options available by now, as also commented on below, however, this has worked very well for me up to now so I am not really interested at this stage to try something else!
  4. Here are my tips to get the most out of it:
    • Firstly, don't even try and use it if you have your WYSIWYG editor on. The WYSIWYG editor will destroy some of your code and you can never be sure that the code that you entered so painstakingly will still be there after you've saved it. So be sure to turn your WYSIWYG OFF when you use it in any page.
    • Then make sure that the Mambot is actually published!

You can then create a 'Static Page'. Make the name and title both 'some page' and link it to a menu item called 'Some Page'. I normally use the Othermenu or Usermenu to publish these types of pages for testing purposes. Your 'Some Page' page with your kl_php mambot will then look like this:

{ kl_php}

$inv_num = $_POST['invoice_id'];

and so on ...ending with

{ /kl_php }

Here are a couple of power tips:

  • You can use multiple { kl_php } ... { /kl_php } combinations through your page, but if you want to refer to $inv_num, as in the example above, later on in your page inside a different { kl_php } ... {/kl_php} block, you have to declare it as global first in the other blocks else it it won't have the value you originally assigned to it, it will be seen as a new variable.
  • Apart from that, you can also include other PHP files inside your { kl_php }... { /kl_php} block. This is very powerful since if you don't want to be bothered with writing your PHP code inside your Joomla content, you can write it as external PHP files and just include the PHP files. For maintenance purposes this might be better since if anything happens to your Joomla installation your PHP code will be gone too!
  • PLEASE NOTE: FOR SECURITY PURPOSES ALWAYS INCLUDE A CHECK AT THE TOP OF YOUR FILE TO MAKE SURE THAT THE INCLUDED FILE IS CALLED FROM THE JOOMLA ENVIRONMENT. For example, make sure that you include the following line at the top of your included PHP code:

    defined( '_VALID_MOS' ) or die( 'Restricted access' );
  • You can print output directly to the front end by using 'echo' and 'print' - at least in all the cases that I've used it. In some of the older forum entries it is specified that you should use 'Return' to output any values to the front end, however, I have not found that to be the case any more.
  • In my most recent usage of this mambot, I have even found that it is possible to sessions. It is therefore possible to code quite complex applications directly into your Joomla content by passing parameters through forms as well as sessions.

This is just a quick write-up of the basic functionality of this great extension - any more questions, just write a comment or drop me an email and I will see if I can elaborate.

Why use Joomla for web design?


The fact,Joomla is one of the easiest ways to quickly design and create your own website. You can easily create a wonderful looking website with loads of functionality. Wordpress is another way to create and manage your own website - but more on Wordpress somewhere else.

Joomla started life as an Open source Content Management System called Mambo. In August 2005 a split took place between the core developers of Mambo and the owners of the Mambo name. The developers decided to continue the development of this software under the name Joomla and most of the community that previously supported Mambo have now thrown in their weight behind the new product.

You can install Joomla from the Fantastico Panel inside the cpanel that comes with all the hosting companies. You need to have PHP and a MySQL database available, but these are also included with ALL the hosting companies, so it really is easy to get it up and running on your site.

If you would like to see Joomla in action, you can check out this demo site:

http://demo.joomla.org

In this demo you will see the front end of Joomla ( in other words, an example of a website that you can build with Joomla).

You can also log into the administrator section, where you would go to add new content (in other words, text, pictures, file downloads etc) to your site. Select the administrator option and use the username and password provided on the site to play around with the back end of the site.

But what if you don't like the look and feel of this site?

No problem! Joomla has literally hundreds of free templates available - one of my favourite sites is this one - Mambo Hut, your source for free Mambo/Joomla templates!

Joomla comes with a lot of built-in functionality but there are also thousands of free components and modules that you can add on to expand the functionality.

The other nice thing about Joomla is that there are lots of forums that offer free support and guidance. The problem normally with freeware is that support is provided not through any licensing fees that you pay, but through a community that all contribute and therefore gain themselves in the long term. Joomla has a very active community, and it is therefore very easy to get support for any possible problem.

The Joomla forum and all the extensions to Joomla in the form of components and modules can be found on http://www.joomla.org

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | coupon codes

HTML Hit Counter