In order for me to get all entries to have entry dates that were all in the same time zone (my servers time zone), this is what 1 of my “grabs” looks like. There are actually 7 of them in this page.
{exp:feedgrab url="http://www.mysite.com/boards/news.xml"
weblog="9"
category="8"
title="title" <----- Invalid value makes FeedGrab insert a default time
date="title"
offset="-21620" <-------- modifies the entry date in seconds so it matches my servers time
use="link|description"
fields="feed_url|feed_desc"
unique="feed_url"}
Also I should mention that I had to play around with the time settings in EE quite a lot. ACross the board I made sure that the time settings were always CDT and always the time zone of my server, even if you are China. Cookies have localized time, but when they are used in a page they are changed to my CDT time (I’m new with cookies, maybe that’s default behaviour). I’m pretty novice in php so I wanted to make sure everything was in the same time so ic oudl play with cookies and date times of entries.
I’m new to using FeedGrab. Though, I did skim through all six pages of forum comments, I couldn’t find anything that address two questions I have:
(1) Is it possible to declare ‘source’ either to grab it from the feed or hand code it into the {exp:feedgrab} data? I’m looking to pull data from multiple sources, and want to make sure that the source is properly attributed on my site.
(2) Can other plugins be used with the FeedGrab plugin? Mostly I’m interested in stripping HTML, and limited words or characters. For example, one source that we are pulling data from allows full HTML, including style sheet overrides. Since we want the display to be very specific size and format, this isn’t great. I know I can clean it up, specifically on display, with the plugin, I’m just wondering if it could be cleaned before going into the system.
Yeah, I’ve notice some strange character codes, when I use the plugin on output, but I haven’t tried on input yet. I assume you would wrap it around the source field like:
{exp:feedgrab url="http://www.mysite.com/news.xml"
weblog="1"
title="title"
date="date"
use="link|{exp:html_strip}description{/exp:html_strip}"
fields="feed_url|feed_desc"
unique="feed_url"}
briggs wrote oh I havnt tried it that way. I use the html_strip when I am outputting the description in a page.
Yeah, that’s what I’m currently doing, I was looking for a solution to cleaning the data before it’s entered into the system. That one’s not super urgent though. The entering of source data is more important to me. So I could say this info is from Craigslist, this from the Madison Times, etc, etc.
I’m not sure how you are setup, but this is what I do.
I have a weblog with 9 categories. Each category is the source website name.
I then i have 9 chunks of feedgrab code, reading 9 feeds.
for each feed, i assign one of the categories to it. That’s how I ensure the source.. every article is going into the weblog with the assigned category.
Perhaps you are doing something different, i havnt re-read your initial post again (sort of at work, dodging eyes)
The character codes/oddness happening might not have anything to do with html strip, but what the settings are on the custom field where the description is going, but that’s just me guessing. YOu could probably use a find and replace plugin that would catch all the character codes being output as well, maybe. Hmm, I should try that!
Yeah, I thought about categories, but originally dismissed them, perhaps I should revisit. I originally dismissed, because I want to use categories for types of postings. For example, I’ve created custom queries for finding all housing related items located on the East, Near East, and Far East side of Madison. These items can be for rent, for sublet, homes for sale, condos for sale, co-ops, etc. So I was planning on those details to be the categories, and the source, just to be a field called “source”. Obviously source data is part of the feed, so I was hoping I could pull it from there. I’m still going to keep playing. If worse comes to worse, categories can be a fall back.
Thanks for your help.
Any chance you would consider a couple of function requests:
Thanks for the great plug-in.
Regards
James Turnbull
Category Bug?
I’m using version 0.7.3 and have a problem to add categories (predefined categories using the “category” parameter).
I think there is the following problem in the plugin:
Wrong version:
$results = $DB->query("SELECT cat_id, parent_id FROM exp_categories
WHERE (cat_id IN ('".implode("','",$cats)."') OR cat_name IN ('".implode("','",$cats)."'))
AND group_id = '".$query->row['cat_group']."'");
Correct version:
$results = $DB->query("SELECT cat_id, parent_id FROM exp_categories
WHERE (cat_id IN ('".implode("','",$cats)."') OR cat_name IN ('".implode("','",$cats)."'))");
In my case, it works now. But I’m not sure if this is the best way to get it running …
Kind regards, MISC
Hey,
I’m wanting to include my flickr feed in my tumblelog but currently it’s including each and every photo and I generally upload photos in groups. Each time I upload photos the take up my entire lifestream.
I’d prefer each group of photos I upload to appear as one item in the lifestream. I generally group everything I upload as sets and therefore it makes sense to include every new set as a new item in my lifestream.
I found a yahoo pipe to do this but it doesn’t include the date so my sets are included dateless. Also, the feed created there hasn’t got an images, I’d like 5 random/latest photos from the set to be shown with the entry in the lifestream. So in one field there’s an unorder list with the 5 images in it (for example.)
Thanks a lot!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.