.
*/
function makeTextWithTooltip($text, $tip, $title='', $width='')
{
if (!empty($title))
$titleText = "TITLE, '$title',STICKY, 1, CLOSEBTN, true, CLICKCLOSE, true,";
if (!empty($width))
$widthText = "WIDTH, $width," ;
$return = "$text" ;
return $return ;
}
function makeTextWithTooltipTag($plg, $text, $tip, $title='', $width='')
{
if (!empty($title))
$titleText = "TITLE, '$title',STICKY, 1, CLOSEBTN, true, CLICKCLOSE, true,";
if (!empty($width))
$widthText = "WIDTH, $width," ;
$return = "$text" ;
echo "
$tip
";
return $return ;
}
function renderPlg($name, $plg) {
if ($plg['isBook']) return ;
$value = ''.$plg['value'].'';
$desc = $plg['desc'] ;
$title = $plg['title'] ;
$url = 'http://www.thulasidas.com/plugins/' . $name ;
$link = '' . $value . ' ' ;
$text = $link . $desc ;
$price = $plg['price'] ;
$moreInfo = " More Info " ;
$liteVersion = " Get Lite Version " ;
$proVersion = " Get Pro Version
" ;
$why = "
".$plg['pro'] ;
echo "" . makeTextWithTooltip($text, $title, $value, 350) .
makeTextWithTooltip($moreInfo, "Read more about $value at its own page.
".$title, "More Information about $value", 300) .
makeTextWithTooltip($liteVersion, $title, "Download $value - the Lite version", 300) .
makeTextWithTooltipTag($name, $proVersion, $why, "Get $value Pro!", 300) .
"\n" ;
}
function renderBook($name, $plg) {
if (!$plg['isBook']) return ;
$value = ''.$plg['value'].'';
$desc = $plg['desc'] ;
$title = $plg['title'] ;
$url = $plg['url'] ;
$link = '' . $value . ' ' ;
$text = $link . $desc ;
$price = $plg['price'] ;
$moreInfo = " More Info " ;
$amazon = $plg['amazon'] ;
if (!empty($amazon)) $buyAmazon = " Get it at Amazon " ;
$buyNow = " Buy and Download now!
" ;
$why = "
".$title.$desc." $value costs only \$$price -- direct from the author." ;
echo "" . makeTextWithTooltip($text, $title, $value, 350) .
makeTextWithTooltip($moreInfo, "Read all about $value at its own site.
", "$value", 300) .
makeTextWithTooltip($buyAmazon, $title, "Buy $value from Amazon", 300) .
makeTextWithTooltipTag($name, $buyNow, $why, "Buy $value!", 300) .
"\n" ;
}
?>