\r
move_uploaded_file($infos['tmp_name'], $dest);\r
\r
- if (isset($this->args['type']) && $this->args['type'] == 'ico') {\r
+ if (isset($this->args['type']) && $this->args['type'] == 'favicon') {\r
$icotool = new cubeCommandLine('icotool');\r
$icotool->setArg('c');\r
$icotool->setArg('o', $dir . '/fluidbook.ico');\r
$this->fields['searchShowNoResultsPages'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __("Afficher les pages sans résultats"));\r
\r
$this->forms['search'] = array('label' => __('Moteur de recherche'),\r
- 'fieldsnames' => array('search', 'searchHideNoResultsPages', '|', 'ignoreSearch', 'ignoreSearchSeparators', 'textExtraction'));\r
+ 'fieldsnames' => array('search', 'searchShowNoResultsPages', '|', 'ignoreSearch', 'ignoreSearchSeparators', 'textExtraction'));\r
\r
$this->fields['soundTheme'] = array('type' => 'combo', 'default' => 'classic', 'editable' => true, 'label' => __("Thème sonore"),\r
'datas' => array(__('Pas de son') => '',\r
'fieldsnames' => array('basket', 'basketManager', 'basketReferences', 'basketImages', 'basketPDFBackground'));\r
// .\r
$this->fields['offlineLink'] = array('type' => 'text', 'default' => 'http://', 'editable' => true, 'label' => __("URL du Fluidbook"), 'hint' => __('URL du fluidbook utilisée pour la version Offline (CD-ROM, clé USB, Exécutables)'));\r
+ $this->fields['offlineTitle'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __("Titre de l'application"));\r
$this->forms['offline'] = array('label' => __('Version offline'),\r
- 'fieldsnames' => array('offlineLink'));\r
+ 'fieldsnames' => array('offlineTitle', 'offlineLink'));\r
\r
$this->fields['mobileVersion'] = array('type' => 'combo', 'default' => 'html5-images', 'editable' => true, 'label' => __('Version mobile'), 'grade' => 3,\r
'datas' => array(__('Rediriger vers le PDF') => 'pdf',\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
+ 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id . '&type=favicon',\r
'hint' => __('Image PNG de 256x256'));\r
$this->fields['iosicon'] = array('type' => 'file', 'default' => '', 'editable' => true,\r
'label' => __('Icone (pour application iOS)'),\r
'path' => $themeRoot,\r
'fileFilter' => $imageFilter,\r
- 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id . '&type=ico',\r
+ 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id . '&type=iosicon',\r
'hint' => __('Image PNG de 1024x1024'));\r
$this->fields['androidicon'] = array('type' => 'file', 'default' => '', 'editable' => true,\r
'label' => __('Icone (pour application Android)'),\r
'path' => $themeRoot,\r
'fileFilter' => $imageFilter,\r
- 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id . '&type=ico',\r
+ 'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id . '&type=androidicon',\r
'hint' => __('Image PNG de 1024x1024'));\r
\r
$this->forms['logo'] = array('label' => __('Personnalisation du logo'),\r
parent::__construct($book_id);\r
$this->version = 'win-exe';\r
\r
- $this->exeName = cubeText::str2URL(mb_substr($this->book->parametres->title, 0, 30)) . '.exe';\r
+ if ($this->book->parametres->offlineTitle == "") {\r
+ $this->exeName = cubeText::str2URL(mb_substr($this->book->parametres->title, 0, 30)) . '.exe';\r
+ } else {\r
+ $this->exeName = cubeText::str2URL($this->book->parametres->offlineTitle) . '.exe';\r
+ }\r
}\r
\r
protected function preparePackage() {\r
$daoLang = new wsDAOLang($core->con);\r
$lang = $daoLang->selectById($this->book->lang);\r
\r
+ $fname = str_replace('.exe', '', $this->exeName);\r
+ $title = $this->book->parametres->offlineTitle == '' ? $this->book->parametres->title : $this->book->parametres->offlineTitle;\r
+\r
$nsi = file_get_contents(WS_COMPILE_ASSETS . '/script.nsi');\r
- $nsi = str_replace('$name', utf8_decode($this->book->parametres->title), $nsi);\r
+ $nsi = str_replace('$name', utf8_decode($title), $nsi);\r
$nsi = str_replace('$htmldir', utf8_decode(WS_COMPILE_ASSETS), $nsi);\r
- $nsi = str_replace('$fname', str_replace('.exe', '', $this->exeName), $nsi);\r
+ $nsi = str_replace('$fname', $fname, $nsi);\r
$nsi = str_replace('$fdir', $winvdir, $nsi);\r
- $nsi = str_replace('$titre', utf8_decode($this->book->parametres->title), $nsi);\r
+ $nsi = str_replace('$titre', utf8_decode($title), $nsi);\r
$nsi = str_replace('$lang', utf8_decode($lang->nsis), $nsi);\r
$nsi = str_replace('$nsisdir', '/usr/share/nsis', $nsi);\r
$nsi = str_replace('$output', $this->getPathBase('exe'), $nsi);\r
$favicon = $this->vdir . '/data/fluidbook.ico';\r
if ($this->theme->parametres->favicon == '') {\r
- $this->copy(WS_COMPILE_ASSETS . '/fluidbook.ico',$favicon);\r
+ $this->copy(WS_COMPILE_ASSETS . '/fluidbook.ico', $favicon);\r
}\r
$nsi = str_replace('$favicon', $favicon, $nsi);\r
\r
$url = 'http://installer.fluidbook.com/make.php?nsi=' . base64_encode($this->nsi) . '&junk=' . TIME;\r
\r
file_get_contents($url);\r
- fb($url);\r
return $this->getURLBase('exe');\r
}\r
\r