I'm working on a club module with the following features:
Allow authorised users to:
- create clubs
- join clubs
- leave clubs
- view club content only if they are a member of the club
- post content to clubs only if they are a member of the club
Progress so far:
club.module is based on a clone of forum.module.
new content type: 'club' - nodes posted via the club are tagged as type 'club'.
new vocabulary 'club'
clubs are taxonomy terms with vid = 'club'
nodes posted to clubs are tagged with type = 'club'.
new table {club} (like {forum} and {club_user} which gives membership level of club.
users can create, join and leave clubs.
Add small change to tracker.module and comment.module to hide nodes of type 'club' (not happy with this as it's too specific - would like a more generalised solution). Also need to change ... umm ... node.module I think to exclude 'club'-type nodes from "popular content" block.
I'm having problems working out how to disable searches of 'club' nodes for non-club members.
Ideas I've had to do this:
1) Exclude clubs from the index:
Hack search to exclude 'club'-type nodes when indexing. Nasty.
Add a club_cron() function to post-delete search terms pointing to 'club'-type nodes. Problem is that can't control the order that modules hook_cron() is called, and club_cron would need to run last, so this would need a hack to module.inc:module_list(). Nasty.