Menu

How to Hide Media External File Name?

Help
2010-08-18
2013-05-30
  • Gary Bartlett

    Gary Bartlett - 2010-08-18

    In my GEDCOM Configuration, I have disabled the "Show file name in Media Viewer" setting, and in my GEDCOM Privacy I have added Global Fact Privacy settings to not show External Files (FILE) to anyone.  This has removed the display of my "C:\Users\…" paths on media files, EXCEPT when a media object (picture) has not title in the GEDCOM.  In this case PGV seems to display the external file name in its place, ignoring my security settings.  Is there another setting somewhere that will disable this, or can someone hint at where I can fix this in the code?

    Thanks,
    Gary
    (Finally upgraded to 4.2.3)

     
  • Stephen Arnold

    Stephen Arnold - 2010-08-18

    Gary
    PGV, in the absence of a TITL, uses the file name for display, since it would be inappropriate to display the item without any reference whatsoever. Solve your problem by adding TITLes to all your media. No, there is no setting to change.
    -Stephen

     
  • Gary Bartlett

    Gary Bartlett - 2010-08-19

    Thanks Stephen.  I will try to update my media when I get the time, but I think it is more inappropriate for PGV to violate the privacy settings that it offers (leading one to believe that external file paths will never be displayed, when they actually might be).  I actually don't see a problem with not displaying a caption for a picture if it has no title (there's always the context in which it is displayed or the path that led the user there).  I think it would be better, at least, from a security perspective if the path was stripped from the external filename for use as a pseudo-caption in these cases.

    Thanks,
    Gary

     
  • Stephen Arnold

    Stephen Arnold - 2010-08-19

    Gary
    PGV is not violating anything you set. You did not set to hide TITL field - and you can't. PGV, IOHO, correctly displays a substitute title if you or your users fail to add one. It would be extremely fast to GREP your GEDCOM and replace the 1 TITL, 2 TITL references that lack any additional text with a placeholder for later search and replace, like 1 TITL -- and 1 TITL --

    What security perspective? What is the big deal is with displaying the file path? If it truly bothers you its easy enough to block the display and downloading of the file with .htaccess modifications (hotlinking) and also easy to prevent display of a non-watermarked image to unauthorized users by using media firewall.

    See the recent thread https://sourceforge.net/projects/phpgedview/forums/forum/185166/topic/3791754 for a thorough discussion of the methodology.
    -Stephen

     
  • Stephen Arnold

    Stephen Arnold - 2010-08-19

    Gary
    In MEDIALIST.PHP see the code at about Line 300
    if ($name=="") {
    //$showFile = false;
    if ($isExternal) $name = "URL";
    else $name = basename($media);

    Off the top of my head, I don't recall other media files performing this substitution, but it is not at all unlikely.
    -Stephen

    You could REM this out and it won't appear on the media list, but it will also screw up viewing and sorting.

     

Log in to post a comment.