Comments

veronicaSeveryn created an issue. See original summary.

veronicaseveryn’s picture

Added some changes to README file of the module on DEV branch:

--------------------------------------------------------------------
MEDIA IMPORT Configuration
--------------------------------------------------------------------

First of all, on example of Properties/Listings resources:
under Drealty > Drealty Connections > [Your Specific Connection] > Configure Listings > [Enabled Resource] > Configure

(the path will be something like this: admin/drealty/connections/manage/[connection_name]/resource/drealty_listing/[class_id]/)
at the very bottom of configuration form, find a checkbox "Process Media?" and make sure you enable it to be able to get Media Objects from RETS.

Next, go to configure a Field Mapping (Drealty > Drealty Property Types > [Your Created Property Type] > Manage Fields) for your Media Object you're willing to import.

Let's say you need to get IMAGEs (some RETS systems allow you to obtain the actual image object you can save into Drupal OR you can obtain a URL which points to the file inside
RETS system storage):

1. To obtain IMAGE OBJECT from RETS (based on GetObject() call):
- Create IMAGE type field
- Under "Drealty Field Mapping" fieldset pick "GetObject() call", if your RETS system support GetObject() functionality.
- Select a field for "Media Object Modification Timestamp Field", e.g. LIST_134 - Picture Timestamp
- Pick "Media Object Format" as "Media Object Data"
- For "Media Object Type" select the size of the image you would like to retrieve
- Save configuration.
2. To obtain IMAGE URL from RETS:
- Create TEXT type field
- Under "Drealty Field Mapping" fieldset pick "Media Object" for "Field mapping entity" field, if your RETS system supports returning URLs for images.
- For "Media Object Type" select the size of the image you would like to retrieve
- Save configuration (make a field multi-valued).
- You will have URLs imported => then it's up to you how you render them (e.g. create a field .tpl file, etc.)

Let's say you need to get DOCUMENTS (some RETS systems allow you to obtain the actual file object you can save into Drupal OR you can obtain a URL which points to the file inside
RETS system storage):

1. To obtain DOCUMENT OBJECT from RETS (based on GetObject() call):
- Create FILE type field
- Under "Drealty Field Mapping" fieldset pick "GetObject() call" for "Download media object data via", if your RETS system support GetObject() functionality.
- Select a field for "Media Object Modification Timestamp Field", e.g. LIST_161 - Document Timestamp
- Pick "Media Object Format" either as "Media Object Data" or "URL of Media Object" (whichever is supported by your MLS)
- For "Media Object Type" select available object type you would like to retrieve, e.g. "PDF Listing Document"
- Save configuration (make a field multi-valued if you need).
2. To obtain only DOCUMENT URL from RETS:
- Create TEXT type field
- Under "Drealty Field Mapping" fieldset pick "Media Object" for "Field mapping entity" field, if your RETS system supports returning URLs for Documents.
- For "Media Object Type" pick the object type you would like to retrieve, e.g. "PDF Listing Document"
- Save configuration (make a field multi-valued).
- You will have URLs imported

Let's say you need to get VIDEO objects (I've seen some entries returned from RETS systems as URL to the Video file, and others have it as Embed code snippet,
so to make it safe, I suggest getting data into LONG TEXT type field):

1. To obtain VIDEO OBJECT from RETS (based on GetObject() call):
- Under "Drealty Field Mapping" fieldset pick "Media Object" for "Field mapping entity" field.
- For "Media Object Type" pick the object type you would like to retrieve, e.g. "HTML for Video Embedding"
- Save configuration.
- You will have the content imported into the field, and then you can see how the data was entered on RETS side and decide how you can render it.

  • veronicaSeveryn committed a821ee5 on 7.x-3.x
    Issue #2779207 by veronicaSeveryn: Add Documentation on Module's...
bloomt’s picture

Just for a little clarification, do I need to run drush rim and then drush rpm after every drush ri to ensure that I get all the images imported?

  • veronicaSeveryn committed 579569e on 7.x-3.x
    Issue #2779207 by veronicaSeveryn: Add Documentation on Module's...
veronicaseveryn’s picture

@bloomt,

Yes, right now you need to import rets basic field info with "drush rets-impot".

Then, it's not just about getting IMAGES for listings. This new version of the module allows people who have MLS with other Media Objects in it (Video, Documents, etc.) to retrieve that data, too. Therefore, with consideration that there might be significant amount of media for some MLS systems (I assumed, I didn't get to play with different kinds of MLS providers), the media retrieval is separated now from the "drush rets-import" process.

So, you will need to run "drush rets-import-media" and then "drush rets-process-media".