Image Caption

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>';
?>