$dao = new wsDAOBook($core->con);
$books = $dao->selectAll();
foreach ($books as $book) {
- file_get_contents('https://workshop.fluidbook.com/services/facebook_thumbnail?cid=' . $book->cid . '&j=' . TIME);
+ file_get_contents('https://workshop.fluidbook.com/services/facebook_thumbnail?cid=' . $book->cid . '&j=' . TIME . '&forcecompile=1');
}
}
- public static function _socialImage($cid){
+ public static function _socialImage($cid)
+ {
file_get_contents('https://workshop.fluidbook.com/services/facebook_thumbnail?cid=' . $cid . '&j=' . TIME);
}
}
$limit = TIME - (3600 * 24 * 5);
if (isset($_GET['force']) || !file_exists($cover) || filemtime($cover) < $limit) {
+ $url = 'https://workshop.fluidbook.com/viewerh/' . $id . '_' . $book->hash . '_' . TIME . '/?nointerface=1';
+ if (isset($_GET['forcecompile'])) {
+ $url .= '&force=1';
+ }
+ $url .= '#/page/0';
+
+
$w = 1200;
$h = 628;
$tmp = CubeIT_Files::tempnam() . '.svg';
$cl->setArg('min-width', $w);
$cl->setArg('min-height', $h);
$cl->setArg('zoom-factor', 0.5);
- $cl->setArg('url', 'https://workshop.fluidbook.com/viewerh/' . $id . '_' . $book->hash . '_' . TIME . '/?nointerface=1#/page/0');
+ $cl->setArg('url', $url);
$cl->setArg('delay', 10000);
$cl->setArg('out', $tmp);
$cl->execute();
exit;
}
$CrawlerDetect = new Jaybizzle\CrawlerDetect\CrawlerDetect();
- if (!$nointerface && !$CrawlerDetect->isCrawler()) {
+ if (!isset($_GET['force']) && !$nointerface && !$CrawlerDetect->isCrawler()) {
$book->parametres->scorm_enable = false;
$dao->compile($book_id, 'html5', false, false, false, $book, false);
wsMaintenance::_socialImage($book->cid);