Update: MyGolfHelper.com has been renamed to MyGolfSupport.com, it's the exact same site, just a new domain name.

MyGolfHelper.com is a golf social network focusing on the interaction of golf instructors and students BUT is also open and free to all golf enthusiast. It has many of the familiar SNS functionality such as relationship building (friends, students and instructors), activity feeds and posting, status updates and so on.

In essence, myGolfHelper.com is a handicap tracker with Social Network functionally built-in to allow better communication/interaction with other members. Screenshots can be seen here: Screen Captures

Core Site Objectives

World Wide golf instructor database with Google maps integration.
World Wide golf course database with Google maps integration.
Golf stats tracking (handicap, pars, birdies … etc)
SNS/Community website (increase interaction between members)

Some User Functionality

The site can be use to create your own discussion groups and track stats (i.e. Handicap Index, CONGU Index, rounds, birdies … etc). All instructors are automatically inserted into a searchable global directory complemented by google maps. All courses that are entered are also inserted into a searchable maps database. Golf rounds are store on a hole-by-hole basis allowing the site to calculate not only handicaps but also stats for each individual hole. Golf courses need only be entered by members once, it is then available to all members to use.

Some Internal Site Features

This site uses a GeoIP database to help determine the location of a viewer. This feature will later be used to show relevant and local content. The golf courses that are entered are store in a site wide database usable by all members.

Major Modules Used

This is a full list module used.

Core Modules:

Blog, Color, Comment, Contact, Forum, Help, Menu, Path, Search, Taxonomy, Statistics, Trigger

Contributed Modules

This is the full list of contributed modules as of Feb 19, 2010 but I'm sure more will utilized at a later date.

Custom Modules

This are modules you won’t find anywhere on drupal.org

SNS (Social Network System): This is the main utility module (collection of custom modules) used to “glue” all other modules. This module was written to customize other contribe/core modules without having to modify those modules.

  • Profile Pictures: Written to track the profile images that were upload by the user and then allowing them to choose from previous uploads.
  • SNS Lists: Integrates with UserRelationship to create “lists”. Allows users to creates lists and then classify “friends/students ..etc” into those lists.
  • SNS_activity_manager: This module allow the user to “hide” corkboard items that belong to other users.
  • SNS_Wall: provides the functionality of the corkboard and status updates. In the cases where activity message format is insufficient, this module will modify the activity message.
  • SNS: Main utility module
  • Sphoto: Photo Album

Golf (Golf package): This package is a collection of custom modules use to provide golf related functionality.

  • Golf API : api function share by the other modules of this package.
  • Golf Course: add/update/delete of golf courses
  • Golf Equipment: add/update/delete of golf equipment
  • Golf Round: add/update/delete golf rounds
  • Golf Stats: stats calculation (handicap, pars, birdies … etc)
  • My Golf Bag: Integrates with “Golf Equipment” to allow users to add equipment to their bag.
  • User Extra Info: Stores users specific settings for things like colour coding for pars, birdies … etc

MyGolfHelper: This is a utility function use in conjunction with the SNS module. The customization done in this module is site (golf related) specific. It is also the place where custom caching is done to help speed up the site.

A subtheme was built using the Zen base theme.

Major Hurdles

Many challenges had to be overcome to get the site to where it currently is. I will try and explain some of the major ones here.

Profile Page

I wanted to keep this page as simple as possible. So a decision was made to use tabs as a profile page content. The SNS module was called upon to integrate with jquery_ui. A hook was created to allow other modules to add their own tabs. Profile page screen capture

Activity2 Feed

Activity2 is still in active development so not a lot of API was available. The main SNS module was used to help with the retrieval and display of the activities instead of Views. Another issue related to Activity Feed 2 was that activity comments were not deleted when the root activity was deleted. To solve this issue, a cron job check for any rouge activity comments (ones with no activity attached to it) and deletes them.

How do we delete activity items on our own corkboard?

The issue here is that when a friend posts something on your corkboard, the item belongs to your friend so you can’t delete the item from your board. BUT it’s your board so you should be able to remove it.

The solution was to create a custom module to “hide” the item from your board instead of removing it. But if you’re the owner and have permission to delete the item then it will be deleted instead of hidden. The item will also be removed from all other boards.

Activity Messages for Relationships

In the case of one-way relationships (Instructor and Students), the “Activity Template” (Trigger) utility was insufficient to display the correct message. SNS_Wall was used to modify the message (using hook_activity_message_recorded) into the correct context.

Photo Album activity Message

Related to the above issue, I needed to create a message that would say an album was created and then show small preview images.

Issue => the user creates an Album (node) and then is directed to add photos to the new album (also nodes). We could use the “Activity Template” to trigger messages every time a node is created but then we could end up with the first album activity and then possible 60 activity messages for each uploaded image. <= This was unacceptable, I needed one message that the album was created along with image previews.

Solution: trigger a message when an album was created, then for each image added, modify the original album created message to show the preview images. In this case, we only show the first three images of the album. Example Photo feed

CSS Optimization with Private File system

The CSS optimization option is turned off when using the private file system. IE has problems when a certain amount of CSS files are included in a page. Basically, it just stops including them.
To remedy this issue, a special block of code was insert into the themes hook_preprocess_page() function to check for an optimized file, if not found, then combined certain CSS includes and create this optimized file.

Future Outlook

The site is still at its infancy and requires a bit more testing and optimizing, so no new features will be add until "most" bugs are worked out. However, the site is usable.

In the future, a lesson booking system whereby instructors can advertise a lesson and allow students (potential students) to reserve (pay) for space.

Foot Notes

The SNS package will be release under the GPL license. If you are interested in obtaining a copy, please contact me. However, it will be provide with very little support (mainly dependant on available free time). I will try my best to answer your questions but please don’t be offended if you receive no response from me.

The Golf Package will also under the GPL license available upon request. Again, free support is limited.

Comments

ocamp’s picture

hi, thanks for sharing the site and the write up, im just looking through it now.

I just clicked on the 2 links in the write up, Profile page screen capture and Example Photo feed and they both lead to install.php.

mrbeau’s picture

I just started looking around the site and thought I'd let you know that I got this error when trying to look at a map of courses "GMap marker file settings are not configured properly for Private download method, markers will not work!".

Thanks for the contributions to the community!

kenuck’s picture

Hi guys,

Thanks for the heads up, we were in the process of transfering the domain name from mygolfhelper.com to mygolfsupport.com. Once the DNS filters through, it should be okay. But do let me know if you continue to run into difficulty.

cheers

pcdonohue’s picture

Looks like a lot of great functionality, thanks for sharing it.

I'm curious, could you share a little more about your design process? For example, how long did it take, who did the development, why did you choose Drupal over some of the other SN solutions out there?

thanks,
Patrick