Forum Replies Created

Viewing 15 replies - 46 through 60 (of 121 total)
  • Plugin Author C. Johnson

    (@radgeek)

    Hi Wayne!

    We’ve already discussed this at length in e-mail, but for the benefit of other people reading the forum — I wanted to quickly note that (1) this aspect of XPath syntax was not implemented in older versions of FeedWordPress; so in ye olden times 1 month ago there was no way to do this without some gnarly custom programming; BUT

    (2) Wayne very generously sponsored the development of this feature in the most recent release of FeedWordPress, Version 2016.0420; so now you are able to do this by downloading and installing the upgrade to the latest release.

    In order to get only the first result in your Custom Field, you would now use:

    $(media:content[1]/@url)

    In order to get only the second result in your Custom Field, you would now use:

    $(media:content[2]/@url)

    (Indexes now start at 1 rather than at 0, per the XPath specification.)

    HTH!

    Plugin Author C. Johnson

    (@radgeek)

    Okay, thanks. Sorry I’ve been slow in getting back to you.

    So, I did some quick testing and double-checking on custom post types and the feeds that they generate, and it looks to me like your source site’s feed **OUGHT** to be including categories in the feed **IF** your custom post type uses the built-in WordPress Categories or Tags taxonomies (i.e., the same set of Categories or Tags that is used for posts); but by default it will **NOT** include categories from any other, custom taxonomy. So, are the categories you’re trying to sync here from a Custom Taxonomy (for example, are they called like “Portfolio Categories” or something similar like that)? If so, then the bad news is that WordPress won’t put this information into the feed according to its off-the-shelf behavior. But the good news is that since you control both ends of the transaction, it’s relatively easy to do some custom programming with a small PHP script to make it put the needed information onto the feed.

    If that’s **NOT** the situation, then something deeper is going wrong that will require some more in-depth trouble-shooting.

    So, just to check in real quick — is the situation that you’re using a Custom Taxonomy which you’re trying to sync from the source site to the destination site? Or no? Or are you not sure?

    Thanks,
    -C

    Plugin Author C. Johnson

    (@radgeek)

    Okay, let me see what I can do to help.

    Re: 2. It is possible to update feeds individually, but I would suggest that you avoid doing this unless you have a really strong reason to do so. FeedWordPress already has a fairly complex scheduling system set up which allows you to stagger updates out over time, so if you use the standard settings in your cron jobs, it will not be attempting to poll all of your feed subscriptions at once every time the cron job runs. Rather, it will be attempting to poll a limited subset of them. You can also use FeedWordPress settings under Syndication > Feeds & Updates to limit the total time spent on an update procedure (which I recommend doing if you have a large number of subscriptions; 60 seconds is usually a good sanity-check maximum). The best way to avoid overloading your server is probably a combination of these two.

    Re: 1. Sure, I can probably help out with this, but just to make sure I understand what you’re trying to do — you have a platform that allows you to set up cron jobs; but to set up a cron job to do what you want, you need to write a script, which you’d like to write in PHP? So you need help on how to send the right request to FeedWordPress from within a PHP script? Is that correct?

    Plugin Author C. Johnson

    (@radgeek)

    Hi there,

    Right now the best way to use media:description for the post content would be to write a custom PHP filter using the syndicated_item_content filter hook. So the good news is, you can do it; the bad news is that the technique for doing it depends on you being relatively comfortable with writing small amounts of custom PHP code.

    The hook is documented here: https://feedwordpress.radgeek.com/wiki/syndicated_item_content/

    You should be able to access the contents of the media:description tag by using the $post->query() method, probably something like the following: $content = "<p>".implode("</p><p>", $post->query('/media:group/media:description')."</p>"; You would then return $content as the return value of your filter function.

    Let me know either in this thread or via e-mail if you need any help on how to put together the filter function.

    Plugin Author C. Johnson

    (@radgeek)

    Hi there,

    FeedWordPress is still alive and supported. I haven’t been able to check in on this forum in a while due to academic obligations, but the semester is over now and I’m trying to get caught back up on posts here.

    I also get a server error when I attempt to add the file to my subscription list on my test server. My initial guess is that yes, quite possibly the problem is that the large size and unusual contents of the file are causing PHP to hit a memory cap, but I’ll need to run some more tests to be sure.

    If you’ve found out anything about the problem you were having since your last post here, feel free to let me know.

    I should have some confirmation after I’ve had the chance to try this out in my office some time within the next couple days.

    Plugin Author C. Johnson

    (@radgeek)

    Hi Rob,

    Thanks for getting in touch. You’re correct about the cause of the problem — the feed that you sent me doesn’t contain any category elements. A couple quick questions, just so I can better understand the situation and what you might be able to do to resolve it —

    1. Is this a feed that’s being generated from a custom post type? (Like, from Portfolio Items or something similar, which are stored in the source site’s wp_posts table but which are not listed as ordinary posts?)

    2. Do you have control over both ends of this transaction? I.e., I notice that the source site here is a WordPress site as well; do you have direct access to the admin interface and settings for the source site that you’re trying to pull the posts from?

    Thanks,
    -C

    Plugin Author C. Johnson

    (@radgeek)

    Sure, no problem. I’m going to mark this thread resolved for now, but don’t hesitate to hit me up if you have any questions.

    Plugin Author C. Johnson

    (@radgeek)

    Hi there,

    There’s a couple of different ways to do this, depending on how complex or sophisticated you need the filtering to be.

    For most filtering purposes, you can probably do the filtering you’re looking to do using this experimental add-on, called FWP+: Keyword Filters. https://github.com/radgeek/fwp-keyword-filters Take a look, try installing it, see if it does what you need.

    If you need to do something which, for whatever reason, the Keyword Filters plugin doesn’t quite allow you to do, you can also write your own custom filters using PHP code. This technique is discussed, and some introductory tutorial information is provided, here: https://feedwordpress.radgeek.com/wiki/how-do-i-write-add-ons-for-feedwordpress/

    Or, if you need help with any of this, please feel free to contact me via email about consulting or troubleshooting on getting custom behavior up and running.

    Hope this helps.

    -C

    Plugin Author C. Johnson

    (@radgeek)

    Hi Subish,

    There is currently no way to do this within FeedWordPress. I have been thinking about working on a project that would allow this to be incorporated into a future release, but it would take some pretty significant rewriting of the internals of the plugin, which are currently focused pretty exclusively on parsing and processing RSS or Atom-based XML formats.

    If you are still interested in getting a feature like this added, I would suggest contacting me by email via https://feedwordpress.radgeek.com/contact/ and send me a message with some details about the API source you’d like to syndicate data from and I could give you an idea of whether it would be possible, and if so what would be involved, to this capacity in a future release.

    Cheers,
    -C

    Plugin Author C. Johnson

    (@radgeek)

    Hi gioh,

    The best way to do this depends on what data is provided by your source feed. If you are seeing only short summaries imported by FeedWordPress, then it is likely that the feed only provides the short summaries and not full content. (Some choose to do this as a matter of policy.)

    Unfortunately, if that’s the situation, FeedWordPress doesn’t have any good general way of extracting the full text of posts if the feed producer only provides a summary. Depending on your situation, it may be possible to write an Add-On module that uses the link URLs to scrape full content from the HTML (so for example I’ve written custom add-ons for clients who were using a Reuters content syndication API where the only way to get the text of stories was by making a back-end request and scraping the output). But how well this will or will not work depends a lot on the details of your situation, and the policies of the original content provider.

    Have you taken a look at this link here: https://feedwordpress.radgeek.com/wiki/how-do-i-get-feedwordpress-to-include-the-full-content-of-posts-instead-of-just-a-short-summary-or-excerpt-of-the-text/ ? If not, take a look and let me know whether it accurately describes your situation. If you’re not sure, feel free to send me the URL of the feed you’re trying to syndicate, and I could take a look and let you know what I find.

    Plugin Author C. Johnson

    (@radgeek)

    Hey there,

    Alright, cool, so if you’re looking to download images contained in a post and rewrite paths, you might take a look at this add-on module:

    https://github.com/radgeek/FWP—SIC–Em

    Depending on the details of how you want to implement this, the add-on module itself may or may not do exactly what you need it to do. But even if it doesn’t do exactly what you need it to do, the techniques used in it may be useful as a reference for your own implementation.

    Hope this helps!

    -C

    Plugin Author C. Johnson

    (@radgeek)

    Hi there,

    Briefly, yes.

    FeedWordPress uses the standard WP API function wp_insert_post when it first creates a new post based on an item from the syndication feed. wp_insert_post triggers both the save_post and the wp_insert_post actions.

    If you need to programmatically alter the post body, the best way to do that depends a bit on your circumstances. Probably the best thing to do would be to use a syndicated_item_content filter (see https://feedwordpress.radgeek.com/wiki/syndicated_item_content ), unless you need to do something fairly complex in terms of how the old content is stored? But if you tell me a bit more about the details of what you are trying to do, I may be able to give more detailed advice.

    Cheers,
    C

    Plugin Author C. Johnson

    (@radgeek)

    Hi @est90,

    Sorry to hear you are running I to this problem. I am out of town for the holidays but should have some time to I vestigate the issue soon. Would you be willing to send me the URL for the WordPress RSS feed where you’re getting the error message, so I could take a quick look at the details of what’s going on?

    -C

    Plugin Author C. Johnson

    (@radgeek)

    Hi Pascal,

    Thanks for checking in. I’m sorry it took me a while to see this question and get back to you.

    I can confirm that clearing the cached feeds should have NO effect on already published posts. It affects only entries in the wp_options table that are used to cache the contents of feeds that FWP has previously retrieved. It does *NOT* affect the posts table where imported posts are stored.

    Plugin Author C. Johnson

    (@radgeek)

    Hi Rachel: tl;dr: yes, it is okay to delete the plugin. No, it won’t delete posts that were syndicated. If you have successfully deactivated the plugin already then deleting it won’t cause any damage.

    Longer explanation: I’m sorry to hear that you had trouble getting FeedWordPress to work as desired. If FWP has syndicated posts, the posts it has syndicated are stored in the wp_posts database table just like local posts, and they will not be deleted or otherwise damaged if the plugin is deactivated or deleted. They will continue to appear just as they do while the plugin is deactivated. Deleting the plugin files will not cause any additional changes.

    A quick note for others who may be reading this thread. I can be relatively confident that Rachel’s deleting theplugin won’t cause any problems, because she has already deactivated FWP and is apparently running her site successfully with FWP turned off. However, if you need to deactivate or delete FWP, while in general this shouldn’t cause any problems with the content you’ve already syndicated, you do need proceed with caution if you altered your themes to use FWP’s template functions or if you use common add-ons like FWP+: Add Attribution. Since both the add-on modules and the template functions depend on FWP being installed or active, trying to deactivate FWP while your theme files use FWP-specific functions, or while using an FWP-dependent add-on module like FWP+: Add Attribution can cause fatal PHP errors which will prevent WordPress from working correctly on your site. To avoid these problems, make sure that *before* you deactivate FeedWordPress, deactivate any add-on modules that depend on it (usually these are identified with the prefix FWP+ in the Plugins listing), and change your there’s template files so as to remove any FWP-specific theme function calls (like syndicated_link(), is_syndicated(), etc.)

    HTH.

Viewing 15 replies - 46 through 60 (of 121 total)