First, some numbers and basic facts. Also, a disclaimer: I'm a senior developer for Sugar Publishing.

TeamSugar is the community hub for Sugar Publishing's 8 content blogs, geared towards women. Across the whole network we reach about 21 million pageviews per month. The largest site of the bunch is PopSugar, which accounts for about 17 million of those pageviews. TeamSugar is the third, with about 1.1 million pageviews per month. Each pageview is served courtesy of Drupal.

Obviously the audience here is not so keen on the content (unless you really want to get the latest hullaballoo on Lindsay Lohan), but I'd be happy to answer what technical questions anyone might have since we're one of the larger Drupal installations out there. So, take a look, give us your feedback, and ask whatever questions you might have.

Comments

krisvannest’s picture

Jesse, thanx much for your generosity-- checked out your site(s) a while ago from a diff tip here and really impressed with the clean/fast look and of course the popularity.

I suppose my 1st question would be generally how your servers are setup, and more specifically if you had to do anything particularly special inside your Drupal site itself (e.g., special PHP coding, somehow linking to multiple databases, etc) to accommodate the large amount of traffic or is it all handled by the servers themselves outside of Drupal?

I'm just about the launch a site and would be interested in some pre-planning in that regard.

Thanks again,
KV

farmerje’s picture

A combination of both, really. We have four app servers now, I believe, and a dedicated database server. We have also extensively edited the code. The architecture of drupal, unfortunately, lends itself to doing things like issuing one query per module per node on a page. For our 8 content sites this isn't too bad because they're easily cached and don't make use of many modules. For TeamSugar it's much worse because each feature generally requires at least one module. We cache where we can and refactor code elsewhere.

For example, I see code like this a lot in drupal modules:

$res = db_query("select uid from users where ... more SQL ...");
while($u = db_fetch_object($res)) {
  $user = user_load($u->uid);
  ... do stuff with $user ...
}

In fact, this is by and large the ways views work, albeit with nodes rather than users. This hurts because often we don't need *everything* that would get loaded with load hooks and that which we do need is easily attainable by joining to another table. Buddylist does exactly this when displaying your buddylist, for example, even though all you probably need is the username and online status.

As for traffic, aside from general architecture stuff, the best thing you can do is keep an eye on third-party modules. I'd say a lot, if not most, of the modules I've seen simply haven't been written from a performance perspective. Also, some modules have huge performance implications regardless. For example, og will kill your site if you're not careful -- it rewrites every query to check for permissions.

krisvannest’s picture

BTW just wanted to say big thanks again for all the generous give-back/how-we-did-it knowledge to the community here; much appreciated.

hrebd00’s picture

I am also seeking for the problem.

mynameisbrian’s picture

Hi,

First of all, I'd like to compliment you on a great-looking Drupal site.

Now for the questions. :)

1) What version of Drupal are you using?

2) I am extremely interested in your profile configuration. Can you describe what modules and customizations you used to create it? Mainly I'm curious how you managed to make every feature user-specific. For example, you have blog, photo albums, bookmarks, guestbook, comments, and groups fall under the /user/username directory. Is this attained by using taxonomy or CCK or custom code or what?

3) How do you automatically create image galleries (etc) for each user?

I'm sure I'll have more questions. Again, great site!

farmerje’s picture

1) It's mostly 4.7 with some select patches from 5.0 and our own customizations.
2) It's a big, ugly hack. I'd elaborate but there's not much interesting going on.
3) We use a modified version of shazamgallery.

mynameisbrian’s picture

It's unfortunate to know that to achieve, what I consider, to be basic funcionality of any social networking site requires such a huge amount of manual coding. I thought the idea of Drupal would be to minimize this exact thing. I'm really surprised that, after 5 versions, no one has created modules for this. I know there are lots of people talking about it, but I mean MySpace/Friendster/etc have been out for 5 years now, and there's still no open source solution. I don't mean to sound like I'm complaining - I just wish I knew more so I could make the kind of site I want.

dougpollei’s picture

I fully agree with your comment above. What software have you found to be the better alternative than Drupal for a social networking site without all the labor to setup.

drupal-is-OK’s picture

I get the impression Dougpollei wasn't profering a better alternative... just noticing that drupal is really in it's element as a community site. The features you mention seem relatively basic but you've had to do a lot of work to make them work for users.

_________
uofl forum

ibexy’s picture

I totally agree with the previous poster. Short of complaining, I think Drupal, as big as it has become, should by now have a way newbies can at least set up something close to or better than what the guys at joomla have. Over there they have Community Builder and it totally handles the user profiling thing.

Michelle’s picture

The post you're replying to is a year old. It's gotten a lot easier to do SN stuff in Drupal since then. I don't know what Joomla has, but building a SN site in Drupal is quite doable.

Michelle

--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.

kwgossett’s picture

Subscribing...hopefully will get around to reading & digesting what all this means some day :)

fidot’s picture

farmerje’s picture

Hmm, we'll definitely take a look. Surprisingly (to me, anyhow), 20% of our audience uses Firefox.

lssolutions’s picture

Yep I get the same thing.

Tom

misty3’s picture

Very refreshing, amazing and even mesmerizing array of features.
The design is neat and clean and fresh - its superb.
The features and packing of features in very interesting blocks is immensely appealing.
The whole project can be a release of "sugar" version of drupal. ( Is that possible ;) )

Some specific queries :
1. og will kill your site if you're not careful
How exactly I can prevent this ? Does drupal or OG developers address this issue ?
It appears to be the most important issue to all intending OG users.

2. How do you pull user photos or separate group photos in side blocks and how do you generate
a link "see more" - in fact, many of us have been asking ( without answers ) or wondering how to do the things you have done typically under http://teamsugar.com/user/Fantasia ? Is this propietary like the theme of drupal.org or a releasable module ?

3. How to tag every online users "online" ?

Best regards

farmerje’s picture

How to tag every online users "online" ?

This isn't really accurate. We just say a user is "online" if they've accessed the site within the last X minutes. The last access time is stored in the user table (I think).

gnat’s picture

