Curate, connect, and discover
Now from what I can tell there are two main explanations for Danny’s ghost powers.
The first one is the “canon” version. As in it’s more accurate to the explanation in the show but this is the phandom so it obviously differs somewhat. This one says that when Danny turned on the portal it put him in direct connect with an unlimited supply of ectoplasm as the portal opened on top of him. At the same time, massive volts of electricity ran through him, binding the ectoplasm to his DNA. Honestly I like this version less but I think it makes more sense from a logical perspective if you want a like actual explanation.
The second version is my favorite. It’s much more fantasy and mystical. And in my opinion is better for angst, which everyone knows is the most important thing in the phandom. Anyway this theory says that when Danny turned on the ghost portal it opened inside of him, not just on top of him. This caused him to simultaneously exist in the ghost zone and the material realm. When this happened, Danny was hit with a huge surge of electricity, killing him. But things don’t affect people the same way in the ghost zone so can you really expect that nothing weird happened when he was in both. It caused him to die in one dimension but survive in another, making him a paradox existing as both dead and alive. I like to think that perspective changes depending on which dimension he’s in.
Anyway that’s just my take on it and whoever came up with all this is a genius.