.
*/
function renderHeadText($name, $plg, $isPro) {
$value = ''.$plg['value'].'';
$desc = $plg['desc'] ;
$toolTip = $plg['title'] ;
$url = 'http://www.thulasidas.com/plugins/' . $name ;
$link = '' . $value . ' ' ;
$text = $link . $desc ;
$price = $plg['price'] ;
$moreInfo =
" Lite Version " .
" Pro Version" ;
$toolTip .= addslashes('
' . $moreInfo) ;
$why = addslashes($plg['pro']) ;
if ($isPro) $version = 'Pro' ;
else $version = 'Lite' ;
echo "Get Pro Version!
You are using the $version version of $value, which is available in two versions:
-
$moreInfo
- $why And it costs only \$$price!
" ;
}
function renderProText($name, $plg, $isPro) {
$value = ''.$plg['value'].'';
$filter = '' ;
if (strpos($name,'adsense')!== FALSE) $filter = " (e.g., a filter to ensure AdSense policy compliance) " ;
$desc = $plg['desc'] ;
$toolTip = $plg['title'] ;
$price = $plg['price'] ;
$moreInfo =
" Lite Version " .
" Pro Version" ;
$toolTip .= addslashes('
' . $moreInfo) ;
$why = addslashes($plg['pro']) ;
echo '
The Pro Version
' ;
if ($isPro){
$value .= '
Pro' ;
echo "You are enjoying $value with \"Pro\" features. Please consider
buying it, if you haven't already paid for it. It costs only \$$price." ;
}
else {
$value .= '
Lite' ;
echo "Thank you for using $value. The \"Pro\" version gives you more options$filter. Consider
buying it. It costs only \$$price." ;
}
echo "
" ;
renderHeadText($name, $plg, $isPro) ;
echo "
" ;
}
function renderSupportText($name, $plg, $isPro, $long=true) {
$value = '
'.$plg['value'].'';
if (!$isPro) $supportText = "
Support $value. Go Pro!" ;
else $supportText .= "
Thank you for going Pro!";
if ($long) $longText = "How about " ;
else $longText= '' ;
$supportText .= "
$longText
2GB of free online storage?" ;
if ($long) $longText = "WordPress Hosting for " ;
else $longText= 'Hosting for ' ;
$supportText .= "
$longText
just $4/month. " ;
if ($long) $longText = "My books on " ;
else $longText= 'Books: ' ;
$supportText .= "
$longText
Physics or " ;
$supportText .= "
Money." ;
if ($plg['share'])
$supportText .= "
Share a small fraction of your ad space. " ;
else
$supportText .= "
Please link back to the author's blog. " ;
echo $supportText ;
}
function renderTipDivs($name, $share) {
echo <<
Dropbox! gives you 2GB of network (cloud) storage for free, which I find quite adequate for any normal user. (That sounds like the famous last words by Bill Gates, doesn’t it? “64KB of memory should be enough for anyone!”) And, you can get 250MB extra for every successful referral you make. That brings me to my ulterior motive – please use this link to sign up. When you do, I get 250MB extra. Don’t worry, you get 250MB extra as well. So I can grow my online storage up to 8GB, which should keep me happy for a long time. Thank you!
ENDDIVS;
if ($share)
echo "
$name has an ad space sharing option, if you would like to support its future development. It gives you an option to share a small fraction of your ad slots (suggested value is 5%) to show the author's ads. Use the option (in 'Support $name by Donating Ad Space') below to change the value from the default 0% to turn it on. You could also enable an unobtrusive, powered-by sort of link under an ad block by clicking on the right radio box. Don't worry, the defaults are: 0% sharing, and no powered-by links.
" ;
else
echo "
$name a small back-link to the author's blog at the bottom of your pages or invisible ones under the first two LaTeX equations (if any) on your page. Please consider turning it on by the appropriate Pro opbion (higlighted in blue) below.
" ;
}
echo '' ;
renderSupportText($plgName, $myPlugins[$plgName], $ezIsPro, $myPlugins[$plgName]['long']) ;
echo ' | ' ;
echo '' ;
renderProText($plgName, $myPlugins[$plgName], $ezIsPro) ;
renderTipDivs($myPlugins[$plgName]['value'], $myPlugins[$plgName]['share']) ;
echo ' | ' ;
?>