here is what i have done to tag folks as online. note, this is for a 4.7 site, but should work all around. I should also note that I ripped it mostly out of the user.module for 4.7. Also this code is in a foreach loop that has the $user->uid object available to it, so you will need to be at that point in your code.

the basic SQL is,

  $time_period = 900;
  $online =  db_query('SELECT access FROM {users} WHERE access >= %d AND uid = %d', time() - $time_period, $user->uid);

then to act on that i simply do something like:

    if (db_num_rows($online) != 0) {
       $output .= '<strong>'. t('online') .'</strong>';
    }

that's a start.

RadhikaS’s picture

Well i am presently working on designing social network website assessment ..,, well i was wondering is't a good idea to use the above code in login.php code or connect.php??

Well i wanted to know whether i can make use of the above code in my project if i make a citation of this site ??

Thanking you,
Rad$

yeeloon’s picture

Hi misty3,

A quick one, have you found out the solution to your question no. 2?

2. How do you pull user photos or separate group photos in side blocks and how do you generate
a link "see more" - in fact, many of us have been asking ( without answers ) or wondering how to do the things you have done typically under http://teamsugar.com/user/Fantasia ? Is this propietary like the theme of drupal.org or a releasable module ?

I'm trying to do the same by using Taxonomy (Similar By Terms module) but apparently... unsuccessful to come up with the right answer.

Let me know if you have try something else better.

Cheers,
yeeloon

jackhound’s picture

This is an amazing collection of sites. I wanted to ask: How many hours of programming did the general core take? How many hours did the design and template integration take? How large was the team of developers? Sorry for being nosy!

Again, congratulations.

Jack

brainless’s picture

Hello,
I checked out most of the *Sugar sites: they are awesome. Well I have two simple questions for you:

1) I assume you have used Drupal for some of your *Sugar sites and some others are coded from scratch or are all the *Sugar sites coming from one integrated Drupal based system?
2) With the amount of hacking that you had to do to Drupal, do you think doing from scratch, with optionally using certain good Open Source code libraries as and when possible is better?

Thanks,
=Code is Poetry=
Sumit Datta,
Web Developer

farmerje’s picture

1) They're all coming from drupal.
2) For the content sites like popsugar, fabsugar, buzzsugar, etc., drupal makes a lot of sense. I can't say the same for TeamSugar and would probably never suggest drupal to someone looking to build *just* a social networking site.

jim_fulford’s picture

I'm starting to build a Social Networking Site with Drupal. We have developers (like me) that know php, mysql, and we're also pretty good on .net. Two questions 1 small and 1 big.

1. You said you would not reccomend someone build a SN site with Drupal. What would you reccomend someone use that needs a good SN site?

2. Your Fronpage is exactly what I'm trying to design for Health Products and News, could you write up a short summary of how you built the homepage. IE Ths block was created using the x module. This block we wrote from scratch, etc. It would help someone starting on Drupal but that knows a good bit about coding a lot.
Thanks
Jim Fulford

farmerje’s picture

1) Drupal has a hard time scaling with the number of modules and a lot of modules that a social network would want, e.g., the og module, are really bad performers. We get a lot of hits on the "my unread" page and it's absolutely brutal. Views also generate atrocious SQL which will pound your database into oblivion if you don't actively monitor the situation. We do not, for example, have a view for each block on the team homepage — the SQL is hand-written.

When you're creating web applications you're typically going for one of three things: speed/scalability, flexibility, or maintainability. Drupal is high on flexibility, average on maintainability, and poor on speed, in my opinion. If your priority is maintainability then I'd go for one of the RAD environments like Rails or CakePHP. If speed is your priority then I'd write your own lightweight framework, or whatever, and do it yourself.

Of course, the most important thing about a social networking site is that it has features which are compelling for its users, assuming it can actually attract a user base. We did it using drupal because that was the framework we were already using for our content sites and it was general enough that it could be made to work, albeit with a lot of fiddilng on our parts. If you're most comfortable with drupal then it's a viable solution, but I'd say it would take no less time to develop a fully-featured social network in drupal than it would in, say, CakePHP. YMMV, of course.

2) We wrote each block on the frontpage of Team ourselves, I believe. "Popular" here just means that node has a lot of activity, be it views, comments, or whatever else.

communityenabler’s picture

Terrific fresh site that is very well done for target market.

Shows a great sense of what can be achieved with Drupal.

I do find a problem after creating an account that the User Menu
in top right obscures the search box and makes it unusable.

j0k3z’s picture

^ You need to click LESS in order to colapse that menu again.

You have an amazing website. Here are some questions I have, hope you dont mind:

1) How have you setup the online status image?

2) What method are you using to show different size avatars in different areas of the website. I am starting to do this now and Im not sure which method is the best.

3) I love the 'user info box' thing in the header of the website when you are logged in as a user. How did you set this up?

4) When signing up you allow people to choose from 2 existing (male/female) icons if they dont wish to upload their own. How was this done?

5) How did you seperate edit profile and edit account information?

6) How is the main page at http://teamsugar.com/ created? Are those sidebars with blocks or is that a page using php snippets?

7) How do you stylize some sidebat blocks different from other? Like when reading someones blog you have nice very minimalisnt blocks but in the main sections you have larger titles, icons, etc in the blocks.

communityenabler’s picture

On IE6 i have the username box under rather than to the right of the
Profile Avatar so even when on less it still obscures.

I have it looking OK on another PC with IE7. Not sure because I have
a longer than usual username.

Has anyone else encountered this as a Teamsugar member?

best regards,
Rob Anderson

j0k3z’s picture

How did you display the user last access time on the profile? Its impossible to find working code to achive this.

Please share :)

liza’s picture

PopSugar got a hefty multi-million dollar CV investment from Sequoia capital. This was announced sometime last year.

I would like to know what amount of money would buy me a site like the one you developed. I understand the need for business decorum, so I'd be content with just an range.

Thanks,
Liza Sabater, Publisher
www.culturekitchen.com

Brook’s picture

Hi, I think you missed this question (posted above) which I am also interested in:

