Does electrophilic substitution of hydrogen by electrophiles occur on oxygen or on ring of phenol?

In some reactions such as C6H5ONa with alkyl halide, alkyl phenyl ether is formed, i.e, C6H5O-R in which hydrogen(here Na) is substitued by R. In other cases such as reaction of phenol with bromine water, 2,4,6-tribromophenol is formed (just like in most electrophilic substitution reactions, like kolbe schmitt reaction etc.) where hydrogn at ortho/para position is substituted.


So my question is why in first case R (alkyl group for alkyl halide) is not added to ring ortho/para as in case of friedel craft alkylation? Or in second case Br is not added to oxygen atom?


Is there any specific reason as to why in some cases the hydrogen of oxygen atom in phenol is substitued over the hydrogen atom at the ortho/para position of the ring?


Same is true in case of aniline, eg, in acetylation of aniline, CH3CO is added to nitrogen atom and not to the ring...


It would be really helpful if someone could clarify where my understanding is wrong. Thanks!


Edit:


My question arose out of this problem in which the reagent on the left is attacking the one on the right through its ortho position (Carbon labeled as 1 in picture) as per answer which is (A). I understand why it attacks the vinyl carbon (in second molecule) but not why it attacks through the ortho carbon and not through the oxygen atom.


[![Question](https://i.stack.imgur.com/dGkyx.png)](https://i.stack.imgur.com/dGkyx.png)




A few rules of thumb:


* The electrophile (an electron-poor alkene) is a "soft" electrophile, so we may expect it to be attacked by a soft nucleophile. The electron-rich C-C double bond on your left-side reactant is a soft nucleophile, the oxygen anion is not.
* Carbonyls are thermodynamically favorable (relatively, of course). Nature has an opportunity here to form a carbonyl by attacking through the carbon, which would not be possible if the oxygen attacked.
* This situation doesn't seem to have anything to do with phenol. The left-side reactant could be considered a diene, but not aromatic. I think in this scenario even the conjugation it has is irrelevant, and it is best viewed as an enolate. Phenol would probably behave differently, because maintaining aromaticity by attacking through the O would be thermodynamically preferred to forming a carbonyl and attacking through the C.


 0