I found it in Display.template.php on line 878 and changed it to this:
, ', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ', ' . sprintf($txt['attach_viewed'], $attachment['downloads']) : ', ' . sprintf($txt['attach_downloaded'], $attachment['downloads'])), '
This time without syntax error. It is looking better now to me.