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.

Members and Channels linking

May 03, 2011 6:55am

Subscribe [3]
  • #1 / May 03, 2011 6:55am

    neoblast007

    3 posts

    Hi,

    I am building the site with the following structure:

    2 member types of estate agents and individuals.

    1 Channel for estate agents.

    1 Channel properties.

    1 Channel for Information pages.

    The channels are linked as follows:
      Each Agent can have many properties
      Each Agent can have many information pages

    Agent members can add / edit information pages and properties
    Individual members can only add / edit properties

    Is there anyway to preset the agent details based on the member so they can not adjust these fields?

    Hope that makes sense.

  • #2 / May 03, 2011 6:49pm

    Sue Crocker

    26054 posts

    Hi, neoblast007.

    Certainly you can do this! You just need to have the right settings for each member group.

    Once you set things up per member group, you can either have them add/edit via the control panel backend, or using the SafeCracker add-on.

    Does that help?

  • #3 / May 03, 2011 7:05pm

    neoblast007

    3 posts

    Hi Sue,

    yes, I think I had already worked it out but there is still one issue but maybe I have over complicated it.

    Essentially everyone can add a property either as an individual or as a letting agent.

    I have created a relationship from letting agent channel into the property channel, however I want the field to only select agents that have been created by the user and not by all.

    Also where can I get code fixes sent to?

    I would like Lines 202 -> 204 in system/expressionengine/fieldtypes/ft.rel.php

    Changed from

            $this->db->select(‘field_id_’.$data[‘field_id’]);
            $this->db->where(‘field_id_’.$data[‘field_id’].’ !=’, ‘0’);
            $rquery = $this->db->get(‘channel_data’);

    TO

            $this->EE->db->select(‘field_id_’.$data[‘field_id’]);
            $this->EE->db->where(‘field_id_’.$data[‘field_id’].’ !=’, ‘0’);
            $rquery = $this->EE->db->get(‘channel_data’);

    You will only notice it if you edit a column

    Thanks

  • #4 / May 04, 2011 1:32pm

    Sue Crocker

    26054 posts

    That error is fixed in EE 2.1.4 beta, or you can modify the file by hand to fix the issue with ft.rel.php.

    Does that help?

  • #5 / May 04, 2011 2:31pm

    neoblast007

    3 posts

    Hi,

    Yes already fixed it in my local copy just wanted to know where to send these fixes if I find anymore.

    Barry

  • #6 / May 05, 2011 5:27pm

    Brandon Jones

    5500 posts

    Thanks Barry! Glad you’re up and running.

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

ExpressionEngine News!

#eecms, #events, #releases