Hi Guys,

I've recently finished and launched a social networking website made completely in Drupal 4.7. In the process of creating the site I received a lot of help from both the forum and the handbook. So I thought it was about time I gave something back. Social networks seem to be a pretty popular goal for Drupal developers so this thread might come in useful.

The site itself is using the principles of social networking to help people learn languages. Have a look here; www.huitalk.com and if you have any "how do you that" questions I'll do my best to help. I'll be a little busy over the next few weeks but I will try to respond to the questions as quickly as possible.

The site uses (among others) the following modules:

  • CCK
  • Views
  • Buddylist (hacked to pieces and reconstructed)
  • privatemsg
  • Forms
  • nice_menus
  • nodereference
  • pageroute
  • profile
  • registerprofile
  • tinymce
  • usernode
  • Looking forward to any questions!

    Neil

    Comments

    funana’s picture

    Your site looks very nice!

    Did you know that there is a group for Social Network Sites with Drupal?

    Here we go: http://groups.drupal.org/social-networking-sites

    Have a nice day!

    dkruglyak’s picture

    Any possibility of releasing "hacked to pieces and reconstructed" version?

    Where are the weak spots you had to fix?

    ncameron’s picture

    The trouble is I'm in a slightly dangerous position. I have enough coding knowledge to hack away and make mods but not enough to constructively contribute to modules. There were not really weak points that I was working around, it was more a lack of functionality. The following were things I achieved through modifications:

    - Pics in the buddy list
    - Country info in buddy list
    - Using HEAD code enable 'confirmation' i.e you are not my buddy until you approve my request
    - Using HEAD code to enable a person to type a message when the invite someone
    - Auto sending an email when a buddy list is requested (v. important fo us)
    - Disabling the groups feature (unnecessarily complicated for our needs)
    - Slight changes in the appearance of the messages when adding a buddy.
    - creating a single page to view all buddy statuses.

    The other thing that complicates things is that the mods are spread over 3 areas. A few changes to the module file, a few changes that went into template.php and a static page for the MyFriends page.

    I'm sure this flies in the face of all coding standards but it certainly gets the job done. Many of the above features may well be implemented in the latest release of buddylist. If you are interested in the above mods, do so at your own risk - I think I will enter a world of pain when upgrade time comes!

    If you are seriously interested in implementing some of the above features let me know and I will try to explain. I say 'seriously' because it will be a fair bit of time and effort for me.

    Hope this helps,

    Neil

    - Connecting Language Learners
    www.huitalk.com

    Zoologico’s picture

    Hi Neil,

    If it doesn't infringe too much would you kindly answer:

    1) Do you have a complete list of modules that you used?

    2) For what purpose and how do you use each module? Do you use each solely for their intended purpose or did you find an alternative way to use some?

    3) How much "hacking" did you have to do? Just looking for a general idea like "I had to modify the code on all, most, considerable, few, or none of the modules."

    4) If you did have to modify code, what are your plans when upgrade time comes around?

    Thanks kindly and nice work on the site. I like the concept and the graphics just on my first impression.

    ncameron’s picture

    Phew... ok, this will be a long one:

    1) Do you have a complete list of modules that you used?

    block
    buddylist
    chatroom
    comment
    computed_field
    contemplate
    content
    date
    feedback
    filter
    forms
    help
    image
    image_exact
    imagefield
    inactive_user
    insert_view
    invite
    landing_page
    link
    locale
    menu
    nice_menus
    node
    nodefamily
    nodeprofile
    nodereference
    number
    optionwidgets
    page
    pageroute
    pageroute_ui
    path
    pathauto
    poll
    privatemsg
    profile
    registerprofile
    search
    simplenews
    statistics
    story
    system
    taxonomy
    text
    tinymce
    tracker
    user
    usernode
    userpoints
    userreference
    views
    views_fusion
    views_rss
    views_theme_wizard
    views_ui
    watchdog
    xstatistics

    2) For what purpose and how do you use each module? Do you use each solely for their intended purpose or did you find an alternative way to use some?

    All were used for there stated purpose. Have a look at the project pages for what that it is. The only module I modified were buddylist (see post above). I've done some heavy theming on all the node types of both the node and the form for creating the node.

    3) How much "hacking" did you have to do? Just looking for a general idea like "I had to modify the code on all, most, considerable, few, or none of the modules."

    See above. Aside from hacking, there are some sprinklings of code in the .tpl.php files, some heavy theming of those and a fair bit of css work. But the important difference is that this is all 'above board' and should be easy when upgrade time comes.

    4) If you did have to modify code, what are your plans when upgrade time comes around?

    Go to a dark corner, curl into a ball and rock back and forth until the problem goes away... Hmm. That was also a question I was also asking myself. In theory the only thing that will give me problems will be buddylist and even for that the data still goes into the database the same way so it will only really be cosmetic and process changes that will have to be re-done. The rest should be more or less painless (touch wood).

    The optimistic answer is that by the time we need to upgrade (i.e 4.7 is unsupported)(maybe 24 months?) we will either be making enough money to hand it all over to outside people or we will be looking to wind down the website.

    Hope all this helps,

    Neil

    - Connecting Language Learners
    www.huitalk.com

    msolt’s picture

    Hi,
    this is a very nice website. How did you print out the:

    Who's Online
    Total members: **
    Guests online: *
    Members online: *

    Is it possible that you upload the code?

    Best regards,
    Maik

    ncameron’s picture

    Again, sorry for the delay but better late than never eh? Below is the code for Who's online block. I have a feeling I copied and pasted this wholesale from another post on drupal.org.

    <?php
    $number = db_result(db_query('SELECT COUNT(uid) AS number FROM {users} WHERE status=1'));
    
    		  // Count users with activity in the past defined period.
    		  $time_period = variable_get('user_block_seconds_online', 900);
    
    		  // Perform database queries to gather online user lists.
    		  $guests = db_fetch_object(db_query('SELECT COUNT(sid) AS count FROM {sessions} WHERE timestamp >= %d AND uid = 0', time() - $time_period));
    		  $users = db_query('SELECT uid, name, access FROM {users} WHERE access >= %d AND uid != 0 ORDER BY access DESC', time() - $time_period);
    		  $members = db_fetch_object(db_query('SELECT COUNT(uid) AS count FROM {users} WHERE access >= %d AND uid != 0', time() - $time_period));
    		  $total_users = db_num_rows($users);
    		
    		
    		  // Format the output with proper grammar.
    echo '<id="sidebar-left" class="sidebar">';
    echo "Total members: $number <br>";
    echo "Guests online: $guests->count <br>";
    echo "Members online: $members->count <br>";
    ?>
    

    Note, if you check the site you'll see I've up graded this part to show the number of chatters. I've omitted this from the code as it is module specific. I have also omitted the part which prints the user photos and name. If you're interested in either of those parts let me know.

    Thanks,
    Neil

    - Connecting Language Learners
    www.huitalk.com

    subirghosh’s picture

    Neil: Your site sure does look good. I mean, really good.

    But a few questions about the modules that you are using.

    i) I thought you might be using the flexinode module for the extra custom fields in the user registration form? So how have you created those?

    ii) Don't you need all the organic group modules for networking?

    And thanks for sharing. You have given back more than you think you have :)

    ncameron’s picture

    Hi there,

    Sorry for the tardy response, the day job has been hectic recently. In answer to your Q's:

    i) The extra fields in the registration form is a neat optical illusion. first Usernode, nodeprofile, and nodefamily and CCK were used to create profiles as nodes. There is plenty written about how to do this. Second RegisterProfile module (http://drupal.org/project/registerprofile) was used to display these on the sign up page.

    ii) Hmm.. i looked at OG stuff thinking it might be useful but non of it was really applicable for our use. I think OG is more for giving people the spontaneous ability to form groups. Whilst this might be something for the future, at the moment we dont need it.

    Cheers for the complements, always good to hear.

    Thanks,
    Neil

    - Connecting Language Learners
    www.huitalk.com

    davidslee9’s picture

    Hi

    Love the thread. I could not find all mods on the drupal site. Do you have a tar file of them?

    David

    metoo’s picture

    I visited the site - and it is great.

    Would you be willing to tell how many hours it took to build, the duration, and the number of builders?

    ncameron’s picture

    Hey,

    Well, I don't know if my experience will help you... I built it single handedly and from nothing to running smoothly it took about 4 months but that was working about 15 hours a week on it. And I started knowing zero about Drupal/Php/MySql so there was a hell of a learning curve. Since it was completed I added a few features like the forums and vocabs and they took about 8 - 12 hours to get them up, running, themed and tested.

    Hope this helps,

    Neil

    - Connecting Language Learners
    www.huitalk.com

    metoo’s picture

    Neil,

    Building this site in less than 300 hours is great achievement.

    Nice job!

    omnyx’s picture

    Huitalk - your website looks really good.
    a question: how did you manage to have nice icons next to the menu items?

    cheers and keep up the good work!
    also, big thanks for 'giving back' to the community. we all appreciate that!

    ncameron’s picture

    So the menus are done with nice_menus (link: http://drupal.org/project/nice_menus) which gives you nice java-esq pop out menus. It also allows you to theme a CSS file which affects the look of the menus. Each 'part' or menu option can be themed by referencing it's menu number, this can be found by going to mysite.com/admin/menu and then hovering over the 'edit' link and looking at the number in the URL.

    So your CSS file should look something like:

    
    #menu-142, #menu-203, #menu-217
    	{ /* General settings */
    	background-repeat: no-repeat;
    	background-position:3px 50%;
    	text-indent: 20px;
    }
    /*ICONS*/
    #menu-142{/* FIND SOMEONE */
    	background-image:url(http://mysite.com/files/icons/magnifier.png);
    }
    #menu-203{/* Chat*/
    	background-image:url(http://mysite.com/files/icons/comments.png);
    }
    #menu-217{/* Forum*/
    	background-image:url(http:/mysite.com/files/icons/user_comment.png);
    
    

    Note the first parts of the CSS which indents the text and positions the 'background' image (the icon).

    The actual icons are freely available from http://www.famfamfam.com/ they're cute, free and there are 1000's of them.

    Good luck!

    Neil

    - Connecting Language Learners
    www.huitalk.com

    omnyx’s picture

    thanks for your help Neil!

    before I download nice_menus two questions:
    1. it says it's still .dev version. Does that mean it's usable and will it create trouble with this particular task (i.e. putting icons next to menu items)
    2. do i need nice_menus to begin with if I'm just putting icons next to menu items? :)

    many thanks...i will be checking your site out and ask more questions if that's ok :)

    cheers

    ncameron’s picture

    Hey,

    As far as I know,

    1) I've had no problems so far, its worked fine.
    2) I wanted nice pop out menus so I never checked any other way of doing it, I can't think of any other way of doing it but there might be!

    Cheers,
    Neil

    - Connecting Language Learners
    www.huitalk.com

    kulfi’s picture

    Clean theme and tight site. Really appreciate your sharing implementation details and challenges!

    kulfi’s picture

    -

    touchcrew’s picture

    How did you get the images to show up in the buddy list this is sommething that I really want for my site?

    http://life1134.wordpress.com/
    http://www.touchcrew.com/

    ncameron’s picture

    Hey there,

    There is a lot already written on adding avatars to buddy lists, I would start by looking here: http://drupal.org/node/97060

    Cheers,

    Neil

    - Connecting Language Learners
    www.huitalk.com

    touchcrew’s picture

    I saw that when I searched http://drupal.org/node/97060 But I am new to Drupal and I really dont understand what it is. it does not tell me dto do anything? I can use all the help i can get. Thanks

    http://life1134.wordpress.com/
    http://www.touchcrew.com/

    touchcrew’s picture

    I figured out what to do with it. But now I want to know how to get it all to work is there any way I can get you to help me out?

    http://life1134.wordpress.com/
    http://www.touchcrew.com/

    lagatita’s picture

    Hi there, your site looks fantastic! I am in the process of creating a simple dating site and need a search feature which allows users to obtain a list of members, with thumbnails of their photo, based on age, location and some other fields.

    I have been looking through modules, but have not found the right one yet. I would like the user to be able to search using list selections and single line textfields. Do you have any suggestions, and how did you set up your member search?

    ncameron’s picture

    The search function in huitalk is created using views. Basically the profiles you see are created with CCK and limited to one per user see stuff about node profile module for how to do this. The profile content type mostly consists of text fields, which can be free-searched with views.

    So in conclusion views+node profile should do the job.

    Cheers,
    Neil

    - Connecting Language Learners
    www.huitalk.com

    astawicki’s picture

    Is there a way you could give step by step instructions to make the site.

    sudesh_poojari’s picture

    Good work done,

    Your website looks good and works good too.

    alb’s picture

    registerprofile: this module not exist.
    so actually 2009 which modules for manage user profile you are using?

    robieoconnor’s picture

    Impressive site for 4 months from scratch knowledge, I would like to now what aides like books and web site you used to help master drupal php and sql.

    Robert

    ncameron’s picture

    At that point just drupal.org and lullabot podcasts. Nowerdays there are loads of resources out there. Have a look at this blog post: http://drupal.altate.ch/blog/drupal-learning-resources

    --
    Drupal Development for Pleasure and Profit
    http://drupal.altate.ch

    sarav.din33’s picture

    Hi ncameron,

    I also working on my community site development. I wish to use buddylist module, but this module is available only for version 5.

    I use drupal 6.17 version. So, how can i upgrade the buddylist module to version 6.

    Please, guide me on this issue as soon as possible.

    Thanks & Regards
    Sarav...

    Thanks & Regards
    Sarav..

    sycorax’s picture

    nice site buddy.

    m in the process of makin one....:)

    Callaghan89’s picture

    awesome site man!

    can you give me a step by step guide to getting Nice_menu's to work? I cant get mine too for the life of me!!!

    Cheers

    Callaghan

    ashiali’s picture

    can anyone help me? plz its urgent
    i wanna a site where i allow people to become salesperson and earn commision on my products. each member can be visited by many people(guests) , i want to keep a track of visitors against each member so i could calculate commision of each member accordingly.
    u can also reply me at aliayesha23@yahoo.com

    aac’s picture

    Subscribing!!

    ---~~~***~~~---
    aac

    mahendranthenur’s picture

    Hi , Your website is looking very nice,i am new in drupal developement i need to create social networking website , Please send me the step by step guide to create social networking site, Please send me to mahendranthenur@gmail.com

    Thanks ,

    Mahendran

    shaynl’s picture

    The best example of a social network made on Drupal is:
    http://www.brazencareerist.com/

    praveena123’s picture

    HI
    will help me with what are the modules used to this site

    michaellovesdrupal’s picture

    First of all, congratulations on your site. My question is, what type of server are you using or are you using a web hosting site to host your website? Also, is it a lot of money to pay to host that type of site? Don't have to give me the number, just a simple yes is good enough for me.

    Thank you.

    Roze-1’s picture

    Subscribing!

    wobblebonk’s picture

    Nice work on your site. Keep it up!