The one who admonishes his brother secretly, he has advised sincerely and has honored him. If he does it outwardly (among others) then he has dishonored and shamed him.
There are two kinds of Riya - Showing off-Ostentation ie pure ostentation and adulterated ostention. In pure ostentation "Riya" a man does a good deed only for worldly benefit. In Adulterated ostentation, a man does a good deed with the intention of reaping the benefits of the world as well as of the Hereafter.
Through zeal, knowledge is gotten, through lack of zeal, knowledge is lost; let a man who knows this double path of gain and loss thus place himself that knowledge may grow.