1. og will kill your site if you're not careful
How exactly I can prevent this ? Does drupal or OG developers address this issue ?
It appears to be the most important issue to all intending OG users.

Could you also let us know how many were on the coding team and how long it took to develop please?

Cheers!

farmerje’s picture

1. Cache where you can, skip db_rewrite_sql if you know you're only going to be displaying publicly available nodes, etc. There's no magic bullet.

daniellesmith’s picture

I had visited your site before when I was searching for celebrity news. It's awesome. you guys must have had to do a lot of hacking to get it working so well. I'm just starting with Drupal and I think I will also have to do a lot of hacking to get a good social networking site.

What modules do you recommend as being the best to use for a social networking site.?

Thanks

farmerje’s picture

It depends on the specifics of your site but every social networking site generally has at least three things:
1) The ability to befriend people (e,g,. buddylist.module)
2) The ability for users to form groups (e.g., og.module)
3) The ability for users to post updates about their status, lives, etc. (e.g., blog.module, profile.module).

Brook’s picture

Thanks for both answers!

Could you give us any tips of performance issues related to any of the modules you used please? Especially the SN ones?

You mentioned you had four/5 servers, could you let us know the specs for these please? I guess we'd like to know how 'expensive' it is to run such a site!

Thanks again for taking the time to answer our questions.

farmerje’s picture

In order to check permissions og implements hook_db_rewrite_sql. The way it modifies queries can causes them to take two-or-three times as long, maybe more. If there are situations where you know you don't need to check for permissions try and work it out so that you're not passing the query through db_rewrite_sql.

For example, take popsugar.com. There's no reason to do permissions checking there. Unfortunately, the views module doesn't care about this and there is no notion of a per-site module. We resorted to writing our own SQL and passing that through the views display stuff.

As for the server specs, I don't know that offhand.

that1guy’s picture

I love the way images are implemented and link to a gallery but the gallery is very bare bones. Do you think it would be possible to use Gallery, implement it with Drupal, and allow people to comment on photos and rate photos with some AJAX stars or something? And doing all of this while using a single login? I'd like to very much do a semi-similar site at least with having people create accounts, have their own blog (maybe) etc. Thanks for your help.

farmerje’s picture

There's already a Gallery-based gallery module for Drupal. It's probably called "gallery."

We didn't want a fully-featured gallery, just a way for users to group photos together. Sites like Flickr have more-or-less already created robust, fully-featured galleries, so if you're looking to do something that advanced it's probably better to do integration rather than reimplementation.

that1guy’s picture

Yes, I was talking about "Gallery" before, and while Flickr does an ok Job, I like how it's done with Sugar, as with other sites, where the central image is large and you move on to the others, but what I also want is for users to be able to comment, as well as have the stars to vote on images. I was just asking how easy this will be to do. Also, can't use Flickr since images will have to be watermarked, all images will be ours.

Also, I like the idea of the points system instead of tracking post counts, what module is helping you with this? What about giving people a specific rank on the forums based on posts? Such as silver, etc. And is easy to track who has the most points, etc? It'd be interesting to use this to give away prizes, maybe.

farmerje’s picture

Well, then, I can't really comment on that. Our needs were simple: users were uploading photos already and we wanted to give them a simple way to organize them. You can try modifying shazamgallery yourself to make it do whatever other stuff you want, but you'll have to evaluate the cost/benefit of that.

For the user points we just use the userpoints module (go figure).

that1guy’s picture

Hey, thanks, you're way helpful, and I am asking stuff since I know NOTHING so thanks. I hope you'll continue monitoring this thread in the beginning.

Are you using anything for the forums? I've seen two different modules to replace forums entirely. Are you using modules or elbow-work?

farmerje’s picture

We're just using plain modules for that. Try the various ones out and see which work best for you.

that1guy’s picture

Maybe what I should ask is: Is there anything that is proprietary? Or can everything be done with already available modules? And it's Drupal 4.7 being run, correct?

farmerje’s picture

There's nothing that's particularly proprietary. We haven't released our code to the community mostly because it's not releasable as-is. Well, not unless you want to spend long nights quietly whimpering to yourself.

As for the version, it's somewhere between Drupal 4.7 and Drupal 5. We implemented a lot of the features that eventually made it into Drupal 5 ourselves (e.g., "aggressive" caching) because the site simply wouldn't perform without them.

esllou’s picture

Thanks for your comments on this thread. I would just like some details on the caching side of things as we are about to launch a site which could (could!) become a big traffic magnet. What settings do you use on the standard Drupal install to help you with caching? And do you have other caching help going on in the background that isn't included in Drupal itself? Do you use Throttle module? Do you cache block views? How long is your cache set at?

One other sort-of-related question: do you use Stored Procedures in mysql to shorten and speed up db queries?

farmerje’s picture

What settings do you use on the standard Drupal install to help you with caching? And do you have other caching help going on in the background that isn't included in Drupal itself? Do you use Throttle module? Do you cache block views? How long is your cache set at?

We have our own caching system which lets us cache arbitrary content on the site. We have also split the drupal cache table into caches for menus, pages, etc. because Drupal's cache "architecture" does not really scale with respect to the number of cache writes (by default it does a full table lock, eugh!).

