Plugin Directory

Changeset 1828291


Ignore:
Timestamp:
02/24/2018 02:08:32 PM (8 years ago)
Author:
fseonline
Message:

Update readme

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-expert-agent-xml-feed/trunk/readme.txt

    r1828270 r1828291  
    1111
    1212== Description ==
     13
     14### Effortlessly fetch your XML feed daily
     15
    1316WordPress Expert Agent XML Feed lets you fetch the latest XML feed from your 3rd Party [Expert Agent property XML feed](http://learningcentre.expertagent.co.uk/ea-manual/using-ea-data-in-your-website/the-two-methods/method-3-xml-feed).
    1417
    1518From the admin screen you can:
    16  * Add Remote File
    17  * Add Remote User login details
    18  * Fetch the latest XML feed manually via the button ‘Fetch XML File’
    1919
    20 = Usage =
     20* Add a Remote File
     21* Add the Remote User (FTP) login details
     22* Fetch the latest XML feed via the button ‘Fetch XML File’
     23
     24#### Usage
    2125
    22261. Go to the `Settings -> WordPress Expert Agent XML Feed` menu to manage settings for fetching the XML feed.
     272. Input your Remote (FTP) Filename e.g. `properties.xml`, as well as your FTP Username and Password.
     283. Click the button ‘Fetch XML File’ to connect to FTP, and download the latest copy of the XML feed.
     294. A scheduler is already set up for you that will automatically download the XML feed daily at 2am.
    2330
    2431== Frequently Asked Questions ==
     32
    2533= How do I know that the XML feed is working? =
    2634
    27 After you’ve specified your FTP server and login details which Expert Agent will have provided, you will have to click the button ‘Fetch XML File’. Afterwards, a successful notice should appear, and will mention if the file download is successful.
     35After you’ve specified your FTP server and login details which Expert Agent will have provided for you, you will have to click the button ‘Fetch XML File’.
     36
     37Afterwards, a successful notice should appear, and will mention if the file download is successful.
    2838
    2939= Is this the official plugin from Expert Agent? =
     
    3444
    3545These are the FTP details given to you by Expert Agent.
     46
    3647You will need to create a Log Ticket through the Expert Agent Management system, informing them that you would like to ask for the XML feed FTP login details.
     48
    3749You can also email them at [support@expertagent.co.uk](mailto:support@expertagent.co.uk)
    3850
    3951= The XML feed is now working, how do I extract its data? =
    4052
    41 Unfortunately this plugin does not provide extracting the data. It is up to you or your developer to extract the data, e.g. using PHP through [simpleXML](http://php.net/manual/en/simplexml.examples-basic.php).
     53Unfortunately this plugin does not provide extracting the data.
     54
     55It is up to you or your developer to extract the data, e.g. using PHP through [simpleXML](http://php.net/manual/en/simplexml.examples-basic.php).
    4256
    4357= Why did you place the file under the Uploads folder? =
     
    5266
    5367`
    54 branches->branch->properties;
    55     $property = $properties->property;
     68<?php
    5669
    57     // Let\'s get the first \'Propertyofweek\' we can find...
    58     // Then break apart once we find it!
    59     for ($i=0; $i < sizeof($property); $i++) {
    60       if( $property[$i]->propertyofweek == \'Yes\' ) {
    61         $propertyofweek_price_text = $property[$i]->price_text;
    62         $propertyofweek_advert_heading = $property[$i]->advert_heading;
    63         $propertyofweek_main_advert = $property[$i]->main_advert;
    64         $propertyofweek_web_link = $property[$i]->web_link;
    65         $propertyofweek_picture_filename = $property[$i]->pictures->picture->filename;
    66         break;
     70    // First check if properties.xml file exists
     71    $upload_dir = wp_upload_dir();
     72    $propertiesXML = $upload_dir['basedir'] . '/wp-expert-agent-xml-feed/xml/properties.xml';
     73    if( file_exists( $propertiesXML ) ):
    6774
    68       }
     75        // Let's get the XML file for the properties...
     76        $agency = new SimpleXMLElement( file_get_contents( $propertiesXML ) );
    6977
    70     } ?>
     78        $properties = $agency->branches->branch->properties;
     79        $property = $properties->property;
    7180
     81        // Let's get the first 'propertyofweek' we can find...
     82        // Then break apart once we find it!
     83        for ($i=0; $i < sizeof($property); $i++) {
     84            if( $property[$i]->propertyofweek == 'Yes' ) {
     85                $propertyofweek_price_text = $property[$i]->price_text;
     86                $propertyofweek_advert_heading = $property[$i]->advert_heading;
     87                $propertyofweek_main_advert = $property[$i]->main_advert;
     88                $propertyofweek_web_link = $property[$i]->web_link;
     89                $propertyofweek_picture_filename = $property[$i]->pictures->picture->filename;
     90                break;
    7291
     92            }
    7393
    74 ?>
     94        }
     95
     96 ?>
     97 <!-- Property of the week Title -->
     98 <h2><?php echo $propertyofweek_advert_heading; ?></h2>
    7599`
    76100
     
    78102
    79103It’s your web server’s built-in scheduler, so that you can action code depending on the time. WordPress has wp-cron.php which integrates WordPress with your server’s cron system.
     104
     105= Where do I input the FTP Server? =
     106
     107You don’t need to, as we have specified this for you as `ftp.expertagent.co.uk`.
    80108
    81109== Screenshots ==
Note: See TracChangeset for help on using the changeset viewer.