<meta http-equiv="Expires" content="0" />\r
<meta http-equiv="Expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />\r
<meta http-equiv="Pragma" content="no-cache" />\r
+$favicon\r
$robots\r
$facebook\r
<title>$title</title>\r
; Style\r
XPStyle on\r
\r
-Icon "$htmldir/fluidbook.ico"\r
+Icon "$favicon"\r
\r
; not released\r
;TargetMinimalOS 5.0\r
-config=Extract_Links\r
+config=Extract_texts\r
-application.args=--input H:\\Documents\\fwstk\\layout\\document.pdf --extractTexts H:\\Documents\\fwstk\\layout\\p%d.txt\r
+application.args=--input H:\\Documents\\fwstk\\texts\\document.pdf --extractTexts H:\\Documents\\fwstk\\texts\\%s%d.txt\r
<?xml version="1.0" encoding="UTF-8"?>\r
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">\r
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>\r
- <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">\r
- <file>file:/H:/Works/cubeExtranet/fluidbook/tools/fwstk/src/com/fluidbook/fwstk/Main.java</file>\r
- </open-files>\r
</project-private>\r
}\r
if (e.length == 1) {\r
res.put(e0, true);\r
- } else if (e0 > e1) {\r
+ } else if (e0 >= e1) {\r
for (int j = e1; j <= e0; j++) {\r
res.put(j, true);\r
}\r
<?php\r
\r
class wsFlash extends cubeFlashGateway {\r
+\r
const CNAME = __CLASS__;\r
\r
public static function in($args) {\r
continue;\r
}\r
$fname = cubeFiles::tidyName($infos['name']);\r
- $dest = '/' . $this->args['theme_id'] . '/' . $fname;\r
+ $dir = WS_THEMES . '/' . $this->args['theme_id'] . '/';\r
+ $dest = $dir . $fname;\r
+\r
\r
if (!file_exists(WS_THEMES . '/' . $this->args['theme_id'])) {\r
mkdir(WS_THEMES . '/' . $this->args['theme_id'], 0755, true);\r
}\r
\r
- move_uploaded_file($infos['tmp_name'], WS_THEMES . $dest);\r
+ move_uploaded_file($infos['tmp_name'], $dest);\r
+\r
+ if (isset($this->args['type']) && $this->args['type'] == 'ico') {\r
+ $icotool = new cubeCommandLine('icotool');\r
+ $icotool->setArg('c');\r
+ $icotool->setArg('o', $dir . '/fluidbook.ico');\r
+\r
+ $sizes = array(256, 128, 64, 32, 16);\r
+ \r
+ foreach ($sizes as $s) {\r
+ $r = $dir . '/ico-' . $s . '.png';\r
+ $it = new cubeImageTools();\r
+ $it->loadImage($dest);\r
+ $it->resize($s, $s, 'crop', true,'C','M','transparent');\r
+ $it->output('png', $r);\r
+ $icotool->setArg(null, $r);\r
+ }\r
+\r
+ $icotool->execute();\r
+ }\r
+\r
$this->xml->addChild('file', $fname);\r
return;\r
}\r
$info['method'] = 1;\r
$info['objects'] = 1800;\r
$info['quality'] = 85;\r
- $info['version']='stable';\r
+ $info['version'] = 'stable';\r
} else {\r
$dim = getimagesize($file);\r
}\r
\r
public function getLinks() {\r
global $core;\r
- \r
+\r
set_time_limit(0);\r
- \r
+\r
$dao = new wsDAOBook($core->con);\r
$book = $dao->selectById($this->args['book_id']);\r
\r
\r
$filesToCopy['data/fd.swf'] = $compilerDir . '/FluidbookDatas.swf';\r
$filesToCopy['data/fdl.swf'] = $compilerDir . '/FluidbookDatasLight.swf';\r
+\r
// Copy of files\r
// Check if dest dir exists\r
if (!file_exists($finalDir . 'data')) {\r
if ($theme->parametres->afterSearch != '') {\r
$flex->addBitmap($themeRoot . $theme->parametres->afterSearch, 'aftersearch');\r
}\r
+ if ($theme->parametres->favicon != '') {\r
+ $filesToCopy['data/fluidbook.ico'] = $themeRoot . 'fluidbook.ico';\r
+ }\r
\r
// Icons assets\r
$iconsRoot = WS_ICONS . '/' . $theme->parametres->iconSet . '/';\r
$swfcombine->setArg(null, $tempswf[$i]);\r
}\r
$swfcombine->execute();\r
- fb($swfcombine->commande);\r
- fb($swfcombine->output);\r
\r
foreach ($tempimage as $t) {\r
unlink($t);\r
\r
if ($original) {\r
copy(WS_DOCS . '/' . $firstDoc . '/crop.pdf', $finalPDF);\r
- fb('Original');\r
return;\r
}\r
- fb('Composite');\r
- exit;\r
\r
$args = '';\r
foreach ($pdfList as $doc => $index) {\r
'grade' => 5);\r
\r
$this->forms['search'] = array('label' => __('Personnalisation de la recherche'),\r
- 'fieldsnames' => array('couleurS', 'searchFieldColor', 'searchShadeAlpha', 'searchFieldWidth', '|', 'highlightColor','|','searchIndexNoResultColor'));\r
+ 'fieldsnames' => array('couleurS', 'searchFieldColor', 'searchShadeAlpha', 'searchFieldWidth', '|', 'highlightColor', '|', 'searchIndexNoResultColor'));\r
/* Icones */\r
$this->fields['iconSet'] = array('type' => 'icones', 'default' => 1, 'editable' => true,\r
'label' => __("Jeu d'icônes"));\r
'label' => __('Overlay placé sous les vidéos en popup'));\r
$this->fields['pageEdgeColor'] = array('type' => 'couleur', 'default' => 'dddddd', 'editable' => true,\r
'label' => __('Couleur de la bordure'));\r
+ $this->fields['pageEdgeThickness'] = array('type' => 'integer', 'default' => 100, 'editable' => true,\r
+ 'label' => __('Epaisseur de la bordure'));\r
\r
$this->forms['book'] = array('label' => __('Personnalisation du fluidbook'),\r
'fieldsnames' => array('pageReflection', 'shadeAlpha',\r
- '|', 'usePageEdges', 'pageEdgeColor',\r
+ '|', 'usePageEdges', 'pageEdgeColor', 'pageEdgeThickness',\r
'|', 'bookShadeColor',\r
'|', 'displayPageNumber', 'colorPageNumber',\r
'|', 'linksColor', 'videoBackgroundColor', 'popupVideoOverlay'));\r
$this->forms['menubar'] = array('label' => __('Personnalisation de la barre de menu'),\r
'fieldsnames' => array('menuHeight', '|', 'menuColor', '|', 'menuImage', '|', 'shadeOnMenu', '|', 'invertMenuPosition', '|', 'topBar', 'topBarAlign', '|', 'afterSearch'));\r
/* Menu bar logo */\r
+\r
+ $imageFilter = new stdClass();\r
+ $imageFilter->name = __('Image PNG') . ' (*.png)';\r
+ $imageFilter->extensions = '*.png';\r
+\r
$this->fields['logo'] = array('type' => 'file', 'default' => 'menu_clientLogo.png', 'editable' => true,\r
- 'label' => __('Image'),\r
+ 'label' => __('Logo'),\r
'path' => $themeRoot,\r
'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id);\r
+ $this->fields['favicon'] = array('type' => 'file', 'default' => '', 'editable' => true,\r
+ 'label' => __('Icone (pour favicon et CD-ROM)'),\r
+ 'path' => $themeRoot,\r
+ 'fileFilter' => $imageFilter,\r
+ 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id . '&type=ico',\r
+ 'hint' => __('Image PNG de 256x256'));\r
\r
$this->forms['logo'] = array('label' => __('Personnalisation du logo'),\r
- 'fieldsnames' => array('logo'));\r
+ 'fieldsnames' => array('logo', 'favicon'));\r
/* Loader */\r
$this->fields['logoLoader'] = array('type' => 'file', 'default' => 'logoLoader.png', 'editable' => true,\r
'label' => __('Logo affiché au chargement'),\r
$facebook .= '<meta property="og:image" content="http://workshop.fluidbook.com/services/facebook_thumbnail?id=' . $this->book->book_id . '" />';\r
}\r
\r
+ $favicon = '';\r
+ \r
+ fb($this->theme->parametres->favicon);\r
+ if ($this->theme->parametres->favicon != '') {\r
+ $favicon = '<link rel="shortcut icon" href="data/fluidbook.ico" />';\r
+ }\r
+\r
if ($this->book->parametres->mobileVersion == 'pdf') {\r
$redirectMobile = 'window.location="data/document.pdf";';\r
} else {\r
\r
$robots = '';\r
if (!$seoRobot) {\r
- $robots='<meta name="robots" content="noindex, nofollow" />';\r
+ $robots = '<meta name="robots" content="noindex, nofollow" />';\r
}\r
\r
// Stuffs to replace in html\r
$toReplace = array('lang' => strtolower($this->book->lang),\r
'title' => self::escape($this->book->parametres->title),\r
- 'ga' => $ga, 'facebook' => $facebook,\r
+ 'ga' => $ga,\r
+ 'facebook' => $facebook,\r
'bgcolor' => $this->theme->parametres->loadingBackColor,\r
'redirectMobile' => $redirectMobile,\r
'junk' => TIME,\r
- 'robots' => $robots);\r
+ 'robots' => $robots,\r
+ 'favicon' => $favicon);\r
\r
$this->origHTML = file_get_contents($this->vdir . '/index.html');\r
$this->origHTML = $this->replaceHTML($toReplace);\r
protected $daoBook;\r
protected $zip;\r
\r
- public static function package($book_id, $version,$zip=true) {\r
+ public static function package($book_id, $version, $zip = true) {\r
global $packager;\r
- \r
+\r
cubePHP::neverStop();\r
if ($version == 'html') {\r
$packager = new wsPackagerHTML($book_id);\r
}\r
\r
$s = WS_COMPILE_ASSETS . '/' . $source;\r
- if (is_file($s)) {\r
+ if (is_file($s) && !file_exists($this->vdir . $dest)) {\r
copy($s, $this->vdir . $dest);\r
} else if (is_dir($s)) {\r
$cp = new cubeCommandLine('cp');\r
$nsi = str_replace('$lang', utf8_decode($lang->nsis), $nsi);\r
$nsi = str_replace('$nsisdir', '/usr/local/nsis/nsis-2.46/share/nsis', $nsi);\r
$nsi = str_replace('$output', $this->getPathBase('exe'), $nsi);\r
+ $favicon = WS_COMPILE_ASSETS . '/fluidbook.ico';\r
+ if ($this->theme->parametres->favicon != '') {\r
+ $favicon = $this->vdir . '/data/fluidbook.ico';\r
+ }\r
+ $nsi = str_replace('$favicon', $favicon, $nsi);\r
\r
$this->nsi = $nsi;\r
}\r
\r
public function makePackage($zip) {\r
$this->preparePackage();\r
- $url = 'http://installer.fluidbook.com/make.php?nsi=' . base64_encode($this->nsi);\r
+ $url = 'http://installer.fluidbook.com/make.php?nsi=' . base64_encode($this->nsi) . '&junk=' . TIME;\r
\r
- file_get_contents('http://installer.fluidbook.com/make.php?nsi=' . base64_encode($this->nsi) . '&junk=' . TIME);\r
+ file_get_contents($url);\r
+ fb($url);\r
return $this->getURLBase('exe');\r
}\r
\r