DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:sviewer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:sviewer [2012-09-10 13:49] – old revision restored (2012/09/10 11:51) (got it running) werner.flammeplugin:sviewer [2022-01-17 00:33] (current) – Obsolete, flash is not more Klap-in
Line 12: Line 12:
 depends    : cache depends    : cache
 conflicts  conflicts 
-similar    : slideshow,gallery,gallery2,autoviewer +similar    : slideshow,gallery,autoviewer 
-tags       : images slideshow flash gallery+tags       : !obsolete, images slideshow flash gallery
  
-downloadurl: http://public.tty32.org/index.php?dir=dokuwiki/&file=sviewer.zip+downloadurl: https://github.com/TTy32/sviewer/zipball/master
 bugtracker : https://github.com/TTy32/sviewer/issues bugtracker : https://github.com/TTy32/sviewer/issues
 sourcerepo : https://github.com/TTy32/sviewer sourcerepo : https://github.com/TTy32/sviewer
 ---- ----
  
 +Flash is not available anymore in browsers.
  
 ===== Installation ===== ===== Installation =====
Line 26: Line 27:
   * [[plugin:cache]] (Used for xml generation for simpleviewer)   * [[plugin:cache]] (Used for xml generation for simpleviewer)
  
-Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually.+Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
 ==== Installation Fix ==== ==== Installation Fix ====
  
-:!: The current installation of Simple Viewer is broken, the download-link does not exist. But this plugin actually can be made working with Angua. It is a beautiful alternative to the gallery-plugin. Gallery currently has problems within Angua. It kind of works but it hangs up my browser when using keyboard-shortcuts in lightbox-mode to browse through the pictures. May be due to the switch of the java-script library. But Simple Viewer can be an even better alternative, depending on the context. [[user> Harald |Harald Ronge]] //2012/09/10 08:37//+:!: This plugin actually can be made working with Angua. It is a beautiful alternative to the gallery-plugin. Gallery currently has problems within Angua. It kind of works but it hangs up my browser when using keyboard-shortcuts in lightbox-mode to browse through the pictures. May be due to the switch of the java-script library. But Simple Viewer can be an even better alternative, depending on the context. [[user> Harald |Harald Ronge]] //2012/09/10 08:37//
  
 === Instructions === === Instructions ===
  
   - Install [[plugin:cache]] as described   - Install [[plugin:cache]] as described
-  - Install the Simple Viewer plugin by copying this [[https://github.com/TTy32/sviewer/zipball/master | download link]] and paste it in plugin manager. It will install as "TTy32-sviewer-68eac18", rename this folder in "/lib/plugins" to "sviewer" with FTP+  - Install the Simple Viewer plugin with the extension manager. It will install as "TTy32-sviewer-68eac18", rename this folder in "/lib/plugins" to "sviewer" with FTP
   - Within /lib/plugins/sviewer create a new sub-directory /lib/plugins/sviewer/simpleviewer   - Within /lib/plugins/sviewer create a new sub-directory /lib/plugins/sviewer/simpleviewer
   - get the viewer here [[http://www.simpleviewer.net/downloads/simpleviewer.zip]] and unpack on your local computer.   - get the viewer here [[http://www.simpleviewer.net/downloads/simpleviewer.zip]] and unpack on your local computer.
Line 50: Line 51:
          
 in /lib/plugins/sviewer/syntax.php to your liking. in /lib/plugins/sviewer/syntax.php to your liking.
 +
 +
 +
  
 ===== Examples/Usage ===== ===== Examples/Usage =====
  
-See the plugin in action [[http://tty32.org/sviewer|here]]. +See the plugin in action [[http://tty32.org/sviewer|here]]. FIXME Broken!
  
 This plugin takes input images from a given namespace or a list of given images. It then generates a XML file which the simpleviewer SWF uses to show the gallery. This plugin takes input images from a given namespace or a list of given images. It then generates a XML file which the simpleviewer SWF uses to show the gallery.
Line 149: Line 153:
 If you encounter any problems post them here in the Discussion heading please, or contact me, i will respond as soon as possible :) If you encounter any problems post them here in the Discussion heading please, or contact me, i will respond as soon as possible :)
  
 +OK. **Question 1** :-): The [[plugin:gallery]] plugin has a possibility to go to the full sized picture. sviewer is nicer to look at, but I do not find any way to get the original image. Its name is written in the lower left part of the box, but it isn't a link, and there's no link or action in the right-click menu of sviewer. I checked that ''$conf['showOpenButton'] = $conf['showFullscreenButton']= 1'', so I'd expect to have a way to get to the full sized picture.  --- [[user>werner.flamme|Werner Flamme]] //2012/09/10 14:27//
 +
 +----
 +Looks good, Install was without problems, Thanks! 
 +  *I think it would be better to use named attributes (like <sviewer thumbRows='3'>). That makes it easier to overload only some attributes.
 +  *Request: it would be great to use wildcards in a filename to select a subset of a namspace (gallery has this).  
 +  *Buglet: the first character is missing in the image caption names
 +Hans Elbers //2012/09/13//
 +---
 +
 +=== Patch to hide sviewer directory ===
 +
 +sviewer has an annoying feature: it creates a media-directory that is accessible by @ALL for reading.
 +While this can do little harm (I guess) this directory shows up in the directory-tree of the media-manager. To hide this for naive users you could put the following code in /inc/media.php 
 +
 +<code php>
 +/**
 + * Build a tree outline of available media namespaces
 + *
 + * @author Andreas Gohr <andi@splitbrain.org>
 + */
 +function media_nstree($ns){
 +    global $conf;
 +    global $lang;
 +
 +    // currently selected namespace
 +    $ns  = cleanID($ns);
 +    if(empty($ns)){
 +        global $ID;
 +        $ns = dirname(str_replace(':','/',$ID));
 +        if($ns == '.') $ns ='';
 +    }
 +    $ns  = utf8_encodeFN(str_replace(':','/',$ns));
 +
 +    $data = array();
 +    search($data,$conf['mediadir'],'search_index',array('ns' => $ns, 'nofiles' => true));
 +
 +//inserted Harald Ronge
 +//prevent sviewer to be displayed by the media manager
 +//proposal: conf string fo media-manager to to hide directories
 +    if(!auth_isadmin()){
 +        for ($index = 0; $index < count($data); $index++){
 +            if ($data[$index]['id'] == 'sviewer') {
 +                unset($data[$index]);
 +                continue;
 +            }
 +        }
 +        $data = array_values($data);
 +    }
 +//end inserted
 +
 +    // wrap a list with the root level around the other namespaces
 +    array_unshift($data, array('level' => 0, 'id' => '', 'open' =>'true',
 +                               'label' => '['.$lang['mediaroot'].']'));
 +
 +    echo html_buildlist($data,'idx','media_nstree_item','media_nstree_li');
 +}
 +</code>
 +
 +[[user> Harald |Harald Ronge]] //2012/09/29//
 +
 +=== Sort images ===
 +
 +I would like to have the images sorted by their filename.
 +
 +The following changes (insert two lines with sort()) in syntax.php will do that for me:
 +<code>
 +....
 +          }else{
 +            // get file path
 +            $paths[] = $path;
 +            $urls[]  = $mlink;
 +          }
 +
 +          sort($paths);
 +          sort($urls);
 +         
 +          $fsz = count($paths);
 +          for($j=0;$j<$fsz;$j++){
 +            $path = $paths[$j];
 +....
 +</code>
 +
 +<sub>//Joe 2012-10-21//</sub>
  
plugin/sviewer.1347277793.txt.gz · Last modified: by werner.flamme

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki