I had some interesting times with fungus gnats... check out my thread
here.
Here is what I did:
Go to your local hardware or garden store and get some B.T.I. (Bacillus Thuringiensis Israelensis)... it usually comes as a mosquito dunk (like a hard biscuit), or I have found some that are little packets that dissolve in the water. Its called Mosquito Beater WSP by bonide products.
Step 1: (the step i didnt do) - Bake your soil.
Step 2: Add Mosquito Beater WSP pouches (or other BTI product) to jugs of water when feeding plants (i run soil) - water plants w/ BTI laced water, then let plants go without water for a few days until they are REALLY dry... almost to the point of wilting and dying (pay CLOSE attention to the plants at this point).
Step 3: Hang fly traps and blue & yellow sticky traps up in the garden, and also hang the sticky traps upside down from little chopstick a-frame holders I made (the adults fly up from the soil and fly towards the bright light)
Step 4: Get some small pea-gravel from the garden store, wash it very good, and place the pea-gravel on top of your soil to form a barrier so that the adults cannot lay more eggs in the soil (I used perlite, which works, but makes a HUGE fucking mess when your fans blow it everywhere, creating mountains of perlite in the corners of the garden).
Step 5: Get some predator mites from the garden store, and release them into your plants.
I also have some real spiders that make webs in the corners of the garden, and they have even caught a few of the adults.
So far, my fungus gnat problem has completely disappeared, and I havent seen a fungus gnat for quite some time.