Summarize this article in one sentence.
Fiber can help prevent IBS symptoms because it improves intestinal functioning. It may decrease bloating, pain, and other symptoms by softening your stools so that your body can pass them more easily.  Good sources of fiber are fruits, vegetables, whole grain breads, and whole grain cereals. Try to eat something containing fiber with each meal. Add fiber to your diet slowly to minimize bloating and gas that can be brought on by a sudden increase in fiber. Work with your doctor and possibly a dietitian to find a diet that is healthy and that works for you. Sources of soluble fiber may also help, such as dried beans and other legumes, oats, barley, and berries. These work to slow down the passage of food from the stomach to the intestines. If you suffer from diarrhea caused by IBS, then this diet modification is not for you. You don't need to avoid fiber entirely — you need it as part of a healthy diet — just make sure you're eating soluble fiber (found in peas, oats, dried fruits, and more) rather than insoluble fiber (found in wheat, corn, the skins of root vegetables, and more). All of these can make IBS symptoms worse, including diarrhea. Specific foods to avoid are dairy, honey, chocolate, sugar-free candy and gums, and wheat and rye breads. Also, vegetables such as broccoli, cauliflower, cabbage, and Brussels sprouts may trigger bloating and gas. Beverages to avoid include alcoholic beverages, dairy, anything containing chocolate, anything with caffeine such as coffee, tea, and soda, and anything with fructose syrup. Even with the above guidelines, each body reacts differently to different foods. Elimination diets are a very effective way to pinpoint foods that trigger negative reactions. Make a list of possible food triggers, then eliminate one food at a time for 12 weeks.  Another option is to try a gluten-free and/or a lactose-free diet, as these are common triggers for IBS symptoms. See if bloating and gas decrease. If you switch to either diet permanently, make sure to research and work with your doctor to ensure you're getting appropriate nutrition.

Summary:
Consume fiber-rich foods if you have constipation. Avoid sweets, fatty foods, and any food or drink containing fructose syrup. Try an elimination diet.