It's not really childish, it's something everyone deals with. I think you'd be hard pressed to find someone that doesn't appreciate a good compliment from someone that's not attached to you in some way -- your parents, friends, significant other, you name it. I had a guy I work with tell me I looked pretty one day. I was floating on air for a good week. Even now, sometimes when I'm getting dressed in the morning I think, "will he think I'm pretty today?" I've been with my fiance for six years, and he's never been one to compliment me without me going on fishing expedition, so I understand what it's like to have another guy compliment you and have it go to your head a little -- which there is nothing wrong with. Try telling yourself you are beautiful. Keep telling yourself until you really feel it and know it's true.
The one thing I kind of take issue is that this guy keeps telling your boyfriend these things. It's coming off as a, "Hey I think you're girlfriend is hot. And if you're not careful, I'm going to sweep her off her feet." Which really.. isn't something you want in a best friend. Not to mention, he wouldn't joke about having a crush on you unless he did... If I were in that type of situation, I'd probably make jokes about it, along the lines of "Hey, let's go hang out with Danny, he's good for my ego!" But in all honesty, you should probably avoid him...
Is there any reason you feel that your boyfriend hasn't been treating you as well lately? Or is it a little touch of the grass is always greener?
Don't feel bad about your post. We're here to support you. And again, it's not childish. It's human nature