Gallery – 列出图片目录插件
优质
小牛编辑
135浏览
2023-12-01
Gallery – 列出图片目录插件
语法
{{gallery>namespace}} {{gallery>namespace:someimage.jpg}} {{gallery> namespace}} (right aligned) {{gallery>namespace }} (left aligned) {{gallery> namespace }} (centered) {{gallery>http://www.23hq.com/rss/schabloni}}
参数
参数以?开头,用&分割,所有参数的否定在前面加no,比如:cache,nocache
{{gallery>images:vacation?image_*.jpg&80x80&crop&lightbox}} // 所有 {{gallery>?crop&lightbox}}
<markdown> <table class=“inline”>
<tbody><tr class="row0"> <th class="col0 leftalign"> Parameter </th><th class="col1 leftalign"> Default </th><th class="col2 leftalign"> Description </th> </tr> <tr class="row1"> <td class="col0 leftalign"> <code><em><number></em>x<em><number></em></code> </td><td class="col1"> <code>120x120</code> </td><td class="col2"> 设置缩略图大小, 除非设定了crop选项,会保持缩略图长宽比.</td> </tr> <tr class="row2"> <td class="col0 leftalign"> <code><em><number></em>X<em><number></em></code> </td><td class="col1"> <code>800X600</code> </td><td class="col2"> 设置<code>direct</code>模式下链接到的图片大小,会保持长宽比. 注意是大写 <code>X</code>.</td> </tr> <tr class="row3"> <td class="col0 leftalign"> <code><em><number></em></code> </td><td class="col1 leftalign"> <code>5</code> </td><td class="col2"> 每行gallery表里可显示的图片数目. 如果指定为0不使用表格,所有缩略图顺序排列 </td> </tr> <tr class="row4"> <td class="col0 leftalign"> <code>=<em><number></em></code> </td><td class="col1 leftalign"> <code>=0</code> </td><td class="col2"> 限制显示给定数目的图片. <code>0</code>代表所有. </td> </tr> <tr class="row5"> <td class="col0 leftalign"> <code>+<em><number></em></code> </td><td class="col1 leftalign"> <code>+0</code> </td><td class="col2"> 跳过显示前面的number张图片. 和上面的选项一起很有用.</td> </tr> <tr class="row6"> <td class="col0 leftalign"> <code>~<em><number></em></code> </td><td class="col1 leftalign"> <code>~0</code> </td><td class="col2"> Add a pagination for the thumbnails displaying the number of given thumbnails per page. <code>0</code> disables pagination. Pagination is added through JavaScript - when no JavaScript is available all thumbnails are displayed </td> </tr> <tr class="row7"> <td class="col0 leftalign"> <code>cache</code> </td><td class="col1 leftalign"> enabled </td><td class="col2"> Usually the output of the created gallery is cached. When the images in your selected namespace change, you have to manually force an update of the gallery page's <a href="http://www.unixtech.org/caching" class="wikilink2" title="caching" rel="nofollow">cache</a>. To disable the cache for the page showing the gallery, set <code>nocache</code> as option. </td> </tr> <tr class="row8"> <td class="col0 leftalign"> <code>crop</code> </td><td class="col1 leftalign"> disabled </td><td class="col2"> 使用给定的缩略图大小,不保持长宽比,裁剪多出部分 </td> </tr> <tr class="row9"> <td class="col0 leftalign"> <code>direct</code> </td><td class="col1 leftalign"> disabled </td><td class="col2"> 缩略图链接到给定大小的图片而不是图片描述页 </td> </tr> <tr class="row10"> <td class="col0 leftalign"> <code>lightbox</code> </td><td class="col1 leftalign"> disabled </td><td class="col2"> Show images in a fancy JavaScript modal browsing window, see below for details. Setting this option automatically implies the <code>direct</code> mode </td> </tr> <tr class="row11"> <td class="col0 leftalign"> <code>reverse</code> </td><td class="col1 leftalign"> disabled </td><td class="col2"> Reverse the order of the displayed images </td> </tr> <tr class="row12"> <td class="col0 leftalign"> <code>recursive</code> </td><td class="col1 leftalign"> enabled </td><td class="col2"> Find images in the given namespace and all sub namespaces </td> </tr> <tr class="row13"> <td class="col0 leftalign"> <code>random</code> </td><td class="col1 leftalign"> disabled </td><td class="col2"> Sort images randomly. You might want to use <code>nocache</code> as well </td> </tr> <tr class="row14"> <td class="col0 leftalign"> <code>modsort</code> </td><td class="col1 leftalign"> disabled </td><td class="col2"> Sort images by file modification date </td> </tr> <tr class="row15"> <td class="col0 leftalign"> <code>datesort</code> </td><td class="col1 leftalign"> disabled </td><td class="col2"> Sort images by EXIF date </td> </tr> <tr class="row16"> <td class="col0 leftalign"> <code>titlesort</code> </td><td class="col1 leftalign"> disabled </td><td class="col2"> Sort images by EXIF title </td> </tr> <tr class="row17"> <td class="col0 leftalign"> <code>showname</code> </td><td class="col1 leftalign"> disabled </td><td class="col2"> Show filename below thumbnails </td> </tr> <tr class="row18"> <td class="col0 leftalign"> <code>showtitle</code> </td><td class="col1 leftalign"> disabled </td><td class="col2"> Show the EXIF tag <code>Headline</code> as title below thumbnails </td> </tr> <tr class="row19"> <td class="col0 leftalign"> anything containing a <code>*</code> </td><td class="col1"> jpg,gif,png images </td><td class="col2"> This can be used to filter the list of files found in the given namespace. <code>*</code> work as simple wildcard symbol. </td> </tr>
</tbody></table> </markdown>
关于lightbox
基于https://github.com/splitbrain/prettyphoto/tree/merged,源自PrettyPhoto