The questioner asks: Does informing the people about what a person gives in charity or making it apparent to them deprive the person who does this of the reward (of spending in charity)? For example if every person from a particular group of people were to give a certain (known) amount in spending.
If a person manifests his charity or the sum contributed is manifested to the people, or other than it, then this does not reduce his reward; because Allaah has praised those who spend their wealth in private and public; rather sometimes it may be that spending openly is better than spending secretly if there is a benefit in making it open, such that the people follow his (i.e. the spender’s) footsteps and do what he did. This may be similar to the one who guides to good and the one who guides to good is similar to its doer. “Whoever starts a good thing in Islam, and others do likewise after him, there will be written for him a reward like that of those who followed him in that until the day of resurrection.”(1) Yes. If a person knew in his heart that by manifesting it (i.e. spending in charity) he is intending to show off to the people and to be seen, so that they can praise him for performing this act of worship; then indeed this is from Riyaa, which a person must strive to free himself as much as he can. And Allaah is the one who grants success.
Shaykh Uthaymeen: Fataawa Noor ala ad-Darb page 12-13 vol 7
 A brief clarification: “Whoever starts a good thing in Islam, and others do likewise after him, there will be written for him a reward like that of those who followed him in that until the day of resurrection.”
Jareer ibn ‘Abdullaah (radiyallaahu-anhu) said: “Some people from the Bedouin came to the Messenger of Allaah (sallal-laahu-alayhi-wasallam), wearing woollen garments. He saw that they were in bad shape and in desperate need, so he urged the people to give them charity. The people were very slow to respond, and it could be seen in his face (that he was upset). Then a man of the Ansaar brought a package, then another came, and another and another, and his face was filled with joy. The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Whoever starts a good thing in Islam, and others do likewise after him, there will be written for him a reward like that of those who followed him in that until the day of resurrection.” Whoever starts a bad thing in Islam, and others do likewise after him, there will be written for him a burden of sin like that of those who followed him, without it detracting in the least from their burden.'” [Reported by Imaam Muslim (rahimahullaah) in Book of Zakat. Hadeeth Number 1017]
“Whoever starts a good thing in Islaam;” Starts acting upon a legislated Sunnah and it does not mean the one who innovates; because the one who innovates something (i.e. an act of worship that is not legislated) in Islaam, he will have it rejected. Rather, what is intended in this hadeeth is the one who was the first person to act upon that Sunnah, just like this companion who came along with a package to give in charity. There are three ways of starting something in Islam:
- To start something bad and that innovation. It is something evil even if it is made to look good because the Prophet (sallal-laahu-alayhi-wasallam) said: ‘’Every bid’ah (in the religion) is misguidance.’’
- To start a good thing in Islaam and this occurs in two ways:
- A person revives an abandoned legislated Sunnah: A person finds that a legislated Sunnah in Islaam has been abandoned, so he revives it. For example the Prophet (sallal-laahu-alayhi-wasallam) legislated the night prayer (i.e. Taraweeh, Qiyaamul Layl during Ramadhaan) behind an Imaam, but he abandoned it during the latter part of his life fearing that it may become obligatory for his Ummah. This continued during the time of Abu Bakr and the early part of Umar’s Khilaafah. However, Umar later revived this Sunnah by gathering the people behind a single Imaam in Taraweeh. So Umar started a good Sunnah in Islaam because he revived that which was abandoned.
- A person becomes the first person to act upon a legislated Sunnah: This happens when a person becomes the first to act upon that Sunnah, such as the man who came forward with charity and the people followed in his footsteps and gave in charity.
So there is nothing to be considered a good Sunnah in Islaam except that which has been legislated in the Sharee-ah. So whoever revives an abandoned legislated Sunnah or leads the way to performing a legislated Sunnah, there will be written for him a reward like that of those who followed him. However, some people have taken this hadeeth an excuse to innovate in the religion of Allaah that which is not from it.
For further details, see discussions by Imaams Bin Baaz and Muhammad Ibn Saaleh Al-Uthaymeen (rahimahumallaah):