Membership Plugin Help

8 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: June 10, 2011   (RSS)

By KCMedia - June 7, 2011

Hi

I have started the process of designing the membership pages and have it so that the users can login to the site that works great but now i am stuck on how to only show each user the information on the page that they are allowed to see as each user is only allowed to see their childs information and no others.

Also with this site the members are added to the cms by the staff only there is no signup page or anything like that.

Can someone help me here is the url for the membership login

http://www.waggachildcare.com.au/kids-portfolio.php

the login is test and the password is test

i have also included the page that will show all the information that is required.

some help would be great thanks
Thanks



Craig

KC Media Solutions

www.kcmedia.biz
Attachments:

kids-homepage.php 12K

Re: [kcmedia] Membership Plugin Help

By Jason - June 7, 2011

Hi Craig,

I've taken a look at your page and it looks like you're off to a great start.

A couple of things I noticed to begin with:
- This piece of code here isn't needed:
// error checking
$errorsAndAlerts = alert();
if (@$CURRENT_USER) {
$errorsAndAlerts = "You are already logged in! <a href='{$GLOBALS['WEBSITE_LOGIN_POST_LOGIN_URL']}'>Click here to continue</a> or <a href='?action=logoff'>Logoff</a>.";
}


This code is usually only used on the login or forgotten password pages as it's meant to alert someone that they are currently logged in.

- Also, you're using "whereRecordNumberInUrl()" to fetch records for a number of sections (google_analytics, portfolio_meta, slogan, kids_name). Since there is no number in the url, it will only ever get the first record in the list. Typically, you only would ever use "whereRecordNumberInUrl()" on 1 section on a page. If any of these sections are single record sections, you can remove the "where" clause entirely since there will only ever be 1 record in that section.

That being said, what information are do you want to display about a particular child. How is this information stored and how is it related to the accounts section (ie, the person currently logged in)?

Let me know and we'll see if we can make some suggestions.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Membership Plugin Help

By KCMedia - June 7, 2011 - edited: June 7, 2011

Hi Jason

well i have 3 sections setup the best way would be for you to take a look at the CMS admin and see how i have set it up would that be alright.

but what i have is 3 multi sections

1 will store the kids name
1 will store a gallery
1 will store a diary

the gallery and diary both have a drop down list that gets the kids name from it to relate the records together based on the kids information.
Thanks



Craig

KC Media Solutions

www.kcmedia.biz

Re: [kcmedia] Membership Plugin Help

By Jason - June 8, 2011

Hi Craig,

How does a parent's user account related to the kid's records?

Let me know and we'll see what we can come up with.

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Membership Plugin Help

By KCMedia - June 8, 2011

Hi Jason

in the user account i created a drop down list that relates to the kids name so it shows a list of all kids added to the system.
Thanks



Craig

KC Media Solutions

www.kcmedia.biz

Re: [kcmedia] Membership Plugin Help

By Jason - June 9, 2011

Hi Craig,

What you can do then is get the value of that drop down for the user that is currently logged in like this:

NOTE, I'm assuming the name of the field is "kid"

$CURRENT_USER['kid']

You can then use this value in the where clause of your other queries to get records that only pertain to that kid. Exactly how you would use this value will depend on what the actual value of the list options is (ie, num, name, etc) and how you've set this up to relate to the other tables.

Hope this helps get you started.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Membership Plugin Help

By KCMedia - June 9, 2011

Hi Jason

i did that but i keep getting errors on the page and still didnt work.

here is the code for the page.
Thanks



Craig

KC Media Solutions

www.kcmedia.biz
Attachments:

kids-homepage_001.php 12K