$this->fields['forceCompileOnDownload'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Forcer la compilation lors du téléchargement'), 'grade' => 3);
$this->fields['htmlExtension'] = array('type' => 'text', 'default' => 'html', 'editable' => true, 'label' => __('Extension des fichiers html'), 'grade' => 5, 'hint' => __('Ex : php, htm, html, phtml, asp'), 'grade' => 5);
+ $this->fields['actualHtmlExtension'] = array('type' => 'text', 'default' => 'html', 'editable' => false, 'label' => __('Extension des fichiers html réellement appliquée au fluidbook'), 'grade' => 5, 'hint' => __('Ex : php, htm, html, phtml, asp'), 'grade' => 5);
$this->fields['htmlPrepend'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Code à insérer en tête des fichiers'), 'grade' => 5);
$this->fields['baseUrl'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Base de l\'url'), 'grade' => 5,);
$this->forms['package'] = array('label' => __('Option d\'export'),
- 'fieldsnames' => array('htmlExtension', 'htmlPrepend', 'baseUrl', 'forceCompileOnDownload'));
+ 'fieldsnames' => array('htmlExtension', "actualHtmlExtension", 'htmlPrepend', 'baseUrl', 'forceCompileOnDownload'));
$this->fields['disableDemo'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Désactiver le lien de démo'), 'grade' => 5);
$this->fields['redirectDemo'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Rediriger le lien de démo vers'), 'grade' => 5);
$d = array('fdir' => $fdir, 'dir' => $dir);
$file = $this->compiler->wdir . '/' . $this->alternative;
$content = file_get_contents($file);
- if (false && strpos($content, '<div id="lottie"></div>')) {
- return $this->getLottieContent($content, $this->width, $this->height);
- }
+// if (false && strpos($content, '<div id="lottie"></div>')) {
+// return $this->getLottieContent($content, $this->width, $this->height);
+// }
$this->compiler->vdir->copy($this->compiler->wdir . '/' . $this->alternative, $d['dir'] . '/' . $this->alternative);
$this->_config = $this->getConfigHTML($d['dir'], $this->alternative);
$this->copyExternalFile($d['dir'] . '/' . $this->alternative);
}
$this->_ext = $this->book->parametres->htmlExtension;
+ $this->book->parametres->actualHtmlExtension = $this->_ext;
$this->copyFluidbookFiles();
$this->mergeJavascript();
$rm->setArg(null, $dest . '/' . $f);
}
$rm->execute();
+
+ if ($this->_ext !== 'html') {
+ $e = $this->_ext;
+ `find $dest -type f -name "*.html" -exec rename 's/\.html$/.$e/' '{}' \;`;
+
+ }
}
public function makePackage($zip)