We also avoid using Drupal to expire cache items. Our general strategy is to create menus which, when hit, process some data and store it in the database. We then have an external cron (not Drupal's hook_cron interface) hit the appropriate URLs at certain times. Usually the data is a list of node ids or user ids that result from some expensive database query.

do you use Stored Procedures in mysql to shorten and speed up db queries?

No, although we do use the InnoDB engine. Drupal is rife with MyISAM-isms, though, so if you'll need to be very careful if you're thinking of switching to InnoDB. If you're worried about performance you're going to need to be modifying some of the core to get Drupal playing nice with InnoDB.

jasonwhat’s picture

A good post on creating a flickr like site with drupal
http://www.lullabot.com/articles/how_to_build_flickr_in_drupal

epicure@drupaltaiwan.org’s picture

The site looks great!

I am attempting to build a web site for a community I belong to. I was very excited when I discovered teamsugar because it is a proof that all of the functionality we had in mind are possible to implement in Drupal. Those include group bookmarks, group blogs, list of buddies, etc.

I'd be very grateful if you could answer my technical questions regarding teamsugar. However, I am rather new to Drupal. We just installed our first Drupal site (with plugins including OG, Buddylist, etc) weeks ago, and am still learning the way Drupal works. I struggled quite a lot to learn to do simple things like, for example, display avatars in the list of buddies. So these questions may be very primitive to most readers here.

1. Are the "groups" actually groups formed by Organic Groups? From the previous discussion I am a bit confused whether you actually used OG or used your own implementation.

2. Are the bookmark nodes a user-defined node type? How to allow each group to have its own bookmarks? (The same question for blogs. How to allow each group to have its own blog?)

4. The way the bookmarks are displayed seem to be very customised. Did you use... Views?

3. How did you display the most popular bookmarks on the front page? (Define a new block, and use your own php code?)

Thank you very much!

farmerje’s picture

Are the "groups" actually groups formed by Organic Groups? From the previous discussion I am a bit confused whether you actually used OG or used your own implementation.

Yes, with some modifications.

Are the bookmark nodes a user-defined node type? How to allow each group to have its own bookmarks? (The same question for blogs. How to allow each group to have its own blog?)

This all comes with OG. Bookmarks are nodes and OG lets arbitrary nodes be added to a group. No real magic.

The way the bookmarks are displayed seem to be very customised. Did you use... Views?

No, we used our own stuff.

How did you display the most popular bookmarks on the front page?

The front page of team is a list of all the most popular nodes, not just bookmarks. Popularity is defined by the number of clicks within the last 24 hours.

mattblack_uk2002’s picture

Hi,

I'm completely new to Drupal and am amazed at what you have achieved. Its a fantastic site. I'm wondering if you could give me a rundown on the menu / taxonomy structures used in the site. It would be of great use to me as the community section is layed out very much like I would want mine to be.

farmerje’s picture

We don't do anything special with taxonomies to get our frontpage view. It's just placing blocks of the appropriate content.

mkjones’s picture

Hi, feel a tad silly asking but I cant work it out from looking.

How have you defined your "Celebrity" content as a node? For example the listing: http://teamsugar.com/celebrities

It appears to be similar to the 'user' node but I assume you have not pre-registered each celeb as a different user type just to achieve this.

The reason I ask is, I have been trying to work out the best way to do something similar with musical "events" on one of my sites, I WAS going down the line of creating a new OG for every "event" and then allowing users to subscribe and post etc, but your idea seems much cleaner.

Thank you for sharing, it really is a wonderful example of what Drupal can do.

farmerje’s picture

Each celebrity is a node manually entered into the system. The OG/subscription mechanism is a good idea, but we didn't think of it at the time. Instead we use the node/favorite mechanism to make someone a "fan" of the celebrity.

David N’s picture

Hi, I'm curious to learn how one can add text (and maybe pics/icons) to the register page as seen here: http://teamsugar.com/user/register

(Once you sign up you can immediately start contributing to the entire Sugar Network. Don't just read. Connect. Share. Enjoy....) I'd like to be able to have something like this.

---
David N
http://www.autoconcourse.com (coming soon)

farmerje’s picture

I don't know off the top of my head. If that page is designed to just render a form you can alter it using hook_form_alter.

Walt Esquivel’s picture

Thanks for sharing so many tips with us! I've had many of the same questions asked on this page and you've done a great job answering them. Thanks again!

Walt Esquivel, MBA; MA; President, Wellness Corps; Captain, USMC (Veteran)
$50 Hosting Discount Helps Projects Needing Financing

farmerje’s picture

You're quite welcome. :)

webfusion’s picture

Ok, I appreciate your posting here and taking time to discuss the technicalities of the site... but Sugar Publishing built the network using Drupal for free and got a 5 million dollar investment from Sequoia Capital (see link below) and you are not willing to share even a snippet of code even though you say that "nothing is particularly proprietary"?

Wow.

http://www.techcrunch.com/2006/10/16/sequoia-invests-in-blog-network-tea...

A Five million dollar investment on a Drupal install and NOTHING is shared or given back to the community.

Wow.

esllou’s picture

I will let farmerje respond for herself, but I would like to make a couple of points. First of all, time is money. I know from putting together a drupal site with a huge array of customisations that it eats up hours, days and weeks. So to say "you got your site for free" is not really accurate. Do you realise the work and time and coding that is necessary to go from an out-of-the-box Drupal installation to what what TeamSugar looks like now? And I imagine there was quite a bit of paid development going on with those customisations - again, not free.

Drupal gives people opportunities. Because this person/group has taken the chance to enhance the Drupal CMS out of all recognition doesn't mean others should feel envy towards them. I'm sure this thread alone has been seen by an enormous number of people and those self same people would view that as a contribution back to Drupal. Farmerje didn't have to start this thread.

Walt Esquivel’s picture

I'm very thankful for anything folks give back, e.g. helpful hints and feedback, such as that discussed above, and/or code. I'm not a developer so my contributions are mainly in the form of trying to answer questions others have here and on groups.drupal.org.

Also, I've learned you get a better response by offering encouragement and being positive rather than critical. Something like the following would probably fall into the category of positive support and encouragement: "Sugar Publishing has an incredible array of Drupal-based web sites! It's clear Sugar Publishing has put in significant hours into developing the 4.7 code to do what they need and that some of those needs have actually been introduced into 5.x by other developers facing similar needs. However, any code contributions that Sugar Publishing believes could be beneficial to the Drupal community in the form of code/contributed modules and that wouldn't violate any Sugar Publishing proprietary standards would be sincerely appreciated."

In the end, it's up to the individual as to what he/she contributes back to Drupal. I've seen some folks on drupal.org and groups.drupal.org donate vast amounts of their time in helping others. I'm thankful farmerje decided to answer so many of the questions folks have had - I know I learned a few things from farmerje's replies. For that and all the other contributions, I'm truly thankful. Now that's really good karma! :)

Walt Esquivel, MBA; MA; President, Wellness Corps; Captain, USMC (Veteran)
$50 Hosting Discount Helps Projects Needing Financing

j0k3z’s picture

On your "People" page can you tell me how you created these pages?

» Who's Online
» Who's New
» Most Popular
» Top Talkers
» Top Bloggers

Can you share the snippets that were used to show users meeting these criteria? I really really really need this feature and cant seem to piece it together on my own. Any help would be greatly appreciated.

farmerje’s picture

The code is totally unenlightening. In each case there is a SQL statement which fetches the desired list and then you pass of the results to a theming function. It's the SQL that does the magic. I'll describe how we produce each of these lists. From first to last on your list.

1. A list of people who have accessed the site within the list N minutes
2. A list of people who have signed up within the last N days
3. A list of people ordered by # of people who have befriended them
4. A list of people ordered by the number of comments within the last N days
5. A list of people ordered by the number of blog posts authored within the last N days

Hope that helps. If you don't understand how to turn these into SQL and display the data, well, you should hire a developer. :)

conkhead’s picture

Apparently, webfusion, you've never developed a bona-fide public production site before. If you're going to do anything the least bit special, a whole bunch of customization is required - and usually this revised code simply can't be pulled out of context - it's instrinic to the site at hand and would be generally worthless to anyone else. Farmerje has been kind enough to share some basic concepts they used to overcome some specific hurdles - which in itself is much more valuable than the specific code would be, as that code is probably a mess and unintelligible to anyone who didn't work on the project.

farmerje’s picture

webfusion,

I'm not going to comment on our financials, but if you feel you're up to the task of getting our code base up to community standards then you should apply for a job here at Sugar Publishing. We're looking for solid LAMP developers.

liza’s picture

Thanks for speaking to the hypocrisy of coming here and awww-shucking about a project that is THE core of the company's business plan and the reason why they got 5 million in the first place.

Thanks for speaking up.

dorkman’s picture

First, kudos: Awesome site. Being a hetero guy, I should be embarrassed to admit that I've viewed your site daily ever since the entire Britney/K-fed debacle last fall... but I'm not embarrassed... Even before I knew it was Drupal, I thought it was a damn well-designed site.

Second, question: How do you work the polls? Specifically, when you have a poll like this one:
http://www.popsugar.com/223150

how did you make it so that, after the user answers the poll, he remains in the same "page" of content? The way the Drupal module is defaulted, it takes me to another page when I use polls in the Drupal site I am developing. As in, after a user "votes" in a poll, he is taken to a different "results" page, whereas you have it set so that the results are in the same page of content as the original poll question.

Thanks for the generous use of your time in responding to all our requests.

spooky69’s picture

Interested in the answer to this.

-- http://www.inventionmail.com --

conkhead’s picture

"Being a hetero guy, I should be embarrassed to admit that I've viewed your site daily ever since the entire Britney/K-fed debacle last fall... but I'm not embarrassed... "

I'd be embarrassed... :-) Just kidding - try the veal!

khorby’s picture

I've been using drupal since mid march and one of the sites I looked to as a model of drupal social networking are the Team Sugar sites! Truly fantastic!

The questions that I have are regarding the pictures. How were you able to get a big picture on the profile page, and avatars on the comments sections?

Also...users can put a lot of pictures in their blogs and profiles! What modules did you use to enable this functionality?

Thanks for an awesome series of sites and for being generous enough to share your knowledge with us!

khorby

netranger’s picture

This is the best website. The user profiles are to die for, the random user blocks are to die for, the "see all" link with user images, is to die for, the popular looks with voting is to die for. Everything about this website is like OMG WOW. Only the pro's get to have fun Waaaah T_T

farmerje’s picture

Nothing's stopping you from doing the same. We're a four-man (well, five as of a week ago) team, only two (three, now) of which have extensive development experience. I, personally, had never used Drupal before I started here last October. A significant portion of our time is spent making the site perform, which means for someone starting small they could take that time and focus solely on features.

In short, what are you waiting for? Go for it!

dorkman’s picture

Wow, I figured teamsugar was much bigger than you describe.

Any chance you can give us insight into the "polling" question I posted above?

thanks

farmerje’s picture

Well, you probably don't want to know. Since we make such heavy use of polling we created out own custom poll module which has the desired behavior. The _vote function just calls drupal_goto to take the reader back to the original post.

dorkman’s picture

Are you suggesting we just use the vote module? or that you can apply the vote logic to the polling module?

We generally don't like the voting module, but don't know how hard it is to modify the polling module.

Any advice?

farmerje’s picture

Inside poll.module there is a poll_vote function. We changed it so that rather than redirecting wherever it used to it now goes to the node page.

kalashari’s picture

For celebrities, how do you scrape content from Wikipedia? Is there a 3rd party module for that? I have similar "celebrities" type of page, so Im considering to do something like that... only that Im not sure if that is allowed by google adsense for example.

steve008’s picture

Well even not being a programmer I appreciate farmerje’s info and if anyone in SoCal can do what they have pls contact me as I’m looking for a developer partner for a serious project on a fee or fee/equity basis preferably long term. Thnx again for the info farmerje and let me know if you are looking for work or want to refer someone.
And a question, you said it would take the same time to make a social network site from scratch in CakePHP as it does in Drupal and you “would probably never suggest drupal to someone looking to build *just* a social networking site” so I’m wondering why so many people are trying it for just that…is it that Drupal is more for someone like me without the programmer background and experienced developers would not go the Drupal route for a serious heavy traffic community site when they have CakePHP and other tools in their knowledge base? (Any experienced developers have an opinion on this too?) thnx

Walt Esquivel’s picture

...then I recommend you check out Consulting and Business over on groups.drupal.org.

Walt Esquivel, MBA; MA; President, Wellness Corps; Captain, USMC (Veteran)
$50 Hosting Discount Helps Projects Needing Financing

steve008’s picture

thnx walt

dharamgollapudi’s picture

First off, Kudos for the best use of Drupal for the Social Networking Site. I have looked at TeamSugar.com and its features are great.

I was wondering how the Import friends from Gmail, Yahoo and other email service providers is handled. Is this right off a drupal module or have you created from scratch.

Appreciate your response in advance.

BoarK’s picture

If you look at the page title, it gives the clue to which service they are using.

Here.

It's a separate php script.

Cheers.

dharamgollapudi’s picture

Yeah... I kinda figured out that after I posted the question.

By the way does anybody know how they have created the User Information Block showing the Avatar with links to the Users Blog, Bookmarks, Photos etc.... When I tried to user $user->id variables, its printing currently logged in user information rather than Authors information. Also when I tried to use Drupal's functions in the block, I am getting function not defined error.

How can I achieve this?

Anne_D’s picture

The Pop Sugar website looks great, what software did you use to create the graphics?

-Anne
Ruptured Ovarian Cyst

that1guy’s picture

How is it you use multiple sites with the same log in? Is it easy to do?

farmerje’s picture

We use the singlesignon module.

socialtalker’s picture

love the look, fresh, clean and cheeful. very snazzy. not much into the content. your group of sites looks like an excellent business model. you can sell ads site specific or through out the group.
did you use the multidomain module?

jackdaw’s picture

Very impressive website :-)

What module are you using for the 'report comment' function?

I'd like a solution like that for my own website, but haven't found one yet that allows the user to send me an explanation of why it should be modified.

pielgrzym’s picture

The site is totally awesome, though it seems a tiny bit slow (maybe it's the case of network route from Poland, I don't know).

Ok, Drupal bottleneck is definitely it's performance. The best option is to actually wright our own modules. Does this apply to cck, too? It seems to interfere with drupal's aggressive caching mechanism, and has got a lot more scattered db structure (at first peek, I'm a total arse when it comes to db ;) maybe the more tables the better?).

Sorry for basic question - what do you mean by 'maintainability'? Ability to manage code?

Can CakePHP driven site be a lot better performing than custom optimized drupal install?

--
Pielgrzym

farmerje’s picture

Ok, Drupal bottleneck is definitely it's performance. The best option is to actually wright our own modules. Does this apply to cck, too?

I've never used CCK so I can't comment on that.

Sorry for basic question - what do you mean by 'maintainability'? Ability to manage code?

I'm not sure where you're quoting me, but "maintainability" generally refers to an applications adaptability, particularly in multi-developer environments. If you handed off your code to someone else who was experienced but never saw your code before that instant, would they be able to fix some bugs? Follow its workflow? Add a new feature?

Can CakePHP driven site be a lot better performing than custom optimized drupal install?

I've never done a real performance analysis of two equivalent sites built with Cake and Drupal, respectively, so I can't give you numbers. It also depends on the extent to which your drupal install is "customized" -- ours is so customized that many places hardly look or behave like Drupal at all any longer.

pielgrzym’s picture

Thanks for fast answer :)

