Joomla- cutomizing Custom error (404) pages

September 22, 2008 · Filed Under Joomla · 4 Comments 

Custom error pages

Joomla! uses the templates/system/error.php file to handle several HTTP Status errors, including “403 Forbidden”, “404 Not Found”, and “500 Internal Server” Errors. You can style the error results, if desired.

It is important to understand that the error.php is an independent file from Joomla!. Plugins do not run on the file. You cannot include modules or use <jdoc:include> statements.

Overriding the System Error Results

To override the system error results, copy the templates/system/error.php file into your templates/<template-name> directory.

If it finds one, Joomla! will use the error.php file from the current template, in place of the system file.

You can format the page, as desired, to match your template.

Overriding the System Styling

If you want to change the styling, copy the templates/system/css/error.css file into your templates/<template-name>/css directory.

Next, update the your templates/<template-name>/error.php file to reference the new location of the stylesheet by changing this line, accordingly:

<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/error.css" type="text/css" />

For eg.

<link rel=”stylesheet” href=”<?php echo $this->baseurl; ?>/templates/<?php echo $this->template;?>/css/error.css” type=”text/css” />

Then, simply change the error.css, as desired, for your styling requirements.

Customizing Error Messages

You can add conditional logic to vary the message returned, dependent upon the specific error code.

Here is an example of how to trap a 404 error and provide a custom message.

<?php if ($this->error->code = '404') { ?>
	<div id="errorboxheader">Page not found</div>
		<div id="errorboxbody"><p>Sorry! That page cannot be found.</p>
		</div>
	</div>
<?php } ?>

HTTP status code

When a request is made for a page on your site, the server returns an HTTP status code in response to the request. Joomla! returns a ‘200 - the server successfully returned the page’ for error pages. This is problematic for those working with Google Webmaster Services and trying to get a sitemap resolved.

If you want Joomla! to return a status code for the error, you can do so by adding logic before the DOCTYPE line, as follows:

<?php
if ($this->error->code = '404') {
	header("HTTP/1.0 404 Not Found");
} ?>

Changing the Favicon Of Your Joomla Site

September 16, 2008 · Filed Under Joomla · Comment 

The favorite icon (commonly referred to as the favicon) is an image file that is 16×16 pixels, and is normally named favicon.ico.

You need to upload it to the template directory of the template that you are using. If you are using multiple templates you’ll need to upload it to different directories. If I were replacing the favicon in the Joomla! 1.5 default template Rhuk_Milkyway, You need to upload the favicon to: joomlaroot/templates/rhuk_milkyway/favicon.ico

Since your browser has already downloaded (cached) your old favicon, you probably won’t see the changed icon till you clear your cache and refresh (you may have to refresh multiple times before you see the changed icon).

Joomla Template Install: Another template is already using directory

September 16, 2008 · Filed Under Joomla · Comment 

“Template Install: Another template is already using directory: ‘joomlaroot/templates/template_name’”

The error message suggest, another template with the same name is already installed. There is also the possibility that the same template had been installed, but not properly uninstalled earlier. Either way, to get the template you have to work you will have to make sure to totally eradicate the previous template.

Solution to this is Uninstall the previous template.

Extensions–>Install/Uninstall.

Displayed is the
Extension Manager.

On the list of the different extension types, select

Templates.

Click the radio button next to the template you wish to uninstall, and then click uninstall. The template should be successfully deleted.

In case the template does not uninstall properly, you can log into your site via FTP, and delete it manually.

Log into your site via FTP, and go to this directory:

joomlaroot/templates/ click on the template to be removed and then delete it.
joomlaroot/templates/template_name

Changing Welcome to Frontpage component heading in Joomla 1.5

August 21, 2008 · Filed Under Joomla · 1 Comment 

1. Login to Admin of Joomla

2. Menu > Menu Manager

3. Selct the Menu

4. Look for the system parameters on the right, either disable or change the text.

Breadcrumbs not showing for Joomla weblogic template

August 19, 2008 · Filed Under Joomla · Comment 

Steps

1. Login to Admin ->module manager -> click “new”

