break;
case 'svg':
// Optimize & rasterize SVG
-// $orig = str_replace('.svg', '.o.svg', $dest);
-// rename($dest, $orig);
-// $png = str_replace('.svg', '.png', $dest);
-// `/usr/local/bin/svgcleaner $orig $dest`;
-// if (!file_exists($dest)) {
-// copy($orig, $dest);
-// }
-// `convert -background none $dest $png`;
+ $orig = str_replace('.svg', '.o.svg', $dest);
+ rename($dest, $orig);
+ $png = str_replace('.svg', '.png', $dest);
+ `/usr/local/bin/svgcleaner $orig $dest`;
+ if (!file_exists($dest)) {
+ copy($orig, $dest);
+ }
+ `convert -background none $dest $png`;
break;
default:
break;
$daoTheme = new wsDAOTheme($this->con);
$theme = $daoTheme->getThemeOfBook($this->args['book_id'], true);
- $specials = array('backgroundImage' => 'background', 'afterSearch' => 'aftersearch', 'externalArchives' => 'archives');
+ $specials = array('backgroundImage' => 'background', 'afterSearch' => 'aftersearch', 'externalArchives' => 'archives', 'sliderImage' => 'slider');
foreach ($specials as $tparam => $sname) {
$this->_addSpecialInfos($book, $theme, $tparam, $sname);
protected function _addSpecialInfos($book, $theme, $param, $specialName)
{
- if ($specialName == 'archives') {
+ if ($specialName == 'archives' || $specialName==='slider') {
+ $inBook=true;
$p = $book->parametres;
} else {
+ $inBook=false;
$p = $theme->parametres;
}
if ($p->$param != '') {
- if ($specialName != 'archives') {
+ if (!$inBook) {
$themeRoot = WS_THEMES . '/' . $theme->theme_id . '/';
$dim = CubeIT_Image::getimagesize($themeRoot . $p->$param);
$url = 'https://' . $_SERVER['HTTP_HOST'] . WEBROOT . '/fluidbook/themes/' . $theme->theme_id . '/' . $p->$param;
'fieldsnames' => array('zoomWheel', '|', 'zoom', 'zoomw'));
// .
+ $this->fields['sliderImage'] = array('type' => 'freefile', 'default' => '', 'editable' => true,
+ 'label' => __('Image pour le slider'), 'grade' => 3, 'fileFilter' => $imageExtraFilter);
+
+ $this->forms['slider'] = ['label' => __('Slider'),
+ 'fieldsnames' => ['sliderImage'],
+ ];
+
$this->fields['stats_score'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Afficher les scores dans les rapports'), 'grade' => 5);
$this->fields['stats_exclude_ip'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Exclure les IP suivantes des statistiques'), 'grade' => 3, 'hint' => sprintf(__('Indiquer une adresse ip de la forme %s par ligne'), 'www.xxx.yyy.zzz'));
$this->fields['relay_url_params'] = ['type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Relayer les paramètres d\'url dans les liens sortants'), 'grade' => 3];
__('SCORM 1.2') => '1.2',
__('SCORM 2004 3rd edition') => '2004.3',
__('SCORM 2004 4th edition') => '2004',
- )
+ )
);
$this->fields['scorm_id'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Identifiant SCORM'), 'grade' => 5);
$this->fields['scorm_org'] = array('type' => 'text', 'default' => 'ACME-ORG-1350650111249', 'editable' => true, 'label' => __('Organisation SCORM'), 'grade' => 5);
if (in_array($linkData['type'], $ignore)) {
continue;
}
+ if ($linkData['uid'] === 'slider') {
+ $linkData['page'] = 'background';
+ }
$linkData['hidden'] = in_array($linkData['uid'], $hiddenLinks);
if ($linkData['type'] == 28) {
$this->addSEOArticle('#/page/' . $linkData['page'], $linkData['to'], $linkData['extra'], $linkData['image']);
continue;
}
+
$link = wsHTML5Link::getInstance($this->base62($i), $linkData, $this);
if (is_null($link) || $link->ignore()) {
continue;
// }
if ($this->allowsAnimation) {
- if (stristr($this->image_rollover, 'type=') && $this instanceof contentLink) {
+ if ($this instanceof contentLink && stristr($this->image_rollover, 'type=')) {
$animations = self::parseAnimations($this->image_rollover);
} else {
$animations = self::parseAnimationsInExtra($this->extraraw);