--
Pielgrzym

jaqkar’s picture

Jesse is it possible to get in touch with you via email?

farmerje’s picture

jaqkar,

Sure. Send an email to jesse@sugarpublishing.com

farmerje’s picture

jaqkar,

Sure. Send an email to jesse@sugarpublishing.com

erika’s picture

You've built a great website.I've kept your site as one of the benchmark for the site I'm buliding

alvin’s picture

Hi Jesse. How do you create the url for buddylist to look like this http://teamsugar.com/user/TeamSugar/friends instead of the default http://teamsugar.com/buddylist? There isn't any option in pathauto to set it. Do you hack into pathauto and buddylist?

grah’s picture

i'm also interested in this ;/

VM’s picture

use the locale.module which lets you change text strings in drupal and it's modules. The locale.module is part of core. There is a handbook page on how to use this module in the handbook under the section core modules. This will change references.

with regards to how to change the path, create a url alias , using the path.module (not pathauto.module). The path.module is also part of core.

_____________________________________________________________________________________________
give a person a fish and you feed them for a day but ... teach a person to fish and feed them for a lifetime

shipal’s picture

Subscribing :)

And thanks for sharing ! I hope someone applies for a job at SUGAR and releases a couple of modules for us :D

--
I'm from Hong Kong. My profile shows Thailand because Hong Kong was not available from the country list.

alvin’s picture

Hi Jesse. I can submit a blank form in TeamSugar photo album and earn points.

that1guy’s picture

Hey, how long would a project like this take one person? How long did it take you? Was it you alone, was it part time or full time, etc? We're working on something and have no idea how long it should take.

gondwanan’s picture

Love the site.

Can you tell me how you do the 5 step registration process?

dharamgollapudi’s picture

farmerje:

I liked the way your site allows the user to upload images by gallery(s). In one of your responses above, you stated that this was achieved by customizing Shazamgallery (needless to say with Image module enabled). I understood how the Image module lets the users upload one image at a time and Shazamgallery allowing them to organize them by galleries.

But how did you accomplish multiple image upload at a time. Currently it looks like neither Image nor Shazamgallery has this capability. Are you using CCK (with Image field) in customizing the Shazamgallery? I have read several discussions in drupal about the multiple image upload and different options, most of which doesn't create separate nodes for each image. It would be good to have them created as separate nodes so that we can have all other modules work on them.

Although it may be too much to ask you to contribute your customized module (shazamgallery) to the community, I would appreciate it if you could at least briefly provide your feedback on the semantics on how it is achieved, so that somebody (or may be me) would enhance it and make it available for the community.

Thanks in advance for your cooperation. Would greatly appreciate your feedback.

farmerje’s picture

Satynos,

Well, really, I "just did it". I altered the form so you could add multiple image selectors (with fancy javascript and all that). Then, for each image posted, I "fake" the node data and call node_save. Bingo bango.

BoarK’s picture

farmerje,

It's very nice of you to hang around Drupal.org answering our questions considering the success and accolades Teamsugar and Sugar publishing are garnering. I believe I read on Techcrunch that you guys signed a deal with a television network and finished your second round of financing. Congrats.

Nathan.

