Support Forums

Old 01-11-2008, 02:13 AM   #1
PHP Mechanic
 
 
Join Date: Nov 2007
Posts: 118
Rep Power: 9
cheesegrits has a spectacular aura about
Default Oodle XML feed

Attached should be a ZIP with a single file (oodle_external.php).

Documentation is in the file, as follows:

Code:
/* DESCRIPTION
 * ===========
 *
 * Author: Hugh Messenger <[email protected]>
 * 
 * A rewrite of the 68c external.php, custom built to provide an Oodle
 * compliant XML feed, as per:
 * 
 * http://www.oodle.com/info/upload/feed.html
 *
 * Takes two optional CGI args:
 *
 * limit=X - specifies the maximum number of items in the feed.  Default is
 * NO LIMIT.
 *
 * categoryid=X,Y,Z - a comma separated list of categoryid's to pull from.
 * If you specify a categryid (or list of ids) it will automatically include
 * all sub-categories, to any depth.  Default is '0', or in other words,
 * ALL CATEGORIES in the system.
 *
 * CATEGORY NAMES
 * ==============
 *
 * In order for Oodle to inject your items into the right categories, the
 * Category Names you use have to match Oodles master list:
 *
 * http://www.oodle.com/info/upload/category.html
 *
 * As it is not always possible to do this, especially if you already have
 * an established naming system you don't want to change, this script has a
 * configurable option where you can substitute Category Names.  See OPTIONS
 * section for details.
 *
 * CUSTOM FIELD NAMES
 * ==================
 * 
 * To help with better searching on Oodle, this script will include any custom
 * fields from the ads, both global and category specific.  This means you need
 * to name your custom fields as per Oodle feed specs.  For instance, you would
 * need things like:
 *
 * City
 * State
 * ZIP
 *
 * ... to match some of the "Location" fields common to all Oodle categories.
 * Then in "Pets" you might have:
 *
 * Pet Breed
 * Sex
 * Size
 *
 * ... which match some of the optional extra fields for Oodle's Pets specs:
 *
 * http://www.oodle.com/info/upload/pets_feed_doc.html
 *
 * The script will convert spaces to _'s, and convert the field name to lower
 * case, so a "Pet Breed" of "Cocker Spaniel" will show in the feed as:
 *
 * <pet_breed>Cocker Spaniel</pet_breed>
 *
 * If you really need to use different field names that mean the same as the
 * Oodle specified ones, there is a configurable way of substituting names,
 * see OPTIONS section for details.
 *
 * CONFIGURABLE OPTIONS
 * 
 * There are a few configurable settings, as follows:
 *
 *     Your content encoding format, defaults to utf-8.
 *
 *     Category names you may wish to substitute when feeding to Oodle (like
 *     changing "Shelter Dogs" to "Dogs") so they match Oodles spec.
 *
 *     Custom fieldnames you want to substitute.  Useful when you do not want
 *     to use their exact field naming conventions (for instance you may want
 *     to use "Pet Gender" instead of "Sex").
 *     
 *     Custom fields you do NOT want to include in the feed.
 *
 * See the individual comments on each option for more details.
 * 
 */
If anyone uses this and has problems, just report them in this thread, I'll get it fixed.

Share And Enjoy,

-- hugh
Attached Files
File Type: zip oodle_external.zip (3.8 KB, 55 views)

Last edited by cheesegrits; 01-11-2008 at 01:02 PM.
cheesegrits is offline   Reply With Quote
Old 01-11-2008, 07:41 PM   #2
PHP Mechanic
 
 
Join Date: Nov 2007
Posts: 118
Rep Power: 9
cheesegrits has a spectacular aura about
Default

Just FYI, Oodle have now confirmed that the feeds I'm sending them are good, and conform to their standards.

-- hugh
cheesegrits is offline   Reply With Quote
Old 03-19-2008, 12:22 PM   #3
Junior Member
 
Join Date: Apr 2007
Posts: 7
Rep Power: 0
MikeT is on a distinguished road
Default

Have you by any chance looked at a similar mod for version 4? The external.php has changed a little.

Thanks

Mike
MikeT is offline   Reply With Quote
Old 06-18-2008, 05:40 AM   #4
Senior Member
 
Join Date: Jun 2007
Posts: 110
Rep Power: 10
crystal is on a distinguished road
Default

Does this work for v4? I would like to add my site to oodle!
__________________
Crystal
v4.0.8 Dev
crystal is offline   Reply With Quote
Old 06-23-2008, 04:02 PM   #5
PHP Mechanic
 
 
Join Date: Nov 2007
Posts: 118
Rep Power: 9
cheesegrits has a spectacular aura about
Default

Sorry about the delayed response, I haven't visited the site for a while, and had forgotten to set email notifications on my threads.

I haven't been able to upgrade to v4, because we need v3 Memberships for our banner space sales.

I have a test install of v4 somewhere though, I'll install it and fix it up for v4.

I see you got a response from Suskaw on another thread, so hopefully that got you going.

-- hugh
cheesegrits is offline   Reply With Quote
Old 06-24-2008, 01:50 PM   #6
Senior Member
 
Join Date: Jun 2007
Posts: 110
Rep Power: 10
crystal is on a distinguished road
Default

Quote:
Originally Posted by cheesegrits View Post
Sorry about the delayed response, I haven't visited the site for a while, and had forgotten to set email notifications on my threads.

