1====== OrphanMedia2 Plugin ======
2
3---- plugin ----
4description: Display orphan and missing media files. Based on unmaintained orphanmedia plugin
5author     : jercle
6email      : ercolwell@gmail.com
7type       : syntax
8lastupdate : 2023-02-15
9compatible : anteater, rincewind, angua, "Adora Belle", Elenor Of Tsort, Frusterick Manners, Greebo, Hogfather, Igor
10depends    :
11conflicts  :
12similar    : OrphansWanted,MultiOrphan,orphanmedia
13tags       : orphan, maintenance, links, listing, search, missing
14
15downloadurl: http://github.com/jercle/orphanmedia2/zipball/master
16bugtracker : http://github.com/jercle/orphanmedia2/issues
17sourcerepo : http://github.com/jercle/orphanmedia2/
18----
19
20Based on the abandoned [[https://www.dokuwiki.org/plugin:orphanmedia|OrphanMedia Plugin]]
21
22===== Installation =====
23Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
24
25==== Changes ====
26
27{{rss>https://github.com/jercle/orphanmedia2/commits/main.atom date}}
28
29===== Examples/Usage =====
30Use this plugin to find orphan and missing media files within your DokuWiki. There are 4 options provided to get the related information.
31
32OrphanMedia show which medias are:
33^ Option  ^ Output  ^
34| all  | will display the complete set of results of the other parameters togethers  |
35| summary  | __Counter based information:__ \\ # of Page files \\  # of Media files \\  # of Media references \\  -> Filter settings \\  # of valid, qualified references \\  # of valid, relative references \\  # of Missing media files \\  # of Orphan media files  |
36| valid | all valid media links referenced by full qualified path will be displayed  |
37| relative | all valid media links referenced by relative path will be displayed  |
38| missing | Missing Media, the media file does not exist, but there are link(s) to it elsewhere on the pages  |
39| orphan  | Orphan Media, the media file exists, but not linked and wasting space only  |
40
41===== Detection & Limits =====
42^  Link Type  ^  Comment  ^
43| standard, local DW media links \\ <nowiki>{{:ns:mediafile|title}}</nowiki>  | full qualified links also as relative links, with or without parameters, all detected  |
44| enclosed DW media links \\ <nowiki><box params|{{:ns:mediafile|title}}></nowiki> | all detected  |
45| specials excluded | medialinks within %%<code>, <file>, <nowiki>, <php>, <html> and %%%% are ignored \\ further can be excluded by adding regexpr to plugin conf  |
46| linked external media files \\ <nowiki>{{http://www.wherever.com/whatsoever.type}}</nowiki>  | all detected; if valid, they will be viewed within relative section. \\ __**Attention:**__ \\ mediafile will be displayed as missing in the event a login will be neccesary to open it \\ (e.g. linked documents from CMS)  |
47| gallery plugin references \\ <nowiki>{{gallery ...</nowiki>  | not recognized, will be displayed as orphan if not otherwise linked  |
48| flashplayer  | flashplayer may work for local files (not yet tested sufficiently)  |
49| unc path  | not yet tested sufficiently  |
50| windows shares  | not yet tested sufficiently  |
51===== Syntax =====
52**Basic** usage is to place one of the following five syntax lines into the page markup of a page with Admin/Superuser ACL:
53<code>
54 ====== Orphan Media detection ======
55  ~~NOCACHE~~
56  ~~ORPHANMEDIA:all~~
57  ~~ORPHANMEDIA:summary~~
58  ~~ORPHANMEDIA:valid~~
59  ~~ORPHANMEDIA:relative~~
60  ~~ORPHANMEDIA:missing~~
61  ~~ORPHANMEDIA:orphan~~
62</code>
63
64The summary will be displayed in any case.
65
66You can combine outputs. For instance you want to see the summary, missing and orphan option only \\
67the following syntax is valid (put the options together without delimiter):
68  ~~ORPHANMEDIA:missingorphan~~
69Further you can specify a filter to limit the output to then specified file-extension according \\
70following example (add file-extensions separated by ":"):
71  ~~ORPHANMEDIA:all:png:jpg:gif~~
72:!: The summary counters will be affected accordingly beside the limited output.
73
74It does also check for flashplayer-plugin links if they refer to local path.
75===== Development =====
76
77Each valuable help is welcome. The code is not that complicated, just looping through and \\
78displaying some filename and path info without any effect to your source.
79
80
81===== Version/Requirements =====
82The plugin was tested with DW 2022-07-31 "Igor" and older.
83
84=== Weakpoint ===
85If you have multiple pictures named e.g. //Image006.gif// then the tool fails. \\
86Please try to keep good style by authoring and give descriptive names to your media files.
87
88=== Known Bugs and Issues ===
89It could happen that not all media files will be detected or some feed links, etc. interpreted as such. \\
90I tried to filter that out but due to that many syntax plugins it cannot catch all issues. \\
91If  you have a real problem please tell me the root cause of your problem at:
92[[http://github.com/jercle/orphanmedia2/issues|OrphanMedia2 Issues]]
93
94===== Sites using this Plugin =====
95Feel free to add yours here:
96  *
97
98===== Discussion and Bugs =====
99Please use only the DokuWiki Forum for discussion. To report an issue please refer to:
100[[http://github.com/jercle/orphanmedia2/issues|OrphanMedia2 Issues]]
101