p.s. I found the Techcrunch link:

Techcrunch

netceo’s picture

Hi Farmerje, thanks a lot for all this info.

Just one question, i see user informaiton traveling across your network of sites, just wanted to know if a single DB is used across sites, or only a few of tables are shared?

thanks

NetCEO

jp.stacey’s picture

I've nothing much to say except: fantastic site(s), and thanks very much for sharing so much information here. Often that's more useful than sharing the actual code. I've quoted snippets from a couple of your comments above on my blog as they're quite interesting from the angle of scaleability/choice of frameworks: I hope that's OK.

When our current development site goes live I'll definitely mention it here: you've inspired me!

--
J-P Stacey, software gardener, Magnetic Phield

rossmc’s picture

What can I say, amazing looking sites! I've posted on the 'general discussion' board looking for advice on choosing a Drupal designer, any help would be greatly appreciated.

that1guy’s picture

I have some questions:

1)How is it here you have search results coming up with pictures? That part of the site is done with pictures for previews of video and pictures as well how is all that done?

2)How do you manage the different blogs being together? What I mean is, how difficult is it to have the different domain blogs tying in together so well? I am trying to get a site off the ground and have a hard time deciding if to go with individual domains. Why go with that route when you can go with one domain and just add /music or /movies?

3)Do you suggest giving every topic a blog or merging things into one? For example, should I make www.url.com/entertainment and include movies,music and tv in there, or go with url.com/music and url.com/movies?

4)From a writer's standpoint, how difficult is it to write on different blogs? Is it that you go to one composition page and from there you choose what blog you want it to be on and then put your tags to suit and include images or is it that you have to go to each individually?

Thanks!

yngens’s picture

subscribe

emerge’s picture

Jesse, super cool site.

I love the way you have implemented drupal and bought in some cools apps with great functionality. We're looking to add some social networking features onto www.revisionworld.com over august ready for the new term so any cool modules OR modules that should be avoided would be cool to know.

www.revisionworld.com
www.emerge.co.uk

kramssov’s picture

I like your site for many reasons, one of them is that you came up with many great community extensions, another reason is the clean and light look of your pages.

Just a wonderful example how a great site can evolve from a drupal basis.

Mark

http://www.luxori.de - The german guide for sophisticated readers

pcoskat’s picture

I've long admired the SUGAR sites ever since I read about them in Business 2.0 Magazine. I'm even more impressed that the Sugar team takes the time to post here.

Kudos, kudos!

I'm sure hoping Santa leaves me a fully functional Drupal site under the tree this year...

venusrising’s picture

Farmerje-
It was really nice of you to take the time to share with the community. A fun read AND great info. Good looking work with Sugar.

Cheers! and all the best

venusrising

venusrising

Nigeria’s picture

How is Sugar Rush created?

Ade Atobatele

Ade Atobatele

j0k3z’s picture

This feature is awesome. I cant really figure out how its done.

BoarK’s picture

Hi,

I noticed that you are using the same java photo uploader plugin that Facebook uses for their own photo uploads. I searched but was not able to find the identity of this piece of software. If it's commercially available please provide a name.

Thanks.
Nathan.

p.s. After writing this message I digged some more and found this: Aurigma Image Uploader. I am positive that this is the uploader being used by Teamsugar and Facebook.
http://www.aurigma.com/Products/ImageUploader/default.aspx

j0k3z’s picture

hmmm, the demo crashed my FF on OSX.

If you get it working on drupal let us know. Im really in need of a fast photo upload solution, do you know of any others that might be easy to integrate into Drupal?

anafaela’s picture

Hi, first of all congratulations on your site! It´s amazing.
I am building a website with diferent sections on it havin names like Tv, cinema,comic books etc.., just like the sugar sites. My first question for you is : are the sites (pop, fab, fit..) only different sections with taxonomy or they´re actually part of a multisite configuration?
My other question is how did you implemented the SEARCH block? I love how it first searchs the current "site" and after shows the options to search on diferent ones. How did you do it? How can I configure my search module to do that?

Thanks a looot for you help!

rosereis’s picture

Great site! It's really encouraging to see that a Drupal site can have this kind of functionality.

We are also working on the development of a social networking site using Drupal, although the work is still far from finished. One thing we haven't been able to do is figure out how to have Drupal notify a user by e-mail when another user sends them a message, and I noticed that this is working very well on your site. Could you share how you have been able to do this? Thanks for your help,

Rose

Walt Esquivel’s picture

Are you perhaps referring to Private Message?

Walt Esquivel, MBA; MA; President, Wellness Corps; Captain, USMC (Veteran)
$50 Hosting Discount Helps Projects Needing Financing

bobbynorman’s picture

the1secondfilm’s picture

really great site farmerje.

thanks for sharing your work, very insightful and very impressive :)

i've been wrestling a lot of the these issues. i'm not a developer, and ended up choosing drupal as a platform for our social networking type site for a collaborative art project. it's great to see some of the functionality our site can aspire to down the line by looking at examples like yours. and reading your process and thoughts has been very helpful for someone like myself.

thanks!

- nirvan
the1secondfilm.com

kleung11’s picture

subscribing..

voyager10000’s picture

I checked out the site, It is an incredible Drupal deployment, very rich in content. Only downside is it caused my browser to go nuts. Perhaps a streamlining would be in order.

I did see some inspiration for what I would like my websites to contain.

Good job Teamsugar.

Mike,
New Drupalite

www.sgworldsnet.com - Drupal powered! - I got this up in less than a day from learning some Drupal.
www.Starcraft2net.com - soon to be Drupal powered
www.tsccnet.com - future site, to be Drupal powered

geoline’s picture

thats a pretty nice design. Its nice to see whats drupal capable of.

nate1972’s picture

Hello,

I am looking to start a social networking site that will have similar features to the TeamSugar site (smaller in scale and in a a different industry).

Any developers out there confident in their abilities willing to take a project such as that? If you're interested, please email me at nate.farrow@hotmail.com

Best Regards

yeeloon’s picture

Hi farmerje and all,

Can you tell me how is this page constructed at http://buzzsugar.com/tv/Grey's_Anatomy ?

It is a page view, where you call all those Category of similar terms (say Grey's Anatomy) to be outputted to the /tv/Grey's_Anatomy. I'm trying to replicate the same examples, but I'm not very sure if I can come close to the above...

Anybody know how this is done?

- yeeloon

kampoo’s picture

Pretty nice design and site structures.

www.esteemit.com | www.vralive.com | www.nunglub.com

dhayalan_ms’s picture

I would like to know wat modules have you used for setting up the videos page....

Associate Architect
Indecomm Global Services

tonyhrx’s picture

Looking at the TeamSugar groups, the members and the postings of each group are visible to the public. Did you do that by hacking OG or did you do it in the theme?

Good job on that site though. Really is a standard setter.

DerTobi75’s picture

Hi,

I hope farmerje is still reading here ;)

Can you tell me how did you get the "1223 Photos posted this week..." stuff done on your frontpage. I really like that feature ;)

And how did you redirect the URLs that profiles are only shown at teamsugar.com!

Regards and keep up the great work,

Tobi

jagdot’s picture

subscribing

yngens’s picture

Dear Farmerje,

Could you please share how you made tabs content to load dynamically? Unfortunately, form available Drupal tools like jstools tabs module it is not possible to do that. Thanks!

BoarK’s picture

yngens,

Jquery UI has a tabs plugin that can load data dynamically. I'm using the HEAD from their subversion. Not sure if version 1.0 includes that plugin.

Hope this helps.
Nathan.

yngens’s picture

BoarK thanks,

My bad I did not mention I am still with 5.x and Jquery UI http://drupal.org/project/tabs is for 6.x only, if you meant that module.

amnion’s picture

I see a lot of people writing "subscribe" in here. I would like to subscribe to this thread but can't see any way how.

Michelle’s picture

There is no way to subscribe, which is why people do that, to get it in their tracker. Personally, I find it annoying to keep gettimg posts bumped in my tracker with just "subscribe" and wish people would knock it off and use bookmarks.

Michelle

--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.

Walt Esquivel’s picture

...for someone to write code that would put a "Subscribe" button on the page that folks could then click to, you guessed it, subscribe to the thread. :)

Walt Esquivel, MBA; MA; President, Wellness Corps; Captain, USMC (Veteran)
$50 Hosting Discount Helps Projects Needing Financing

VM’s picture

There is a subscribe feature in the issue queue, yet users still add a subscribe to a thread there.

_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )

ken69’s picture

Hi,

How do You setup groups into categories, how is it done (http://teamsugar.com/groups) ?

Next thing - i'd like to have forum only on groups. Should i use forum as "Standard group post" ? Do You use og forum ?

Regards and thanks for help :)

alihammad’s picture

Very nice work with the groups.

Ali Hammad Raza
WordsValley

esllou’s picture

jeez, talk about a site ripping off TeamSugar: http://www.modalady.ru/

socialtalker’s picture

but its in a whole nother language after all.

venusrising’s picture

you are correct.
What are RIP!
venusrising

venusrising

lingaloo’s picture

this site is awesome..

kobnim’s picture

subscribe

dmnd’s picture

Since teamsugar used 4.7, will it be making security patches and contributing them? What other large corporate sites use 4.7? The latest patches don't have a 4.7 version

gnat’s picture

Just stumbled upon this comment, while glancing over my post tracker.

Openflows, the company I work for, does limited security support for Drupal 4.7. Read this for more details.

Noira’s picture

My question is what do you use for the chatroom? I was unable to find an integrated chatroom module so I was thinking about using a third-party service.

WorldFallz’s picture

Right at the bottom of the chat page it says "meebo"-- I would guess that's that chat they use.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

deepthistars’s picture

i like this site for many reasons,need some information on search

http://teamsugar.com/people/search/--is this a custom search page?
http://teamsugar.com/people/filter------is this page done with views based on profile fields or cck fields??

lelizondo’s picture

Does anybody know how they did the wizards when adding nodes/profiles?

Luis

dewolfe001’s picture

Hello,
What is a recommended recipe of OG modules to do something like the Team Sugar groups?

Thanks in advance,

Mike

webfusion’s picture

Jesse Farmer says now

"I would not use Drupal if you're planning on scaling to hundreds of thousands of users or more. I used to work for one of the largest Drupal outfits and trust me: it abuses the database like cookie monster abuses cookies. Sugar, Inc. (neé Sugar Publishing, Inc.) was the company I used to work for. Trust me, getting Drupal to scale to that level is NOT FUN and, frankly, not worth the effort. And yes, IMO, it was more work than starting from scratch."

Jesse Farmer, former Sugar Inc. developer
on Facebook's developer forum:

  • http://forum.developers.facebook.com/viewtopic.php?id=162&p=1
  • socialtalker’s picture

    that explains why he never came back to answer any questions. he is an developer/programmer, his needs and demands for high performance are far more exacting that a nondeveloper/programmer....non webmaster like me and most folks using drupal.

    esllou’s picture

    these are the big issues D needs to deal with, not wasting looooooooooooong threads on whether table names should be singular or plural and other similar navel gazing.

    drupal-colombia’s picture

    Hi
    Thank you so much for you great help here
    Im building a website for 100 plastic surgeons and the #1 thing they told me is "WE ARE ADDING OVER 1,000 BEFORE AND AFTER PHOTOS OF OUR PATIENTS AND THEY NEED TO BE VISIBLE TO ALL SEARCH ENGINES". I notice the photos in your website upload fast, did you build the gallery with drupal? if yes what modules and how? or what do you reccommend considering SEO is everything here.
    Thank you in advance for your help.

    picxelplay’s picture

    Images are images. If you want them to be seo friendly, make sure you do your metas correctly. Images are not accessible, so make sure you have text to accompany them.

    ----
    Sudo Kill Cylons

    unleash’s picture

    ur page is deaed - only a dead link is shown... what happened

    VM’s picture

    a little bit of research with google turned up http://www.sugarinc.com/