/*
NP_Print version 0.9
Updates, documentation and tips about
this plugin will be posted at Nucleus Wikki:
http://www.xiffy.nl/wakka/Print
This plugin is based on NP_MailToAFriend.php by Appie Verschoor
*/
class NP_Print extends NucleusPlugin {
function getName() { return 'Print'; }
function getAuthor() { return 'Rodrigo Moraes'; }
function getURL() { return 'http://www.tipos.com.br'; }
function getVersion() { return '0.9'; }
function getDescription() {
return 'Template var to add a print friendly version of your site. Use <%Print%> inside your item template';
}
function install() {
$this->createOption('option1','If no argument given, how does the link look?','text','[Printer friendly version]');
$this->createOption('option12','Open in a new window?','yesno','yes');
$this->createOption('option2','Text for the print link','text',"Click here to print this page");
$this->createOption('option3','Text for the no print message','text',"(this box will not be printed)");
$this->createOption('option4','Which template should be used to display an item?','text',"detailed");
$this->createOption('option5','Header file (you can also use the complete path
or leave it blank for no use)','text',"./header.inc");
$this->createOption('option6','Footer file (you can also use the complete path
or leave it blank for no use)','text',"./footer.inc");
$this->createOption('fontSelector1','Font selector: allow people to choose font and font size?','yesno','yes');
$this->createOption('fontSelector2','Font selector: main text','text',"Choose the font and size of the text:");
$this->createOption('fontSelector3','Font selector: smaller font button','text',"smaller");
$this->createOption('fontSelector4','Font selector: bigger font button','text',"bigger");
}
function doTemplateVar(&$item, $look) {
global $manager, $blog, $CONF, $DIR_PLUGINS;
$extra12 = $this->getOption('option12');
if ($blogName) {
$b =& $manager->getBlog(getBlogIDFromName($params[2]));
} else if ($blog) {
$b =& $blog;
} else {
$b =& $manager->getBlog($CONF['DefaultBlog']);
}
if (! $b) { echo "Wrong"; }
if ($look == "") {
$look = $this->getOption('option1');
}
$adminURL = $this->getAdminURL();
$curItem = $item->itemid;
echo "".$look."";
}
}
?>