pdf include
Posted: Fri 17. Jun 2005, 11:56
Hi,
my first replacementtag.
This include a pdf file inside the content.
Use a plain text content:
this are the changes:
in /include/inc_front/content.func.inc.php
in /include/inc_front/front.func.inc.php
Testet with phpwcms v1.2.1-DEV, firefox and IE6.
Wishes: CSS for this replacement. Any idear
my first replacementtag.
Use a plain text content:
Code: Select all
{PDFINCLUDE:link/to/pdf/file/test.pdf}in /include/inc_front/content.func.inc.php
Code: Select all
// -------------------------------------------------------------
// PDFINCLUDE:alias replacement (by Thomas Bornhaupt, 2005)
$content["all"] = preg_replace('/\{PDFINCLUDE:(.*?)\}/ie', 'get_pdfinclude_content("$1");', $content["all"]);
// -------------------------------------------------------------in /include/inc_front/front.func.inc.php
Code: Select all
// -------------------------------------------------------------
function get_pdfinclude_content ($url) {
$ret = '<iframe src="';
$ret .= $url;
$ret .= '" width="800px" style="height:800px">';
$ret .= '<embed src="';
$ret .= $url;
$ret .= '" width="800px" height="800px"></iframe>';
return $ret;
}Wishes: CSS for this replacement. Any idear