1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Private Pictures embed in Posts - 403

Discussion in 'Media Gallery Support' started by Heffalump, Nov 23, 2014.

  1. Heffalump

    Heffalump Member

    If a private picture is embed in a post and the user does not have permissions to see it, there is only shown a link to the album. On klick an error message appears with an server 403 error - permission denied.

    Is it possible to change this link in an static text to inform the user, that this picture is in private?
    I.E. "This picture is in private album. You dont have the permission to see it."
    In Google WMT all links with error 403 were shown in the crawling errors and an static information would prevent this.

    Thanks
    Michael
     

    Attached Files:

  2. Chris D

    Chris D XenForo Developer Staff Member

    Generally, the 403 errors are correct and won't cause you any problems.

    However, there are 3 different Gallery BB Code styles. The "Media Only" type will remove the link. Or alternatively you may wish to edit the template, xengallery_bb_code_tag_gallery:

    Code:
    <a href="{$link}" class="{$type}-{$id}ContentLink">
        <span class="galleryText">{$text}</span>
    </a>
    There's actually no way to detect a permission error here, though. But maybe it will be sufficient to remove the href="" bit (don't change the class or it will stop the BB code working completely) and you could perhaps add something below the span:

    Code:
    <small>If no media is shown, you may not have permission to view it.</small>
     
  3. Heffalump

    Heffalump Member

    Thanks Chris,

    that worked like a charme.

    Often I read that the 403 errors are no problem. But google mark them as crawling errors and I think it is not wrong to prevent this.
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    Google mark them as crawl errors to make you aware of the fact that they had difficulty crawling a page. Errors relating to crawling could be intentional (e.g. content no longer available through a legitimate reason, as is the case here) or accidental (e.g. you have unintentionally set your entire gallery to be inaccessible).

    So the crawl errors are there to help you make a decision. An item of content not available? No problem, Google will eventually drop it from its index. An entire site's worth of content not available? You may need to take some action.

    So in this case, you should be ok :)
     
  5. Heffalump

    Heffalump Member

    I understand, thanks.

    Last but not least it's a part of usability. I do not want to send my users on a way that doesn't exist.
    Otherwise there are additional site impressions to show more ads. (y)
    I had to think about it. ;)
     

Share This Page