As silverfox stated, "this depends". Pneumonia signifies fluid in the lungs. If the fluid is due to an active bacterial infection (yellowish color of expectorant) you can endanger others by coughing and aerosolizing bacteria. As a rule of thumb, you will be contagious until the expectorant disappears or becomes colorless. It is best to stay away from the eldery or those with compromised immune systems while experiencing active bacterial pneumonia. The use of prednisone with these infections is controversial. I know many physicians prescribe a steroid to take with lung infections. My personal opinion is that the degradation of the immune response by the prednisone always outweighs the benefits.
If it is pneumonia, you are not contagious.
It would depend on what type of pneumonia you have. You might want to call your clinic to ask them. There are too many kinds of pneumonia for anyone to answer simply. Besides, after having pneumonia and there being a flu epidemic out there, would you really want to expose your weakened body to that?