ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Setting up the structure of my site.. (new to EE)

August 26, 2010 3:18pm

Subscribe [2]
  • #1 / Aug 26, 2010 3:18pm

    BilldaCat

    6 posts

    So I’m running a intramural sports league, where players can come and sign up for a sport, create a team, etc etc.

    Here’s my site in a nutshell, and how I think it may be done in EE:

    People register for accounts (normal registration form)
    People sign up for various teams in particular sports leagues (put into member groups)
    People access their team pages/message boards (restricted template access based on member groups)

    So for the team page.. there’s a lot of elements to it .. some things are public view for anyone, some are custom shown to you if you are a member of the team.

    So I figure the team page template will probably need to have some custom PHP code that’ll query the user’s ID #, see if they are on the particular team id #, relate the team id # to a member group, and have logic in the template showing/hiding particular elements based on that.

    Am I going in the right direction?  I’m imagining I’m still going to need quite a bit of custom PHP just to handle how my existing database works with the storing of the teams/games/scores/schedules/etc.. but this would help get a lot of this in a CMS instead of the flat code it is now.

  • #2 / Aug 26, 2010 7:42pm

    Peter Ripley

    93 posts

    Depending on exactly what you want to do you might be able to accomplish this all with EE out of the box.

    The advanced conditionals “member_group” and “group_id” could take you a long way.

    If you need to limit access to particular weblog entries by team (member group), you might find it wiser to create a relationship between the entry and the member group, rather than from the group and a template that the entry happens to be displayed on.

    My preference always is to have as few templates as possible.  If you have to have, say 3, templates for each team and there are 40 teams that’s a lot of templates to manage.

    I might consider having a field in each weblog with a select list to pick a single team.  Let the value in that select list correspond to that team’s member group.

    When a member is on an entry if their group_id matches the entry’s team_id then they get to see it, otherwise not.

    If a member needs access to the hidden data on more than one team it gets more complicated.  You’ll need a many to many solution, which this is not.  You could use categories applied to the weblog entries.  And then match the category to the member group.  More custom code needed there tho.  If this is an edge case you could consider issuing those folks more than one login.

    There may be third party solutions that make this all happen automagically.  I am not up on the whole EE ecosystem.

  • #3 / Aug 26, 2010 9:09pm

    BilldaCat

    6 posts

    Yeah.. members can belong to multiple teams in different sports over different seasons.  So it gets a little hairy pretty quickly.  I’ll probably just work some custom PHP code around it right now, and then figure out what I can eventually translate into EE.  I have existing data anyway so it’s not like it’s going to be a total clean switch over.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases