/d/ after a voiced phoneme (except /d/ itself): /b/, /d/, /g/, /v/, /l/, /r/, /z/, /m/, /n/, /g/ and some more (fricative d as the 'th' in 'bathe', d long zed as the 'j' in 'jam', velar n as 'ng' in 'sing') + all the vowels.
/t/ after a voiceless phoneme (except /t/ itself): /p/, /t/, /k/, /f/, /s/ and some more (esh as the 'sh' in 'shock', t esh as 'ch' in 'cheer' and thorn as 'th' in 'bath').
/
Id/ after /t/ and /d/.
Hope that helps ^^

That's at least what I've been taught.
PS: Sorry for not using that 'phoneme-writing' tool, but I neither have enough time nor I see the phonemes in my browser.