Signup that automatically creates a new Section

By ross - October 17, 2013

Hi Scott

Thanks for posting!

Creating new sections as part of the signup process is an option. It starts getting rather advanced though so I was wondering if we could look at this another way.  

If you were to setup just one copy of each of those sections (bio, logos, photos and workouts), it's much easier to give a new member access to each of these sections in a way that they will only be able to see the records they created themselves. In a way, it's as if they have their own copy of these sections because they only see their own content.

Does that sound like it would work? Let me know what you think :).

Thanks!

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

By ScottL - October 17, 2013

Thanks Ross.

That could be an option.  My concern is having my client having to create four editors for each member.  Would it be possible to create the four editors in one shot with a SchemaPresets?

Thanks
Scott

By ross - October 17, 2013

Hi Scott

I don't think I explained myself quite right.  What I am thinking is you just work with 4 sections in total. The signup script can be modified to give each new member access to the 4 sections so that they only see the content they created.  

That is to say, even if you had 100 members, there would only be those same 4 sections. Member 1 can only see content created by member 1. Member 2 can only see content created by member 2. 

Does that sound like it would work?  Basically, I am looking at avoiding having 4 sections (plus a group) per member as having hundreds of sections in CMS Builder will be rather bothersome to manage.

Let me know what you think. Thanks!

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

By ScottL - October 17, 2013

Ross,

Yes, I think that will work fine.  Each member will have their own bio, photos, logos, workouts.  If that's achieved with only 4 sections, great.

Thanks,
Scott

By ScottL - October 21, 2013

Hi Ross,

Just wanted to follow up with you on this.   Thanks.

By ross - October 24, 2013

Hi Scott

Great! If that sounds like it will work, what you'll need to do on your user-signup.php page is look for this block of code:

// NOTE: You can repeat this block to grant access to multiple sections
        mysql_insert('_accesslist', array(
          'userNum'      => $userNum,
          'tableName'    => '_sample',   // insert tablename you want to grant access to, or 'all' for all sections
          'accessLevel'  => '0',         // access level allowed: 0=none, 6=author, 9=editor
          'maxRecords'   => '',          // max listings allowed (leave blank for unlimited)
          'randomSaveId' => '123456789', // ignore - for internal use
        ));

You'll end up having 4 copies of this block. Where you see '_sample' in each one, you'll enter the name of the table you want to give the new member access to. You'll also want to set the accessLevel to 6.  Finally, a couple lines above where you see this code, you'll see:

$setAccessRights = false; // set to true and set access tables below to use this

You'll need to change the "false" to "true" so that the 4 blocks of code we were just looking at actually work :).

Does that all make sense? Give it a shot and let me know how you make out. Thanks!

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

By ScottL - November 11, 2013 - edited: November 12, 2013

I'm using an older version of the Membership plugin, but it's working okay. I"m able to grant access to the following tables - athlete_bio, team_logos, and photo_gallery.

Is it possible to create a viewer page specific to the member upon signup, showing their content?  Possibly a link from within the Content Mgr to their viewer page as well?  

Thanks

By Dave - November 14, 2013

Hi ScottL, 

Is it possible to create a viewer page specific to the member upon signup, showing their content?

Usually what you'd want to do is create a single page, but have it only show a specific users content.  Say you have a page called gallery.php, you can show only gallery records created by a specific user like this: gallery.php?createdByUserNum=123  

You can also filter results by adding a 'where' option to the getRecords() code something like this:

'where' => " createdByUserNum = 123 ",

 Possibly a link from within the Content Mgr to their viewer page as well?  

You can create links under: Admin > Section Editors > Add New Section > Advanced Menus > Text Link

Basically anything is possible, and we've created entire facebook clones build on CMSB, but you do start to get into custom coding pretty quickly.  That said, what I usually recommend is to identify your desired outcome and work in reverse.  eg: what would you like the URLs and pages to look like and work like, and then figure out how to get CMSB to make them do that for you.

Hope that helps, let me know any questions.

Dave Edis - Senior Developer
interactivetools.com