I would put <!-- EVENT forumlist_body_category_before --> inside of <!-- IF forumrow.S_IS_CAT or forumrow.S_FIRST_ROW  or forumrow.S_NO_CAT  -->

I would put one event after <!-- IF not forumrow.S_IS_CAT --> to replace <!-- EVENT forumlist_body_category_after -->