Taggic / orphanmedia

syntax plugin to show orphan and missing media files of your dokuwiki
http://www.fristercons.de/fcon/doku.php?id=orphanmedia:descr
GNU General Public License v2.0
3 stars 0 forks source link

Suggestion: Missing view #6

Closed flammy closed 12 years ago

flammy commented 13 years ago

Hi,

here some sugguestions for the missing media files view:

cut the leading "pages" and the trailed ".txt"

pages/namespace/page.txt

to

/namespace/page

e.g. with: substr(str_replace ( ".txt" , "" , $afile ) , 5, 9999)

It would be nice if the path and the filename are in one cell.

You can count the usage of the media file with the function: media_inuse() would be also nice to have.

greets flam

Taggic commented 13 years ago

Hi Flam,

I thought already about something similar. Would it be good to have the wiki link to the page where the media file is referenced but not existing ? The user could jump directly to the finding instead browsing it manually. change would be something similar to:

$p_path = substr(str_replace( ".txt" , "" , $afile ) , 5, 9999) $p_path= "[[" . str_replace( "/" , ":" , $p_path) . "|]]"

If it is that easy I will upload it together with zip-renaming as new version.

ber Tagic

flammy commented 13 years ago

Hi,

the plugin will be executed after rendering the syntax, so [[link]] does not work.

In the Template there is some html_wikilink() function to create a link, i dont know if you can use it in the plugin.

greets

Flam

Taggic commented 13 years ago

thanks for the tip, that is the solution. It provides the link and path info as title. $t1= html_wikilink($t1,$t1);

Taggic commented 13 years ago

There is something I do not know what you mean. I tried to find a function: media_inuse() but was not sucessfully. Could you give me a hint if it is available or if it is meant as a new function of orphanmedia plugin ?

flammy commented 13 years ago

The file inc/media.php

provides the function

media_inuse()

wich returns an array with references to the pages wich are using this media.

I used it for my template and there it workes fine.

greets

Flam

Taggic commented 13 years ago

Just to get it right. You propose to have another function, maybe called valid media files, what lists all media files and number of their references on pages ?

flammy commented 13 years ago

I thought its may be usefull to count the pages linking to the missing media file.

Taggic commented 13 years ago

I have to investigate this a bit more. Probably I can implement it next time. Now I will provide the zip solving the topics of comments 4, 5 and 7. The Orphan output changed. The list does contain now the media path incl. filename and therefore the last column visualized a media preview if possible (somehow crouted). It will be displayed with its file info by clicking on media preview picture. Hope that HTML output is valid.

Taggic commented 12 years ago

Hi flammy, sorry I forgot to update this issue. The requested new view was implemented short before christmas last year. Now you have also to output the valid media links. Please visit the plugin page for more information.

br Taggic