I think you misinterpreting word "hacked"....
"hacked" is when a hacker broke into your server/site, by using security holes in a script or system itself and did modifications in the code or other bad stuff on the server or modifying settings of a script, etc.
Leaving comments with links to porn sites is no way can be considering as a hacking
P.S. just in case, redownload 4images v1.7.2 package again, and replace global.php on your server from this package, there have been some changes in that file which I'm going to publish if its not published yet (still reading last posts since my last visit;))