Private Pictures embed in Posts - 403

Heffalump

Active 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
 

Attachments

  • picture links.webp
    picture links.webp
    52.9 KB · Views: 8
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>
 
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.
 
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 :)
 
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. ;)
 
Back
Top Bottom