I think writing your own code is all well and good BUT you are automatically adding a hell of a lot of bugs whether you think so or not.
One example i'll use is
http://www.maani.us/charts/index.php the PHP/SWF Charts code. If I want to create something like that its going to take me probably months to develope. To bug fix is gonna take a hell of a lot longer. Sure I'd get a basic system up and running pretty quickly but it just wouldn't have the amount of features available with that.
Code reuse makes for less bugs in your code assuming of course you're using tried and tested code. So I'd have to recommend you not feel bad about using others code assuming the license allows for that. (in some cases of course it just won't).
PEAR / Cake / zend framework are great ways of speeding up your development time.
For something like a social network ... you've be talking about anywhere from a few weeks to having a working prototype to months.
Depending on how scalable you make it all will have a big influence on this. As well as all the nice little features we now expect by default from these types of things.