Usergroupid 7 is not necessarily a moderator, as that group is a group added by the admin. Moderators are determined by there inclusion in the moderator table outside of Admins at usergroup 6 and Super Mods at usergroup 5.
Would be better (may add a query) to use this as it would catch all moderators in addition to hiding options from moderators in forums that they do not moderate.
Code:
// Hide admin options to members
if (ismoderator($thread[forumid)) {
eval("\$forum_adminoptions = \"".gettemplate('forumdisplay_admin_options')."\";");
} else {
$forum_adminoptions = "";
}