Parsa jaan, as others already mentioned it's difficult to include London and Madrid in the itinerary on a student budget - they are both relatively expensive cities. I assume that you have already found cheap flights to London and from London to Ibiza/Barcelona and that's why you're going that route.
The best way to go from Toronto in my experience is to fly (return ticket) into Mancheter (although London would do as well), get a one way ticket to Ibiza/Barcelona. Get an Ibiza/Barcelona one way ticket and then another one way ticket back to London/Manchester. In 2007, we did Toronto-Mancheter-Ibiza-Barcelona-Manchester-Toronto in July for around $800 CDN taxes in - you can't always get deals that good, but if you play around with the dates and different airlines you should be able to do it for around $1,000 taxes in with no problems.
On a student budget, hostels are definitely the way to go in London as hotels are really expensive (minimum $150 CDN / night for half-decent one). The same thing goes for Barcelona, although if you want to stay a little bit out of the centre, you should be able to find a decent hotel for around $60-70 CDN/night. They are both obvioulsy very big cities with lots of choices so I'm going to focus mostly on the Ibiza portion of your trip...
If you want to see the whole island, it is definitely much cheaper to rent a small car while you are there (around $140 CDN for the week - split between a few people) - although I would take Frabod's advice that you won't be meeting as many girls on your way to clubs into account.
Having said that, as much as Ibiza is a party destination, it also has beautiful beaches, most of which you can only get to by car - not to mention that the clubs are pretty much scattered throughout the island.
The cheapest place to stay would be San Antonio - it's mostly a younger British crowd which I think should be your target. The crowd in Ibiza town is more mature and as such things are a little more expensive there both clubs and lodgings. The 2nd time we were there in 2007 we stayed at the Apathotel Reco Des Sol (apartment hotel) for only 33 Euros a night. I don't think you'll be able to beat that in terms of location and price if you do decide to stay in San Antonio - the apartments are large and can comfortably accomodate three people and I would rate them as "very decent". It's also a very good young crowd (20-35) there. You're about a 10-15 minute walk max from almost everything important in San Antonio with the exception of Cafe Del Mar which is a 5 minute drive away.
If you're into Trance, my top recommendation would be Eden specially on Tuesday nights which was the Gatecrasher night. Es Paradis across the street is more of a sexy mainstream crowd and pretty decent House music - although usually not big name DJ's. If you do go to Eden ask for Carl - he's a cute little English guy and he's very nice and loves Canadians. Just say you're a friend of Sam & Beh's from Toronto and he'll take care of most of your clubbing needs (including tickets for other clubs at much less than "at the door" rates which could be as much 60 Euros these days, etc.) - don't forget to say hi to him from us.
Other notables in San Anonio are the Bull Bar (one of my favorite "hang-out" places there) before you hit the clubs or if you're just having a relaxing night with cheap drinks and lots of games like Gladiators, an actual mechanical bull, pool tables, velcro wall, etc. Next door, they also have go carts, a bungee caterpolt (recommended) and other games. There's also a restaurant across the street (which unfortunately I can't remember the name of) and they usually have a DJ playing at sunset with someone playing the saxophone live on top of the music with someone else playing the bongos. Great view of the sunset, good relatively inexpensive food and a great overall experience.
A few step's down from there is Jimmy's parasailing. He's an older very nice Scottish guy who moved to Ibiza a few years back to soak in the sun instead of doing castle restorations in Scottland - who can blame him!!! His prices are very good and I highly recommend doing that at least once when you're there - the scenery up there is great. Of course, the last notables in San Antonio are Cafe Mambo and the world renowned Cafe Del Mar with its famous sunsets and Ibiza angels giving you massages on the beach! They're located next door to each other and definitely worth visiting in the early evening. Oh, I forgot to mention the "North End" which is where all the smaller clubs and bars in Ibiza are located - that's about a 5 minute walk from Eden and Es Paradis and again good for nights when you don't want to do anything major.
Priviledge, which is in the middle of nowhere, absolutely HUGE (but lacking "soul" somewhat) and unless you catch one of those once-in-a-yaer parties, not recommended. Been there twice and not too impressed. I've missed the foam parties @ Amnesia both times I was there (once there was nothing on because we went there in early June and the other time they were shut down because they had their liquor license revoked!!!), but would definitely check them out if and when I'm there next -I've also heard that they did some major reno's in 08 and it looks pretty good in there. I also haven't been to Space, but heard the crwod there is really "cracked-out" and by that I mean more than the average of other clubs in Ibiza - from what my friends described it was a larger version of Comfort Zone!
Pacha is definitely a sexy club worth checking out and probably the most expensive one on the island - it's a pretty international higer end crowd, but I wasn't at all impressed with the music (and it was Pete Tong when we went). I found it a little too mainstream, particularly for Ibiza. Still it was a pretty good experience overall. Cover at the door 60 Euros, water around 8 Euros and beer around 12 Euros, so definitely a place to hit on a non-drinking night - if you catch my drift.
There's also a little cave about a 5 minute drive from there on too of a cliff which is the most exclusive and incredible place to watch the sunrise in the island - if you've happened toget lucky one night, this would be the best way to return the favor the next morning!
If you're interested, I'm going ot have to look this up on Google Earth.
Other than that, for genral sightseeing the castle in Ibiza town on top of the hill is not a bad place to visit with great views onto the sea in the East and all of Ibiza town. It does tend to get quite hot in there in July and August so wear as little as you can without getting arrested! The beaches in the northern part of the island are also more secluded and quite maginificent - great for a day after chill experience although I highly recommend having some small speakers to play your music - it is pretty quiet and laid back there.
My favorite place in all of Ibiza would have to be the Bora Bora beach club. By far the best music I have ever heard - Ibiza or elsewhere - right on the beach in Playa Den Bosa with planes passing over every 5 minutes and party-goers just going nuts. It's great in the afternoons and you can lay on the beach and sock in the sun with great house playing in the background or you can get on the dancefloor and go nuts - dance in swimming truns or in shorts - everything goes. Both time we went there, they didn't have a cover charge and huge beer mugs (at least pint and half) were only 5 or 6 Euros. Bora Bora is by far my highest recommendation on the island and it totally reminded me of the old party days in Toronto, when people just showed up to dance and smile in clubs.
That wraps up my Ibiza review and my biggest advice would be to pace yourself - especially if you want to do Barcelona after (as opposed to before) Ibiza. It's not difficult to get all burnt out in Ibiza in the first 2-3 days and wasting the rest of your vacation there. If you decide to do only 2 major clubbing nights + Bora Bora and other more "relaxed" nights (althoug that's all a relative term there), you should be okay and shouldn't end up spending more than $600-$700 including food and accomodations which is as student a budget as you can get IMHO.