Changeset 1828291
- Timestamp:
- 02/24/2018 02:08:32 PM (8 years ago)
- File:
-
- 1 edited
-
wp-expert-agent-xml-feed/trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-expert-agent-xml-feed/trunk/readme.txt
r1828270 r1828291 11 11 12 12 == Description == 13 14 ### Effortlessly fetch your XML feed daily 15 13 16 WordPress 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). 14 17 15 18 From the admin screen you can: 16 * Add Remote File17 * Add Remote User login details18 * Fetch the latest XML feed manually via the button ‘Fetch XML File’19 19 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 21 25 22 26 1. Go to the `Settings -> WordPress Expert Agent XML Feed` menu to manage settings for fetching the XML feed. 27 2. Input your Remote (FTP) Filename e.g. `properties.xml`, as well as your FTP Username and Password. 28 3. Click the button ‘Fetch XML File’ to connect to FTP, and download the latest copy of the XML feed. 29 4. A scheduler is already set up for you that will automatically download the XML feed daily at 2am. 23 30 24 31 == Frequently Asked Questions == 32 25 33 = How do I know that the XML feed is working? = 26 34 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. 35 After 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 37 Afterwards, a successful notice should appear, and will mention if the file download is successful. 28 38 29 39 = Is this the official plugin from Expert Agent? = … … 34 44 35 45 These are the FTP details given to you by Expert Agent. 46 36 47 You 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 37 49 You can also email them at [support@expertagent.co.uk](mailto:support@expertagent.co.uk) 38 50 39 51 = The XML feed is now working, how do I extract its data? = 40 52 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). 53 Unfortunately this plugin does not provide extracting the data. 54 55 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). 42 56 43 57 = Why did you place the file under the Uploads folder? = … … 52 66 53 67 ` 54 branches->branch->properties; 55 $property = $properties->property; 68 <?php 56 69 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 ) ): 67 74 68 } 75 // Let's get the XML file for the properties... 76 $agency = new SimpleXMLElement( file_get_contents( $propertiesXML ) ); 69 77 70 } ?> 78 $properties = $agency->branches->branch->properties; 79 $property = $properties->property; 71 80 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; 72 91 92 } 73 93 74 ?> 94 } 95 96 ?> 97 <!-- Property of the week Title --> 98 <h2><?php echo $propertyofweek_advert_heading; ?></h2> 75 99 ` 76 100 … … 78 102 79 103 It’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 107 You don’t need to, as we have specified this for you as `ftp.expertagent.co.uk`. 80 108 81 109 == Screenshots ==
Note: See TracChangeset
for help on using the changeset viewer.