Image Caption

Wednesday, February 29, 2012

Install Magento 1.5 in localhost [wamp or xampp]

Step:1
Open \app\design\install\default\default\template\install\config.phtml

Step:2
Find the word in above file"config[unsecure_base_url]"

Step:3
Remove the class ‘validate-url’ from the input and then save the file
<li>
<label for="base_url"><?php echo $this->__('Base URL') ?> <span class="required">*</span></label><br />
<input type="text" name="config[unsecure_base_url]" id="base_url" value="<?php echo $this->getFormData()->getUnsecureBaseUrl() ?>"
title="<?php echo $this->__('Base URL') ?>" class="required-entry validate-url input-text" />
</li>

Step:4
<li>
<label for="base_url"><?php echo $this->__('Base URL') ?> <span class="required">*</span></label><br />
<input type="text" name="config[unsecure_base_url]" id="base_url" value="<?php echo $this->getFormData()->getUnsecureBaseUrl() ?>"
title="<?php echo $this->__('Base URL') ?>" class="required-entry input-text" />
</li>
Continue the installation.

Saturday, February 18, 2012

Joomla tooltip and Joomla calendar code

Joomla Tooltip code:
<?php
JHTML::_('behavior.tooltip');
$tooltip='asdf';
$title='zxcv';
echo JHTML::_('tooltip', $tooltip, $title, 'warning.png');
?>
Joomla Calendar code:
<?php
echo JHTML::calendar('','date','inputdate','%d-%m-%Y');
?>

Wednesday, February 15, 2012

Thickbox or Lightbox in Joomla

Step :1

Add the below line in your template index.php

<?php
$params = array('size'=>array('x'=>500, 'y'=>500));
JHTML::_('behavior.modal', 'a.mymodal', $params);
?>

Step :2

Add the below html code to any where of your [module, articles, template...]

<a class="mymodal" title="example"
href="http://rselvakumar.blogspot.com"
rel="{handler: \'iframe\',
size: {x: 500, y: 550}}">Example Modal Window</a>'


Full Code:
<?php
// prepare the JavaScript parameters
$params = array('size'=>array('x'=>500, 'y'=>500));
// add the JavaScript
JHTML::_('behavior.modal', 'a.mymodal', $params);
// create the modal window link
echo '<a class="mymodal" title="example"
href="http://rselvakumar.blogspot.com"
rel="{handler: \'iframe\',
size: {x: 500, y: 550}}">Example Modal Window</a>';
?>

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 &#169; %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.

Thursday, February 2, 2012

URL Redirect - HTML, PHP, JavaScript, Joomla, WordPress,htaccess

HTML - URL Redirect
<meta http-equiv="REFRESH" content="0;url=http://www.yoursite.com/new.html">

HTML - URL Redirect With 10 seconds delay
<meta http-equiv="REFRESH" content="10;url=http://www.yoursite.com/new.html">

PHP - URL Redirect
header( 'Location: http://www.yoursite.com/new.html' ) ;

JavaScript - URL Redirect
window.location = "http://www.yoursite.com/new.html"

Joomla - URL Redirect
$link = JRoute::_('index.php?option=com_content&view=article&id=53&Itemid=64');
$this->setRedirect($link);

WordPress - URL Redirect
//Default status value 302
$status=302;
wp_redirect( $location, $status );

htaccess - URL Redirect
RewriteEngine On
#redirect single page to single page
Redirect /index.html http://www.yourdomain.com/index.php