From a FHA prespective, with the foreclosure, you have a min of 3 years before you eligble for a new mortgage. WIth a Chapter 7, its 2. So all in all, it sounds like you have at least another year before you're ready.
In the interim, and if you have not already done so, restablish credit by opening up some new credit cards/line. Most items that report to and show up on your credit report are called traditional lines of credit. Such a credit/trade line also has to be open for at least 12 months before its considered seasoned and usuable for credit history. 3 such trade lines are usually required. If you have documented 12 months of rental/leasing, auto/life insurance, utilites, cell phone history/payments, you would then only need 2 traditional credit lines.
Next, make certain you have no 30 days lates, collections, or judgements after the BK and foreclosures. Medical collections are exempt from this and allowed.