Location: PHPKode > scripts > Blogtopdf > blogtopdf/controlpanel.php
function blogtopdf_options() {
	global $cc_login_type,$current_user,$wp_roles;

	$blogtopdf_options[] = array(  "name" => "Settings",
            "type" => "heading",
			"desc" => "This section customizes the look and feel.");
	$blogtopdf_options[] = array(	"name" => "Don't load jQuery",
			"desc" => "If you have a theme using jQuery, you can avoid loading it twice by ticking this box",
			"id" => BLOGTOPDF_SLUG."_jquery",
			"type" => "checkbox");
	$blogtopdf_options[] = array(	"name" => "Custom styles",
			"desc" => 'Enter your custom CSS styles here',
			"id" => BLOGTOPDF_SLUG."_css",
			"type" => "textarea");
	$blogtopdf_options[] = array(	"name" => "Load ".BLOGTOPDF_NAME." styles",
			"desc" => 'Select if you want to load the '.BLOGTOPDF_NAME.' style.css style sheet',
			"id" => BLOGTOPDF_SLUG."_style",
			"type" => "checkbox");
	$blogtopdf_options[] = array(  "name" => "Other Settings",
            "type" => "heading",
			"desc" => "This section customizes miscellaneous settings.");
	$blogtopdf_options[] = array(	"name" => "Debug",
			"desc" => "If you have problems with the plugin, activate the debug mode to generate a debug log for our support team",
			"id" => BLOGTOPDF_SLUG."_debug",
			"type" => "checkbox");
	$blogtopdf_options[] = array(	"name" => "Cache",
			"desc" => "Once you're satisifed everything works as expected, turn on cache to improve performance.",
			"id" => BLOGTOPDF_SLUG."_cached",
			"type" => "checkbox");
	return $blogtopdf_options;

function blogtopdf_add_admin() {

	global $blogtopdf;


	if (isset($_GET['page']) && ($_GET['page'] == "blogtopdf")) {

		if ( isset($_REQUEST['action']) && 'install' == $_REQUEST['action'] ) {
			foreach ($blogtopdf_options as $value) {
				if( isset( $_REQUEST[ $value['id'] ] ) ) {
					update_option( $value['id'], $_REQUEST[ $value['id'] ]  );
				} else { delete_option( $value['id'] );
			header("Location: admin.php?page=blogtopdf&installed=true");
	add_options_page(BLOGTOPDF_NAME, BLOGTOPDF_NAME, 'activate_plugins', 'blogtopdf','blogtopdf_admin');

function blogtopdf_admin() {

	if ( isset($_REQUEST['install']) ) echo '<div id="message" class="updated fade"><p><strong>'.BLOGTOPDF_NAME.' settings updated.</strong></p></div>';
	if ( isset($_REQUEST['error']) ) echo '<div id="message" class="updated fade"><p>The following error occured: <strong>'.$_REQUEST['error'].'</strong></p></div>';

<div class="wrap">
<div id="cc-left" style="position: relative; float: left; width: 50%; min-height:500px;">
<h2><?php echo BLOGTOPDF_NAME; ?></h2>
<form method="post">
<?php require(dirname(__FILE__).'/includes/cpedit.inc.php')?>
<p class="submit"><input name="install" type="submit" value="<?php echo $submit;?>" /> <input
	type="hidden" name="action" value="install"
<div id="cc-right" style="position: relative; float: right; width: 50%">
To use Blog To PDF on your website, simply activate one of the Blog To PDF widgets. The widget adds a Download PDF button on your site allowing a user to download a PDF version of the page (and sub-pages) they are viewing. <br />In the widget you can specify the title of the PDF document to generate, you can include a front page image and you can also define on what pages (and sub-pages) the Download PDF button should appear.
<?php if (1==0) {?>
<h3>Discover Blog To PDF Pro</h3>
Blog To PDF Pro offers additional features:
<li>- Page numbers</li>
<li>- Table of contents</li>
<?php }?>
<div style="clear:both;"></div>
<hr />
<center><img src="<?php echo plugins_url('blogtopdf')?>/images/zingiri-logo-transparent.png" />
add_action('admin_menu', 'blogtopdf_add_admin');
Return current item: Blogtopdf