Hello Samir
By default, a router will not forward any directed-broadcast packets out of any of its interfaces. Take a look at this diagram once again:
Imagine there is another router R4 connected to R3, with a subnet of 192.168.34.0/24. If R1 sends a ping to 192.168.34.255, R2 will not let it pass but will respond itself. In other words, it would behave in exactly the same way as with a ping to 192.168.23.0/24.
Now remember that the no ip directed-broadcast
command is the default state, and it is this command that disallows any directed broadcasts to be forwarded. So to answer your question, this command will block all directed broadcasts, regardless of whether or not the destination subnet is directly connected to the interface on which it is applied.
I hope this has been helpful!
Laz