I haven't been able to upgrade to v4, because we need v3 Memberships for our banner space sales.

I have a test install of v4 somewhere though, I'll install it and fix it up for v4.

I see you got a response from Suskaw on another thread, so hopefully that got you going.

-- hugh
Hugh,
I followed Suzkaw's advice and the Oodle xml works perfectly for v4. Thank you!

Oodle external feeds
__________________
Crystal
v4.0.8 Dev
crystal is offline   Reply With Quote
Old 06-25-2008, 12:49 AM   #7
PHP Mechanic
 
 
Join Date: Nov 2007
Posts: 118
Rep Power: 9
cheesegrits has a spectacular aura about
Default

Excellent. I'll modify the original ZIP and re-post it with that fix in the 4.0 mods forum.

Best bet would probably to wrap a conditional around it which checks the 68c version, and uses the appropriate table name. Then the same ZIP would work on either version.

-- hugh
cheesegrits is offline   Reply With Quote
Old 07-20-2008, 07:02 AM   #8
Senior Member
 
free2take's Avatar
 
Join Date: Mar 2006
Location: Ireland
Posts: 228
Rep Power: 18
free2take is a jewel in the rough
Default

Great mod !!

Almost got it working but a couple of issues

I seem to keep getting the following issue:

Quote:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

An invalid character was found in text content. Error processing resource 'http://www.ebuyni.com/oodle_external.php'. Line...

The fee for an individual session is

Any ideas what this is ?

Additionally the country and city tags don't seem to be being brought in, do I need to includ ethem in the
Quote:
// output the basic information common to all entries
section ??

Many thanks,
Mully
__________________
v4.08
free2take is offline   Reply With Quote
Old 07-20-2008, 02:55 PM   #9
Senior Member
 
free2take's Avatar
 
Join Date: Mar 2006
Location: Ireland
Posts: 228
Rep Power: 18
free2take is a jewel in the rough
Default

For the first issue i.e.
Quote:
An invalid character was found in text content...
I found that changing the encoding worked i.e.
Quote:
/*$oodle_content_encoding = "utf-8";*/
$oodle_content_encoding = "iso-8859-1";
Still have the issue though with City and country being brought into the feed, I can see they are returned by the query and populated.

Also the transform function for custom fields doesn't seem to be working i.e. in the Category - 'Cars & Vehicles' I transform my custom field 'fuel' to 'engine_type' (as per oodle standard) i.e.
Quote:
global $init_oodle_field_subs;
$oodle_field_subs = array(
'fuel' => 'engine_type',
'email' => 'seller_email'
);
however when I see the XML I get the following
Quote:
- <listing>
<category>Cars & Vehicles</category>
<id>1178</id>
<title>SPECIAL EDITION SMART PASSION</title>
<description>LOW MILEAGE FULLY KITTED SPECIAL EDITION SMART ALL BLACK. HEATED LEATHER SEATS, SOUND PACKAGE STAINLESS STEELE EXHAUST, DUMP VALVE, IMPORTED GERMAN KITE PRIVACY GLASS AMAZING CONDITION FULL MERCEDES SERVICE HISTORY FROM ISSAC AGNEWS BELFAST. WON SMARTEST SMART IN IRELAND. PERFECT ADVERTISING CAR 31,000 miles</description>
<price>5250</price>
<currency>USD</currency>
<url>http://www.ebuyni.com/viewlisting.php?view=1178</url>
<image_url>http://www.ebuyni.com/thumbs/small_picture_084_small.jpg</image_url>
<model>PASSION</model>
<year>2003</year>
<mileage>31000</mileage>
<fuel>Petrol</fuel>
<email>[email protected]</email>

<condition>Used</condition>
<make>SMART</make>
</listing>
Any ideas how to fix these issues?

Cheers,
Mully
__________________
v4.08
free2take is offline   Reply With Quote
Old 07-24-2008, 04:56 PM   #10
Senior Member
 
free2take's Avatar
 
Join Date: Mar 2006
Location: Ireland
Posts: 228
Rep Power: 18
free2take is a jewel in the rough
Default

Ok found the answers

To include country \ city info you have to echo it out i.e.

Quote:
echo "<title>" . $listing['title'] . "</title>\r\n";
echo "<description>" . $listing['description'] . "</description>\r\n";
echo "<country>" . $listing['country'] <\country>\r\n";
**note take u.country as country in your select statement i.e.
Quote:
u.country as country
For the custom fields not being renamed you need to ammend the following lines
Quote:
// make any custom fieldname substitutions
//if (in_array($fieldname,$oodle_field_subs))
if ($oodle_field_subs[$fieldname])
{
$fieldname = $oodle_field_subs[$fieldname];
}
**Note I remmed out the original line.

Hope this helps !
Mully
__________________
v4.08
free2take is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
RSS feed for google base and oodle? Chad v3.1 Suggestions and Feedback 26 01-11-2008 01:04 PM
RSS Feed not working abkeller v3.1 Modules & Modifications 10 08-04-2007 03:13 PM
Oodle and Edgeio? flyingpylon Site Marketing 3 03-10-2007 11:18 AM
Special Character in Listings stops feed! garysr v3.1 Questions & Support 6 01-09-2007 10:29 PM
Oodle Feed XML CB v3.1 Questions & Support 8 09-25-2006 05:50 AM


All times are GMT -4. The time now is 05:19 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0