| Предыдущая версия справа и слева
Предыдущая версия
Следующая версия
|
Предыдущая версия
|
beget:dokuwiki:syntax [2020/10/22 20:52] Николай Солошин [flowcharts Plugin] |
beget:dokuwiki:syntax [2022/02/12 11:40] (текущий) |
| |
| Where anchor_text is the text-link your visitors will see. | Where anchor_text is the text-link your visitors will see. |
| | |
| | ==== Gallery ==== |
| | |
| | === Syntax === |
| | |
| | A basic gallery can be added by selecting a [[:namespaces|namespace]] like this: |
| | |
| | {{gallery>:namespace}} |
| | |
| | All image files in the selected namespace will be added to the image gallery. Don't forget the ":" in front of the namespace. |
| | |
| | Instead of using a whole namespace of images, you can also specify a single image -- this makes more sense when combined with the lightbox mode (see below). |
| | |
| | {{gallery>:namespace:someimage.jpg}} |
| | |
| | The created gallery can be aligned by using white space (defaults to centered): |
| | |
| | {{gallery> namespace}} (right aligned) |
| | {{gallery>namespace }} (left aligned) |
| | {{gallery> namespace }} (centered) |
| | |
| | Instead of a namespace, you can also give an HTTP(s) URL to any [[wp>Media RSS]] or ATOM feed with enclosures (as produced by most photo sharing sites like Flickr). The images will then be pulled from that feed instead: |
| | |
| | {{gallery>http://www.23hq.com/rss/schabloni}} |
| | |
| | Note: since the question mark is used to separate the parameters (see next section) the URL can not contain any question mark. To use such a feed URL with the gallery plugin, just use one of the many short URL services like [[http://bit.ly]]. |
| | |
| | E.g. instead of ''%%http://api.flickr.com/services/feeds/photos_public.gne?id=22019303@N00&lang=en-us&format=rss_200%%'' use a shortened URL like ''%%http://bit.ly/HurZM%%''. |
| | |
| | Additionally, to have thumbnail creation correctly working you need to set [[config:fetchsize]] big enough to get the remote images downloaded. |
| | |
| | == Parameters == |
| | |
| | A number of parameters can be set by appending them with ''?'' character to the namespace or image. Each parameter needs to be separated with a ''&'' character. Defaults for all parameters can be set in the config manager. If a parameter is enabled by default it can be disabled in the syntax by prefixing it with the syllable ''no''. E.g. the parameter ''cache'' is usually enabled and can be disabled using the keyword ''nocache''. Below is a list of all recognized parameters |
| | |
| | ^ Parameter ^ Default ^ Description ^ |
| | | ''//<number>//x//<number>//'' | ''%%120x120%%'' | Sets the size for thumbnails. Unless the crop option is set, this is a boundary box into which the thumbnail will be fitted, maintaining the correct aspect ratio. | |
| | | ''//<number>//X//<number>//'' | ''%%800X600%%'' | Sets the size for the linked images in ''direct'' mode. This is a boundary box into which the image will be fitted, maintaining the correct aspect ratio. Note the uppercase ''X''.| |
| | | ''//<number>//'' | ''5'' | The number images per row in the gallery table. If you specify a 0 no table is used instead all thumbnails are added in a sequence. | |
| | | ''=//<number>//'' | ''=0'' | Limits the output to the given number of images. ''0'' means all. | |
| | | ''+//<number>//'' | ''+0'' | Skip the first number of images. Useful with the option above. | |
| | | ''~//<number>//'' | ''~0'' | Add a pagination for the thumbnails displaying the number of given thumbnails per page. ''0'' disables pagination. Pagination is added through JavaScript - when no JavaScript is available all thumbnails are displayed | |
| | | ''cache'' | enabled | 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 [[:caching|cache]]. To disable the cache for the page showing the gallery, set ''nocache'' as option. | |
| | | ''crop'' | disabled | Make thumbnails the exact given thumbnail size big, cropping when needed. | |
| | | ''direct'' | disabled | Link thumbnails with the bigger sized images not with their detail page | |
| | | ''lightbox'' | disabled | Show images in a fancy JavaScript modal browsing window, see below for details. Setting this option automatically implies the ''direct'' mode | |
| | | ''reverse'' | disabled | Reverse the order of the displayed images | |
| | | ''recursive'' | enabled | Find images in the given namespace and all sub namespaces | |
| | | ''random'' | disabled | Sort images randomly. You might want to use ''nocache'' as well | |
| | | ''modsort'' | disabled | Sort images by file modification date | |
| | | ''datesort'' | disabled | Sort images by EXIF date | |
| | | ''titlesort'' | disabled | Sort images by EXIF title | |
| | | ''showname'' | disabled | Show filename below thumbnails | |
| | | ''showtitle'' | disabled | Show the EXIF tag ''Headline'' as title below thumbnails | |
| | | anything containing a ''*'' | jpg,gif,png images | This can be used to filter the list of files found in the given namespace. ''*'' work as simple wildcard symbol. | |
| | |
| | == Example == |
| | |
| | {{gallery>images:vacation?image_*.jpg&80x80&crop&lightbox}} |
| | |
| | This displays all images beginning with ''image_'' and ending in ''.jpg'' from the namespace ''images:vacation''. Thumbnails are cropped to 80x80 pixels and images will be opened in lightbox mode. |
| | |
| | == Example == |
| | |
| | {{gallery>?crop&lightbox}} |
| | |
| | This displays all images in the current namespace using 2 parameters. Parameterlist begins with ''?'' additional ones are concatenated with ''&''. |
| | |
| | === About the Lightbox mode === |
| | |
| | This mode will open the clicked picture inside the current browser window without leaving the current page. |
| | |
| | You can close the picture view by clicking the X button in the upper right corner. You can move to the next or previous image by using the arrow buttons in the lower bar. You can also use the keyboard shortcuts listed below for navigation and closing. Mobile users can swipe to navigate and use the back button to close the gallery. |
| | |
| | The following keys can be used to navigate: |
| | |
| | ^ Key ^ Action ^ |
| | | ''->'' | next image | |
| | | ''<-'' | previous image | |
| | | ''ESC'' | close the image view | |
| | |
| | ==== Footer ==== |
| | |
| | === Footer template === |
| | |
| | To add footer text to pages in a namespace, you need to create a file named ''%%_%%footer.txt'' in this namespace.\\ |
| | And to add footer text to pages in the namespace directory and its subdirectories create a file named ''%%__%%footer.txt'' in the namespace directory. |
| | |
| | Files beginning with "%%_%%" cannot be created or changed within dokuwiki. Instead you have to create a file and upload it into the wanted namespace. If you don't want this behaviour and you want to maintain data from within dokuwiki you have to define prefixes in the plugin settings, e.g. "hf" and "hfu". In this case you have to create the pages ''hf_footer'' and ''hfu_footer'' in the namespace directory. |
| | |
| | === Additional syntax === |
| | |
| | To avoid a certain page from the footer template (e.g. the start page) you can insert this special command |
| | ~~NOFOOTER~~ |
| | to the content of this page. Please note that this command is only removed from the page text if there is a footer template exactly for the namespace of this page. |
| | |
| | === Example === |
| | |
| | {{https://raw.githubusercontent.com/Juergen-aus-Zuendorf/dokuwiki-plugin-footer/main/footer01.png}} |
| | |
| | The screenshot above shows this syntax: |
| | |
| | a) The content of the page "mynamespace:example" is: |
| | |
| | ==== HtmlMetaTags Plugin ==== |
| | |
| | <code> |
| | {{htmlmetatags>metatag-keywords=(values) metatag-og:description=(open graph description.)}} |
| | </code> |
| | |
| | **Note:** Linebreaks can add inside the <nowiki>{{ }}</nowiki> without any trouble. |
| | <code> |
| | {{htmlmetatags>metatag-keywords=(values) |
| | metatag-og:description=(open graph description.) |
| | }} |
| | </code> |
| | |
| | === Syntax === |
| | |
| | With the string ''%%{{htmlmetatags>...}}%%'' on the page level you activate the plugin. The leading string "metatag-" marks a tag for the web site. After this leading string followed the key from tag. In ''%%=(...)%%'' write the value of the tag. |
| | |
| | Also, the plugin is on page level. |
| | |
| | Example to activate the plugin on your page write: |
| | |
| | <code> |
| | {{htmlmetatags>metatag-mytag=(some usefull text)}} |
| | </code> |
| | |
| | The meta tag: //mytag// is any word. This word is the name of the new meta tag, e.g. keyword. Followed on this name is to write ''='' with ''%%('...')%%''. This brackets contains the text required for the value of the new meta tag. |
| | |
| | You can write more than once meta tag on the page separate by space. |
| | |
| | <code> |
| | {{htmlmetatags>metatag-robots=() |
| | metatag-keywords=(apfel,bananne,birne) |
| | metatag-description=(Allgemeiner Obstbauer) |
| | metatag-media-og:image=(:wiki:image.jpg) |
| | metatag-og:description=(anything else) |
| | metatag-og:any=(anything else 2) |
| | }} |
| | |
| | </code> |
| | |
| | The **result** on web page is: |
| | |
| | <code html> |
| | <meta name="robots" content="noindex,nofollow"/> |
| | <meta name="keywords" content="apfel,bananne,birne"/> |
| | <meta name="description" content="Allgemeiner Obstbauer"/> |
| | <meta property="og:image" content="http://localhost/lib/exe/fetch.php?media=wiki:image.jpg"/> |
| | <meta property="og:description" content="anything else"/> |
| | <meta property="og:any" content="anything else 2"/> |
| | </code> |
| |
| ~~DISCUSSION:off~~ | ~~DISCUSSION:off~~ |