R00t pr0gre$$

The Homepage of Evan Fillman

Joomla
Joomla Time Offset PDF Print E-mail
Wednesday, 24 December 2008 20:13

I was having trouble getting the time offset from the global joomla configuration.

 Heres the solution, hope it helps someone

$offset = JFactory::getConfig()->getValue('offset');

 then use this to create a JDate object the you can use to return the correct time

 $time = new JDate();

$time->setOffset($offset);

echo $time->toFormat("%H%M);

 

 
Create your own site icon PDF Print E-mail
Monday, 01 December 2008 02:07

Many people may be interested in creating their own website icons, these icons appear in many popular browsers next to the location bar (http://en.wikipedia.org/wiki/Favicon). However doing this does pose a small amount of difficulty because the  favicon.ico must be in the special ico format, a magical format that browsers understand.

 The eaisest way I have found to accomplish this task quickly is to use a program called icotool from the package icoutils (http://www.nongnu.org/icoutils/)

 just "apt-get install icoutils" and you should now have a program available called icotool from the terminal.Then prepare two copies of the image you would like to use for the icon using a tool like GIMP. Prepare one 32x32px image and save it in the PNG format and then prepare (of the same image) a 64x64px image and save it in the PNG format. Now you have all you need to create the favicon.ico.

 Use icotool and run the following command "icotool -c -o favicon.ico filename_32x32.png filename_64x64.png" from the the folder where the images are saved and viola! you now have your favicon.ico to upload to your webserver. Usually the favicon.ico is placed in the root directory of the sites folders.

 

 

 

 

Last Updated on Monday, 01 December 2008 02:19