le monde include images
This commit is contained in:
parent
92a98c13eb
commit
cb706113cd
16
epub.php
16
epub.php
|
@ -42,7 +42,7 @@
|
||||||
if (isset($_POST['lemonde']) && $_POST['lemonde'])
|
if (isset($_POST['lemonde']) && $_POST['lemonde'])
|
||||||
{
|
{
|
||||||
// hardcoded for now
|
// hardcoded for now
|
||||||
$includeimages = false;
|
$includeimages = true;
|
||||||
$includecover = false;
|
$includecover = false;
|
||||||
$url = $_POST['lmurl'];
|
$url = $_POST['lmurl'];
|
||||||
|
|
||||||
|
@ -112,21 +112,15 @@
|
||||||
$imageid = $image->ContentItemId;
|
$imageid = $image->ContentItemId;
|
||||||
$imageurl = preg_replace('/GetPublicationContentItems-.*\.json/', 'Image-MEDIUM-' . $imageid . '.jpg', $url);
|
$imageurl = preg_replace('/GetPublicationContentItems-.*\.json/', 'Image-MEDIUM-' . $imageid . '.jpg', $url);
|
||||||
|
|
||||||
|
$tempimgpath = './temp/' . $imageid . '.jpg';
|
||||||
$tempcontent = file_get_contents($imageurl);
|
$tempcontent = file_get_contents($imageurl);
|
||||||
file_put_contents('temp/' . $imageid, $tempcontent);
|
file_put_contents($tempimgpath, $tempcontent);
|
||||||
|
$pagecontent .= '<div><img src="' . $tempimgpath . '"></div>';
|
||||||
//$epub->AddImage('temp/' . $imageid, false, false );
|
|
||||||
|
|
||||||
$pagecontent .= '<div><img src="' . $imageurl . '"></div>';
|
|
||||||
if ($image->HtmlText)
|
|
||||||
{
|
|
||||||
$pagecontent .= $image->HtmlText;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$pagecontent .= $articlebody->HtmlText;
|
$pagecontent .= $articlebody->HtmlText;
|
||||||
$epub->AddPage($pagecontent, false, strip_tags($articlebody->Title));
|
$epub->AddPage($pagecontent, false, strip_tags($articlebody->Title), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
write_epub($epub);
|
write_epub($epub);
|
||||||
|
|
Loading…
Reference in New Issue