Where to put nailers Near Door Opening

I'm building and can't figure out where to put the nailers around the doors.
Butt them right against the door opening I think - is this right? Go all around the opening? I believe this is right otherwise foam board will show. Correct me if I'm wrong. Thanx
Butt them right against the door opening I think - is this right? Go all around the opening? I believe this is right otherwise foam board will show. Correct me if I'm wrong. Thanx
