$robots\r
$facebook\r
$description\r
+ $keywords\r
<title>$title</title>\r
<link href="$spstyle.css?junk=$junk" rel="stylesheet" type="text/css">\r
<style type="text/css" media="print">*{ visibility: hidden; display: none }</style>\r
<script type="text/javascript">\r
FB_DEFAULT_LANG = '$lang';\r
var backgroundColor = "$bgcolor";\r
- if (isMobile()) {\r
+ if (isMobile() || $alwaysHTML5) {\r
$redirectMobile\r
} else if (isBadMobile()) {\r
$redirectPDF\r
$this->forms['offline'] = array('label' => __('Version offline'),\r
'fieldsnames' => array('offlineTitle', 'offlineLink'));\r
\r
+ $this->fields['alwaysHTML5'] = array('type' => 'boolean', 'default' => 'false', 'editable' => true, 'label' => __('Toujours utiliser la version HTML5'), 'grade' => 3);\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
__('Version HTML5') => 'html5',\r
$this->fields['mobileNavScale'] = array('type' => 'integer', 'default' => '100', 'editable' => true, 'label' => __('Taille du menu (en %)'), 'grade' => 3);\r
\r
$this->forms['mobile'] = array('label' => __('Version mobile'),\r
- 'fieldsnames' => array('mobileLVersion', 'mobileVersion', 'mobileNavigationType', '|', 'mobileNavScale', '|', 'mobileTransitions', 'mobileTransitionDuration', '|', 'navOrderH', '|', 'mobileIconVector', 'mobileServerConfig', 'mobilePlugins', '|', 'mobileVideosPath', '|', 'mobileExtraXSpace'));\r
+ 'fieldsnames' => array('alwaysHTML5','mobileLVersion', 'mobileVersion', 'mobileNavigationType', '|', 'mobileNavScale', '|', 'mobileTransitions', 'mobileTransitionDuration', '|', 'navOrderH', '|', 'mobileIconVector', 'mobileServerConfig', 'mobilePlugins', '|', 'mobileVideosPath', '|', 'mobileExtraXSpace'));\r
\r
$this->fields['phonegapId'] = array('type' => 'text', 'default' => 'com.fluidbook.phonegap.$id', 'editable' => true, 'label' => __("Identifiant de l'identifiant"), 'grade' => 5, 'hint' => __('De la forme') . ' com.fluidbook.phonegap.xxxxx');\r
$this->fields['phonegapVersion'] = array('type' => 'text', 'default' => '1.0.0', 'editable' => true, 'label' => __("Version de l'application"), 'grade' => 5, 'hint' => __('De la forme') . ' 1.2.3');\r
$this->fields['seoVersion'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Générer une version pour les moteurs de recherche'));\r
$this->fields['seoRobots'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Autoriser le parcours par les moteurs de recherche'));\r
$this->fields['seoDescription'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Meta tag Description'));\r
+ $this->fields['seoKeywords'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Meta tag Keywords'));\r
\r
$this->forms['seo'] = array('label' => __('Optimisation pour les moteurs de recherche'),\r
- 'fieldsnames' => array('seoVersion', 'seoRobots', 'seoDescription'));\r
+ 'fieldsnames' => array('seoVersion', 'seoRobots', 'seoDescription', "seoKeywords"));\r
\r
$this->fields['home'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __("Accueil de l'interface multibrochure"), 'grade' => 5);\r
$this->fields['multilang'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Langues'), 'hint' => __('Code langue') . ',' . __('Code pays') . ',' . __('URL'));\r
return new wsHTML5Compiler($book_id, 'stable', $phonegap, $phonegapVersion, $dir, $standalone, $appcache, $home);
} else {
return new wsHTML5CompilerDev($book_id, 'dev', $phonegap, $phonegapVersion, $dir, $standalone, $appcache, $home);
- }
- }
+ }
+ }
protected static $resolutions = array(150, 300);
protected $maxRes = 300;
$cache = '';
if ($this->appcache) {
$cache = ' manifest="cache.appcache"';
- }
-
+ }
+
$script = '';
if ($this->phonegap) {
//$script .= '<script type="text/javascript" charset="utf-8" src="data/cordova.js"></script>' . "\n";
return new haguenauManifLink($id, $init, $compiler);
} else if ($compiler->book->parametres->customLinkClass == 'FLFLink') {
return new flfLink($id, $init, $compiler);
+ } else if ($compiler->book->parametres->customLinkClass == 'InpesPopinLink') {
+ return new inpesPopinLink($id, $init, $compiler);
}
case 8:
case 9:
protected $_config = null;
protected $_content = '';
+ protected $_url;
public function getHTMLContent() {
if ($this->_content == '') {
$w = $this->width * $this->getCssScale();
$h = $this->height * $this->getCssScale();
+ $this->_url = $d['fdir'] . '/' . $this->_config['html'];
$iw = $this->_config['width'];
$ih = $this->_config['height'];
- $res = '<iframe width="' . $iw . '" height="' . $ih . '" src="' . $d['fdir'] . '/' . $this->_config['html'] . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>';
+ $res = '<iframe width="' . $iw . '" height="' . $ih . '" src="' . $this->_url . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>';
$this->copyExternalDir($d['dir']);
$this->_content = $res;
}
}
+class inpesPopinLink extends htmlMultimediaLink {
+
+ public function getHTMLContent() {
+ $this->alternative = $this->to;
+ $c = parent::getHTMLContent();
+
+
+
+ $class = $this->getClasses();
+ if ($this->display_area) {
+ $class[] = 'displayArea';
+ }
+ $c = '';
+ if (count($class)) {
+ $c = ' class="' . implode(' ', $class) . '"';
+ }
+ $tooltip = '';
+ $t = $this->getTooltip();
+ if ($t !== false) {
+ $tooltip = ' data-tooltip="' . $t . '"';
+ }
+ return '<a href="#" ' . $tooltip . $c . $this->getAdditionnalContent() . '></a>';
+ }
+
+ public function getCSSContainer() {
+ if (!($this instanceof contentLink) && $this->page % 2 == 1) {
+ $this->page--;
+ $this->left+=$this->compiler->width;
+ }
+
+ $css = '#l_' . $this->id . '{';
+ $css.='left:' . $this->left * $this->getCssScale() . 'px;top:' . $this->top * $this->getCssScale() . 'px;';
+ $css.='width:' . $this->width * $this->getCssScale() . 'px;height:' . $this->height * $this->getCssScale() . 'px;';
+ $css.=$this->getCSS();
+ $css.='}';
+ return $css;
+ }
+
+ public function getCSS() {
+ return "";
+ }
+
+ public function getClasses() {
+ $res = parent::getClasses();
+ $res[] = 'popin';
+ return $res;
+ }
+
+ public function getAdditionnalContent() {
+ $res = parent::getAdditionnalContent();
+ $res.=' data-src="' . $this->_url . '" data-width="900" data-height="650"';
+ return $res;
+ }
+
+}
+
class flfLink extends wescoLink {
public function getURL() {
if ($this->book->parametres->seoDescription) {\r
$description = '<meta name="description" content="' . self::escape($this->book->parametres->seoDescription) . '">';\r
}\r
+ $keywords = '';\r
+ if ($this->book->parametres->seoKeywords) {\r
+ $keywords = '<meta name="keywords" content="' . self::escape($this->book->parametres->seoKeywords) . '">';\r
+ }\r
\r
// Stuffs to replace in html\r
$toReplace = array('lang' => strtolower($this->book->lang),\r
'robots' => $robots,\r
'favicon' => $favicon,\r
'flashversion' => $this->getMinFlashVersion(),\r
- 'fv' => json_encode($this->getFlashvars()));\r
+ 'fv' => json_encode($this->getFlashvars()),\r
+ 'alwaysHTML5' => $this->book->parametres->alwaysHTML5,\r
+ 'keywords' => $keywords);\r
\r
\r
$this->origHTML = file_get_contents($this->vdir . '/index.html');\r