get related news for an attachment

thanks to udoz for reporting and providing the correct code