Image Caption
Showing posts with label joomla. Show all posts
Showing posts with label joomla. Show all posts

Monday, February 13, 2012

How to change Joomla footer link

Step:1 root_dir\language\en-GB\en-GB.mod_footer.ini

open and edit the content present in the file  en-GB.mod_footer.ini

FOOTER=Footer
FOOTER_LINE1=Copyright © %date% %sitename%. All Rights Reserved.
FOOTER_LINE2=<a href="http://www.joomla.org">Joomla!</a> is Free Software released under the <a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU/GPL License.</a>
MOD_FOOTER=<em>mod_footer</em>
THIS MODULE SHOWS THE JOOMLA! COPYRIGHT INFORMATION=This module shows the Joomla! copyright information.

Sunday, January 29, 2012

Get Browser details in joomla


Below code for Display Browser  Version and Type
<?php

jimport('joomla.environment.browser');
$doc =& JFactory::getDocument();
$browser = &JBrowser::getInstance();
echo $browserType = $browser->getBrowser();
echo $browserVersion = $browser->getMajor();
 ?> 
Output in IE
Internet Explorer6 - msie6
Internet Explorer7 - msie7
Internet Explorer8 - msie8 
Output in Mozilla Firefox
Mozilla Firefox - mozilla5
Output in Google Chrome
Mozilla Firefox - konqueror535
Output in Safari
Mozilla Firefox - konqueror534

 
Below code for Add CSS file to browser  version less than IE 7
<?php
jimport('joomla.environment.browser');
$doc =& JFactory::getDocument();
$browser = &JBrowser::getInstance();
$browserType = $browser->getBrowser();
$browserVersion = $browser->getMajor();
if(($browserType == 'msie') && ($browserVersion < 7))
{
$doc->addStyleSheet( 'css/ie6.css' );

}
 ?>

Create PHP file in joomla 1.5

<?php

define( 'DS', DIRECTORY_SEPARATOR );
$rootFolder = explode(DS,dirname(__FILE__));

//current level in  directory structure 
//example : (components/com_banner/view/tpl/   >>> $currentfolderlevel = 4;)
$currentfolderlevel = 4;

array_splice($rootFolder,-$currentfolderlevel);

$base_folder = implode(DS,$rootFolder);


if(is_dir($base_folder.DS.'libraries'.DS.'joomla'))
{

define( '_JEXEC', 1 );

define(JPATH_BASE,implode(DS,$rootFolder));

require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$userid='';
$usertype='';
$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();
$user =& JFactory::getUser();
$userid = $user->get('id');
$usertype = $user->get('usertype');
}
?>