From: vincent@cubedesigners.com Date: Mon, 27 Feb 2012 13:13:31 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=a324f8569d6371bae743a8c45ba82124b32fcef5;p=cubeextranet.git --- diff --git a/fluidbook/compile/_js/fluidbook.js b/fluidbook/compile/_js/fluidbook.js index 91c854568..a5ab3431e 100644 --- a/fluidbook/compile/_js/fluidbook.js +++ b/fluidbook/compile/_js/fluidbook.js @@ -10,9 +10,14 @@ function getWmode(){ function getLocation(){ return window.location.toString(); } -function getFlashvars(junk){ +function getFlashvars(junk,fv){ + + var res={}; + if(fv!=undefined){ + res=fv; + } + var couples=window.location.search.substr(1).split('&'); - var res=new Array(); var couple=new Array(); for (var i=0;i - + $favicon $robots $facebook @@ -23,7 +23,7 @@ }else if(isBadMobile()){ $redirectPDF }else{ - swfobject.embedSWF("$pathToIndex?junk=$junk", "fluidbook", "100%", "100%", "$flashversion","", getFlashvars($junk), {"allowScriptAccess":"always","quality":"high","scale":"noscale","wmode":getWmode(),"allowFullScreen":"true"},{"bgcolor":"#$bgcolor"}); + swfobject.embedSWF("$pathToIndex?junk=$junk", "fluidbook", "100%", "100%", "$flashversion","",getFlashvars($junk,$fv),{"allowScriptAccess":"always","quality":"high","scale":"noscale","wmode":getWmode(),"allowFullScreen":"true"},{"bgcolor":"#$bgcolor"}); } diff --git a/inc/ws/Controlleur/class.ws.ajax.php b/inc/ws/Controlleur/class.ws.ajax.php index ac06a442d..95a9842d5 100644 --- a/inc/ws/Controlleur/class.ws.ajax.php +++ b/inc/ws/Controlleur/class.ws.ajax.php @@ -245,8 +245,13 @@ class wsAjax extends cubeAjax { $x->addOpenPopup($popup); return; } + + $version='html'; + if($book->parametres->version==1){ + $version='v1'; + } - $package = wsPackager::package($book_id, 'html', false); + $package = wsPackager::package($book_id, $version, false); if ($server == 'references') { $root = '/home/fluidbook/dev/references'; diff --git a/inc/ws/Util/packager/class.ws.packager.html.php b/inc/ws/Util/packager/class.ws.packager.html.php index 7fb481a7f..ffb344e71 100644 --- a/inc/ws/Util/packager/class.ws.packager.html.php +++ b/inc/ws/Util/packager/class.ws.packager.html.php @@ -40,7 +40,7 @@ class wsPackagerHTML extends wsPackager { $ga = ''; if ($this->book->parametres->googleAnalyticsCustom) { - $ga=$this->book->parametres->googleAnalyticsCustom; + $ga = $this->book->parametres->googleAnalyticsCustom; } elseif ($this->book->parametres->googleAnalytics != '') { $variables = array('Language' => array('value' => 'getLang()', 'valueAsJS' => true, 'scope' => 2)); $ga = cubePage::googleAnalytics(explode(',', $this->book->parametres->googleAnalytics), true, $variables); @@ -99,7 +99,8 @@ class wsPackagerHTML extends wsPackager { 'junk' => TIME, 'robots' => $robots, 'favicon' => $favicon, - 'flashversion' => $this->getMinFlashVersion()); + 'flashversion' => $this->getMinFlashVersion(), + 'fv' => json_encode($this->getFlashvars())); $this->origHTML = file_get_contents($this->vdir . '/index.html'); $this->origHTML = $this->replaceHTML($toReplace); @@ -152,6 +153,10 @@ class wsPackagerHTML extends wsPackager { } } + protected function getFlashvars() { + return array(); + } + public function prepareHTML5() { if (!$this->whole) { return; diff --git a/inc/ws/Util/packager/class.ws.packager.v1.php b/inc/ws/Util/packager/class.ws.packager.v1.php index ac5f5b483..30cb258f6 100644 --- a/inc/ws/Util/packager/class.ws.packager.v1.php +++ b/inc/ws/Util/packager/class.ws.packager.v1.php @@ -57,6 +57,13 @@ class wsPackagerV1 extends wsPackagerHTML { file_put_contents($this->vdir . '/data/texts.xml', $xml->asXML()); } + protected function getFlashvars() { + return array('id' => $this->book_id, + 'mail' => '0', + 'onlineFlag' => '1', + 'loaderColor' => $this->theme->parametres->loadingBackColor); + } + protected function copyLinks() { global $core; @@ -95,7 +102,7 @@ class wsPackagerV1 extends wsPackagerHTML { } if ($this->_copyWorkingFile($link['to']) && !in_array($link->type, array(4, 6))) { - $link['to'] = 'data/' . $link['to']; + //$link['to'] = 'data/' . $link['to']; } $one->addChild('page', $link['page']); @@ -106,10 +113,10 @@ class wsPackagerV1 extends wsPackagerHTML { $one->addChild('startY', $link['top']); $one->addChild('endY', $link['top'] + $link['height']); $one->addChild('tooltip', $link['infobulle']); - if($link['type']==4){ - $one->addChild('soundOn',$link['video_sound_on']); - $one->addChild('loopFlag',$link['video_loop']); - $one->addChild('playerActive',$link['video_auto_start']); + if ($link['type'] == 4) { + $one->addChild('soundOn', $link['video_sound_on']); + $one->addChild('loopFlag', $link['video_loop']); + $one->addChild('playerActive', $link['video_auto_start']); } }