Index: /extensions/Stereo/config.php
===================================================================
--- /extensions/Stereo/config.php (revision 5556)
+++ /extensions/Stereo/config.php (revision 5556)
@@ -0,0 +1,80 @@
+ 1024 ))
+ // array_push($errors, l10n('Forced width is out of range (Correct range: 90-1024)'));
+ // if ( $charlie['forced_height']!='' and (!is_numeric($charlie['forced_height']) or $charlie['forced_height'] < 90 or $charlie['forced_height'] > 1024 ))
+ // array_push($errors, l10n('Forced height is out of range (Correct range: 90-1024)'));
+ // if (!is_numeric($charlie['video_default_width']) or $charlie['video_default_width'] < 90 or $charlie['video_default_width'] > 1024 )
+ // array_push($errors, l10n('Default width is out of range (Correct range: 90-1024)'));
+// }
+
+// Submit and errors
+if ( $sub )
+{
+ if ( count($errors) > 0 )
+ array_push($errors, l10n('Your configuration is NOT saved due to above reasons.'));
+}
+// Submit and Advisor => Thanks
+if ( $sub and is_adviser() and count($errors) == 0 )
+ array_push($infos, l10n('You are Adviser and you are not authorized to change this configuration.'));
+
+// Submit and not Advisor => Update Config table
+if ( $sub and !is_adviser() and count($errors) == 0 )
+{
+ $dir = $conf['local_data_dir'].'/plugins/';
+ @mkdir($dir);
+//var_dump($_POST);
+ $file = fopen( $dir.STEREO_DIR.'.dat', 'w' );
+ fwrite($file, serialize($stereo));
+ fclose( $file );
+ array_push($infos, l10n('Your configuration is saved.'));
+}
+// Send data
+$template->set_filenames(array(
+ 'plugin_admin_content' => dirname(__FILE__) . '/config.tpl'));
+if (count($errors) != 0) $template->assign('errors', $errors);
+if (count($infos) != 0) $template->assign('infos', $infos);
+//if ($stereo['onclick']==0) $stereo['onclick'] = 'playpause'; // ???
+$template->assign(array(
+ 'stereo' => $stereo,
+ 'STEREO_PATH' => STEREO_PATH,
+ ) );
+$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
+//var_dump($stereo);
+?>
Index: /extensions/Stereo/config.tpl
===================================================================
--- /extensions/Stereo/config.tpl (revision 5556)
+++ /extensions/Stereo/config.tpl (revision 5556)
@@ -0,0 +1,85 @@
+
+
Stereo [{$stereo.version}]
+
+
+
{'Stereo plugin configuration'|@translate}
+
+
+
+
+
+
+
Index: /extensions/Stereo/help.css
===================================================================
--- /extensions/Stereo/help.css (revision 5556)
+++ /extensions/Stereo/help.css (revision 5556)
@@ -0,0 +1,7 @@
+BODY#theStereoHelpPage .content
+{
+ margin: 1em;
+}
+.HelpActions a { border:0; margin:-30px 14px 0 0; position:absolute;float:right ; right:1; }
+.HelpActions li {list-style-image:none; list-style-position:outside;
+list-style-type:none; text-align:center; text-indent:0pt; }
Index: /extensions/Stereo/help.php
===================================================================
--- /extensions/Stereo/help.php (revision 5556)
+++ /extensions/Stereo/help.php (revision 5556)
@@ -0,0 +1,57 @@
+set_filenames(
+ array(
+ 'help'=> dirname(__FILE__) . '/help.tpl',
+ )
+);
+
+$template->assign('HELP_MESSAGE', load_language('help.html', dirname(__FILE__).'/', array('return'=>true)) );
+$template->assign(
+ array(
+ 'STEREO_PATH' => STEREO_PATH,
+ 'PHPWG_ROOT_PATH' => PHPWG_ROOT_PATH,
+ )
+);
+$template->pparse('help');
+include(PHPWG_ROOT_PATH.'include/page_tail.php');
+?>
Index: /extensions/Stereo/help.tpl
===================================================================
--- /extensions/Stereo/help.tpl (revision 5556)
+++ /extensions/Stereo/help.tpl (revision 5556)
@@ -0,0 +1,16 @@
+{* $Id: help.tpl 2010-03-26 pbra $ *}
+
+
+
+
+
+
{'Help'|@translate}
+
+
+
Index: /extensions/Stereo/language/en_UK/description.txt
===================================================================
--- /extensions/Stereo/language/en_UK/description.txt (revision 5556)
+++ /extensions/Stereo/language/en_UK/description.txt (revision 5556)
@@ -0,0 +1,1 @@
+Flash viewer for stereoscopic image (.jps image).
Index: /extensions/Stereo/language/en_UK/help.html
===================================================================
--- /extensions/Stereo/language/en_UK/help.html (revision 5556)
+++ /extensions/Stereo/language/en_UK/help.html (revision 5556)
@@ -0,0 +1,29 @@
+ Flash based Stereo Viewer
+This stereoscopic picture viewer can adapt the displayed image
+
+Menu :
+
+
+ Swap : Swap the two pictures.
+ STEREO :
+
+
+ Mono : Mono view, only one picture.
+ Para : parallel view, two pictures side by side.
+ Cross : Cross view, two pictures side by side inversed.
+ Mirror : Mirror view, left picture mirrored.
+ C_Ana : Color anaglyph, Color anaglyph for Red/Cyan glasses.
+ H_Ana : Half teint anaglyphes, Half teint anaglyph for Red/Cyan glasses.
+ Dubois : Dubois anaglyph, adapted color anaglyph for Red/Cyan glasses.
+ BY_Ana : Yellow Blue anaglyph, Color anaglyph Yellow/Blue glasses.
+ Int : Interlaced view, interlaced pictures for special display.
+ Rint : Interlaced view (inversed lines), interlaced pictures (inversed lines) for special display.
+
+ ZoomIn ZoomOut : Zoom setting.
+ Max : Maximum zoom.
+ FullScreen : FullScreen.
+
+
+ References :
+ Muttyan's Home Page is the flash viewer creator. he also made a lot of stereoscopic tools.
+ Wikipedia stereoscopy article
Index: /extensions/Stereo/language/en_UK/index.php
===================================================================
--- /extensions/Stereo/language/en_UK/index.php (revision 5556)
+++ /extensions/Stereo/language/en_UK/index.php (revision 5556)
@@ -0,0 +1,30 @@
+
Index: /extensions/Stereo/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/Stereo/language/en_UK/plugin.lang.php (revision 5556)
+++ /extensions/Stereo/language/en_UK/plugin.lang.php (revision 5556)
@@ -0,0 +1,38 @@
+
Index: /extensions/Stereo/language/fr_FR/description.txt
===================================================================
--- /extensions/Stereo/language/fr_FR/description.txt (revision 5556)
+++ /extensions/Stereo/language/fr_FR/description.txt (revision 5556)
@@ -0,0 +1,1 @@
+Afficheur d'image stereoscopique en flash (images .jps).
Index: /extensions/Stereo/language/fr_FR/help.html
===================================================================
--- /extensions/Stereo/language/fr_FR/help.html (revision 5556)
+++ /extensions/Stereo/language/fr_FR/help.html (revision 5556)
@@ -0,0 +1,30 @@
+ Flash based Stereo Viewer
+Cet afficheur d'images stéréoscopiques est capable d'adapter l'affichage de l'image en fonction des possibilités de chacun.
+
+Menu :
+
+
+ Swap : Échange les images droite et gauche.
+ STEREO : Sous menu choix de l'affichage stéréo.
+
+
+ Mono : Affichage mono, une seule image.
+ Para : Affichage Parallèle, les deux images cote à cote pour vision parallèle.
+ Cross : Affichage Croisé, les deux images cote à cote pour vision Croisée.
+ Mirror : Affichage Miroir, les deux images cote à cote, la gauche en miroir.
+ C_Ana : Anaglyphes Couleur, Anaglyphe en couleurs pour lunettes Rouge/Cyan.
+ H_Ana : Anaglyphes Demi-teintes, Anaglyphe en couleurs demi-teintes pour lunettes Rouge/Cyan.
+ Dubois : Anaglyphes Dubois, Anaglyphe en couleurs adaptées pour lunettes Rouge/Cyan.
+ BY_Ana : Anaglyphes Couleur, Anaglyphe en couleurs pour lunettes Bleue/Jaune.
+ Int : Affichage Entrelacé, les deux images entrelacées pour écrans spéciaux.
+ Rint : Affichage Entrelacé (lignes Inversé), les deux images entrelacées (lignes inversées) pour écrans spéciaux.
+
+ ZoomIn ZoomOut : Réglage du grossissement (accessible aussi à la roulette de souris).
+ Max : Grossissement Maximum.
+ FullScreen : Plein écran.
+
+ Réferences
+ Le site du créateur de cet afficheur et le créateur des outils de réference en matiére de stéréoscopie : Muttyan's Home Page , à noter que la page en français ne comporte qu'une tres petite partie des informations. Essayez de lire la version anglaise.
+ Les différentes techniques de vision stéréoscopique : Photo Stereo
+ Encore pleins d'infos : canard laqué
+ Et encore l'article de Wikipedia : Stereoscopie sur Wikipedia
Index: /extensions/Stereo/language/fr_FR/index.php
===================================================================
--- /extensions/Stereo/language/fr_FR/index.php (revision 5556)
+++ /extensions/Stereo/language/fr_FR/index.php (revision 5556)
@@ -0,0 +1,30 @@
+
Index: /extensions/Stereo/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/Stereo/language/fr_FR/plugin.lang.php (revision 5556)
+++ /extensions/Stereo/language/fr_FR/plugin.lang.php (revision 5556)
@@ -0,0 +1,38 @@
+
Index: /extensions/Stereo/language/index.php
===================================================================
--- /extensions/Stereo/language/index.php (revision 5556)
+++ /extensions/Stereo/language/index.php (revision 5556)
@@ -0,0 +1,30 @@
+
Index: /extensions/Stereo/main.inc.php
===================================================================
--- /extensions/Stereo/main.inc.php (revision 5556)
+++ /extensions/Stereo/main.inc.php (revision 5556)
@@ -0,0 +1,46 @@
+
Index: /extensions/Stereo/stereo.php
===================================================================
--- /extensions/Stereo/stereo.php (revision 5556)
+++ /extensions/Stereo/stereo.php (revision 5556)
@@ -0,0 +1,116 @@
+ 'Stereo',
+ 'URL' => get_admin_plugin_menu_link(STEREO_PATH.'/config.php'),
+ ));
+ return $menu;
+}
+
+function Stereo_change_picture($content, $image)
+{
+ global $conf, $stereo, $template, $page;
+ //
+ $extension = strtolower(get_extension($image['file']));
+ if ($extension !== $stereo['ext'])
+ { return $content; }
+ if (!isset($image['image_url']) or !empty($content))
+ { // nothing to do or someone hooked us - so we skip;
+ return $content;
+ }
+
+ $template->set_filenames(array('stereo_content' => dirname(__FILE__) . '/stereo.tpl') );
+
+ // compute display size
+ if ( $stereo['fixedheight'] === '' ) {
+ $stereo['containerheight'] = $image['height'] + $stereo['menuheight'];
+ }
+ else {
+ $stereo['containerheight'] = $stereo['fixedheight'] + $stereo['menuheight'];
+ }
+ if ( $stereo['fixedwidth'] === '' ) {
+ $stereo['containerwidth'] = $image['width'];
+ }
+ else {
+ $stereo['containerwidth'] = $stereo['fixedwidth'];
+ }
+
+ // is high def available ? if ( !isset($page['slideshow']) and isset($image['high_url']) )
+ if ( !$page['slideshow'] and isset($image['high_url']) )
+ {
+ $uuid = uniqid(rand());
+ $template->assign(
+ 'high',
+ array(
+ 'U_HIGH' => $image['high_url'],
+ 'UUID' => $uuid,
+ )
+ );
+ }
+ $template->assign(
+ array(
+ 'PHPWG_ROOT_PATH' => PHPWG_ROOT_PATH,
+ 'STEREO_PATH' => STEREO_PATH,
+ 'SRC_IMG' => $image['element_url'],
+ 'stereo' => $stereo,
+ )
+ );
+
+ load_language('plugin.lang', dirname(__FILE__).'/');
+ return $template->parse('stereo_content', true);
+}
+?>
Index: /extensions/Stereo/stereo.tpl
===================================================================
--- /extensions/Stereo/stereo.tpl (revision 5556)
+++ /extensions/Stereo/stereo.tpl (revision 5556)
@@ -0,0 +1,46 @@
+{known_script id="swfobject" src=$STEREO_PATH|@cat:"stflv/swfobject.js"}
+{html_head}
+
+{/html_head}
+{if ($stereo.showhelp=='true')}
+
+{/if}
+
+
+
+ Can not run the Flash applet!
+
+
+{if isset($high)}
+ {'Stereo_picture_high'|@translate}
+{/if}
Index: /extensions/Stereo/stflv/licence.txt
===================================================================
--- /extensions/Stereo/stflv/licence.txt (revision 5556)
+++ /extensions/Stereo/stflv/licence.txt (revision 5556)
@@ -0,0 +1,10 @@
+I ask the flash viewer creator about the license, and if I can redistribute it with my plugin.
+Here is his anwser :
+----------------------------------------------------
+Hello,
+
+You can use my stereoscopic flash viewer freely.
+
+Masuji
+----------------------------------------------------
+so I can redistribute it with my plugin but it's not a free (like free speech) software, it's not under GPL (the plugin is under gpl Not the flash player), you can use it on your website with or without the piwigo plugin. I don't know if you can redistribute it or if the authorisation is only for my plugin, so in that case, ask the author : http://stereo.jpn.org/eng/index.html
Index: /extensions/Stereo/stflv/swfobject.js
===================================================================
--- /extensions/Stereo/stflv/swfobject.js (revision 5556)
+++ /extensions/Stereo/stflv/swfobject.js (revision 5556)
@@ -0,0 +1,8 @@
+/**
+ * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
+ *
+ * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ */
+if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="";_19+=" ";var _1d=this.getParams();for(var key in _1d){_19+=" ";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+=" ";}_19+=" ";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.majorfv.major){return true;}if(this.minorfv.minor){return true;}if(this.rev=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;