Fixed "View attachment" hardcoded in Base Formatter

xf_phantom

Well-known member
In XenForo_BbCode_Formatter_Base::renderTagAttach "View attachment" is hardcoded.
PHP:
  if (!$this->_view)
     {
       return '<a href="' . XenForo_Link::buildPublicLink('full:attachments', array('attachment_id' => $id)) . '">View attachment ' . $id . '</a>';
     }
If i get now a email from the board, because of a reply in a watched thread, the attachment link text will be in english, even if the user uses another language.

The phrase exists already ( view_attachment_x ) you'll just have to use it in renderTagAttach :p
 

xf_phantom

Well-known member
Many things were marked "as designed" 3 years ago, which were changed & implemented in the last releases:)

Not sure if there was no posttext in the watched threads notification mail, but NOW we have it, and it's IMO a NOGO to not provide the translation here...
If it's as designed, then the attachment link should be removed, because a non speaking user shouldn't get ANY not translated message & text. Even if it's just "View attachment 12356" )
 
Last edited:

Jeremy

Well-known member
I think the fundamental bug here is that there is no view for the attachment in emails, since Mike said that its hard coded to expose them.
 

Mike

XenForo developer
Staff member
Previously, rendering without a view never happened - it was basically an indication of a bug. But now we have a few situations where that can happen so this is worth tweaking.
 
Top