2. Select “breadcrumbs” and then the next page will give you the parameters for the module: location, menu locations.

3. check “no” for title to show

4.  Position : breadcrub

Enable it and you are done

JFTP::login: Unable to login

August 19, 2008 · Filed Under Joomla · 1 Comment 

While installing a component I encountered the following error

  • JFTP::login: Unable to login
  • JFTP::store: Unable to use passive mode
  • Warning! Failed to move file.

After some research i realized that I had changed the FTP login details on my hosing server

So I logged in to Joomla Admin and changed the FTP settings under Global configuration.

Now its working like a charm

How to insert html code in Joomla content or module?

July 23, 2008 · Filed Under Joomla · 5 Comments 

Many of the times there is need or requirement to insert raw HTML in a Joomla article or module. For example, embedding Google maps etc.

Unfortunately, sometimes the editor screen you are using will strip out the HTML code, or cause an error. Rather than having to turn the editor on/off in global configuration, there is an easier way.

Try using JCE editor, it has an option to insert html code and javascript in advance mode

OR

Try this trick.

Make a super administrator, say “htmlinsert”. and then find him in the user manager and change his editor to “No Editor”.

Any time you need to work in raw html, log in with the user “htmlinsert” , front end or back end.

This also works for articles too.

How to find the module positions for a new or existing Joomla template?

July 22, 2008 · Filed Under Joomla · 1 Comment 

To find the module positions in your Joomla 1.0.x or  Joomla  1.5.x template simply add  the following  to your URL

/index.php?tp=1

for eg. if your domain name is www.mydomain.com,  then to find the module position type in the addressbar

www.mydomain.com/index.php?tp=1

Adding new module position to Joomla 1.0.x and 1.5.x

July 22, 2008 · Filed Under Joomla · 2 Comments 

In Joomla 1.0.x we can add new module positions by going to

Site -> Template manager -> module positions (total 50 places). [Add your position]

However in Joomla 1.5.x we need to add the module positions within the templatedetails.xml under the active template folder

<positions>
<position>hornav</position>
<position>breadcrumbs</position>
<position>banner</position>
<position>left</position>
<position>right</position>
<position>top</position>
<position>search</position>
<position>topsl</position>
<position>user1</position>
<position>user2</position>
<position>user3</position>
<position>user4</position>
<position>user5</position>
<position>user6</position>
<position>user7</position>
<position>user8</position>
<position>user9</position>
<position>footer</position>
<position>syndicate</position>
<position>debug</position>
</positions>
Simply add another line(s) with <position>your module position</position> and place it in the order it will appear within the list

Installing Joomla 1.5.x

July 18, 2008 · Filed Under Joomla · Comment 

With the increasing popularity of Joomla most people are moving towards Joomla.

I would like to take the initiative to help the new Joomla family members installing Joomla 1.5.x version on their server

Please follow the following steps

  1. Download joomla package from joomla.com
  2. Decompress the file downloaded
  3. Login to your FTP server
  4. Upload the extracted files on the server
  5. Open web browser.
  6. Access the site http://yourwebsite.com you will get first installation page.
  7. In first page, you will choose language. Default en-GB - English. Click Next button on top right.
  8. Next step, Joomla will check your system before installation. On top part, your system must match with requirement. If not, your Joomla installation not functioning correctly. There are several recommended setting on bottom page. If your settings do not quite match the recommended, it will be red warning on actual column. You can fix it or leave. Click next button to continue.
  9. Next page about licence. Read carefully. Click next button.
  10. Next page about database configuration. Before configure, make sure you made a database for joomla. These must already exist for the database you are going to use.If not ready, open your phpmyadmin. Create a new database, for example give name “joomla”.Then, fulfill all item at database configuration. Click next button.
  11. Next page about FTP Configuration. Click Next button.
  12. Next page about site configuration. Enter your site name, email and admin password.Click Install Sample Data button.Then, Click Next button.
  13. If you get sentence “Congratulations! Joomla! is installed.”, your steps successfull.
  14. The last step, remove folder installation from your root directory.

If you want look site, click Site button. Or click Admin button for login to administration page.

Next Page »