Example #1
0
function pdf24Plugin_head()
{
    global $pdf24Plugin;
    $isPage = is_page();
    $stylesArr = array();
    if (pdf24Plugin_isCpInUse()) {
        if (!($isPage && pdf24Plugin_isCpDisabledOnPages())) {
            pdf24Plugin_appendStyle('pdf24Plugin_cpStyle', 'styles/cp', $stylesArr);
        }
    }
    if (pdf24Plugin_isTbpInUse()) {
        if (!($isPage && pdf24Plugin_isTbpDisabledOnPages())) {
            pdf24Plugin_appendStyle('pdf24Plugin_tbpStyle', 'styles/tbp', $stylesArr);
        }
    }
    if (pdf24Plugin_isSbpInUse() && is_active_widget('pdf24Plugin_widget')) {
        if (!($isPage && pdf24Plugin_isSbpDisabledOnPages())) {
            pdf24Plugin_appendStyle('pdf24Plugin_sbpStyle', 'styles/sbp', $stylesArr);
        }
    }
    if (pdf24Plugin_isLpInUse()) {
        if (!($isPage && pdf24Plugin_isLpDisabledOnPages())) {
            pdf24Plugin_appendStyle('pdf24Plugin_lpStyle', 'styles/lp', $stylesArr);
        }
    }
    if (count($stylesArr) > 0) {
        $outText = '';
        $outFiles = '';
        foreach ($stylesArr as $val) {
            if ($val[0] == 'text') {
                $outText .= $val[1];
            } else {
                $outFiles .= '<link rel="stylesheet" type="text/css" href="' . ($pdf24Plugin['url'] . '/' . $val[1]) . '" />' . "\n";
            }
        }
        echo $outFiles;
        if ($outText != '') {
            echo "<style type=\"text/css\">\n" . $outText . "\n</style>\n";
        }
    }
}
Example #2
0
		<div class="descr">This plugin displays a link everywhere in your blog where you place some peace of code in a template of your theme.<br />
		Copy and paste the code <b><nobr>&lt;?php pdf24Plugin_link(); ?&gt;</nobr></b> or <b><nobr>&lt;?php pdf24Plugin_link('MY_LINK_TEXT'); ?&gt;</nobr></b>
		into a template of your theme where a download as PDF link shall be shown. If the link is places outside the loop, the code produce a link which converts all
		articles on the current page to PDF. If the link is places inside the loop, the code produce a link which converts only the current article to PDF.</div>
		<table>
		<tr>
			<td class="tr1">Use this plugin</td>
			<td><input type="checkbox" name="lpInUse" <?php 
echo pdf24Plugin_isLpInUse() ? 'checked' : '';
?>
 /></td>
		</tr>
		<tr>
			<td class="tr1">Disable on pages</td>
			<td><input type="checkbox" name="lpDisableOnPages" <?php 
echo pdf24Plugin_isLpDisabledOnPages() ? 'checked' : '';
?>
 /></td>
		</tr>
		<tr>
			<td class="tr1">Style</td>
			<td><select name="lpStyle" onchange="document.forms.pdf24Form.lpCustomStyle.value = pdf24Plugin_lpStyle_custom[this.selectedIndex];">
					<?php 
echo $styleParms['options'];
?>
				</select>
				&nbsp;&nbsp; <input type="checkbox" name="lpCustomize" onclick="pdf24_showHideCheck('lpCustomStyle', this);" <?php 
echo $styleParms['customized'] ? 'checked' : '';
?>
 />
				Customize this style
Example #3
0
function pdf24Plugin_link($txt = null)
{
    if (pdf24Plugin_isLpInUse() && pdf24Plugin_isAvailable()) {
        if (!(is_page() && pdf24Plugin_isLpDisabledOnPages())) {
            echo pdf24Plugin_getLinkForm(pdf24Plugin_getPosts(), $txt);
        }
    }
}