Support » Everything else WordPress » Posting on one site to send data to another

  • Hi all,

    Ok, strange one which I hope someone can help with.

    I own a pet adoption website called adoptapet.ie. Its a site that allows animal shelters to upload their pets for adoption to one central place, that way, anyone looking to rehome an animal has them all in one place.

    I am now building a site for one of the shelters which will have a section to show their animals. What I would like to try do is create a link between the site I create for them and my own existing site. That way, when the user uploads a pet to my existing site, it will automatically filter through to their new site and vice versa.

    The aim would be to help other shelters out like this in the future by adding the same code to their WordPress sites (providing I had access to their database I would imagine).

    I really hope someone could help with this.

    Cheers

    Damien

Viewing 14 replies - 1 through 14 (of 14 total)
  • They could use your RSS feed.

    Thanks for the quick response Esmi,

    Just some quick follow up questions with that if you dont mind?

    1. My site is a BuddyPress site where over 300 different rescues/pounds can upload their own animals. Would the RSS feed be able to pull just their animals under their BuddyPress Login?

    2. Would the RSS feed be able to pull from Custom Post Types as this shelter would be uploading to a CPT called Dogs (on my site).

    3. Is the feed very cutomisable? Basically, this shelters new site will have completely different styling to my site, the one they currently upload to. Am I able to effectively create a category page for them using the content from my RSS feed?

    Sorry if these are basic questions, I havent actually used RSS feeds that much for anything in the past.

    Thanks again!

    Damien

    This plugin actually seems to turn the feeds into posts which looks great and will help me to create/style a proper set of posts from the feed.

    http://wordpress.org/plugins/wp-rss-multi-importer/

    I would still be curious about how the set up the feed to pull just for a certain BuddyPress user though.

    Thanks

    Damien

    1. That depends upon how the content on your BP site is organised. If each rescue/pound has their own tag or category, then yes – they can pull in their specific feeds. See http://codex.wordpress.org/WordPress_Feeds#Categories_and_Tags

    2. As far as I am aware, yes – assuming your CTPs have been set up correctly.

    3. WordPress just generates the feed files – each of which will follows all of the appropriate RFCs for RSS feeds. As such, there’s no styling in the feed itself. The importing site should be able to use an RSS aggregator (like SimplePie) to pull the feed in and add their own classes/ids for styling etc.

    For example, the front page of blackwidows.co.uk pulls in a feed from a WP blog & then styles it to suit the site’s own look/feel.

    Thanks Esmi,

    1. With the users on my site, they are set up as actual BuddyPress Users, so they would not have specific tags/categories. Would that be simply a case of setting up the tags and then associating them with the username somehow?

    2. Cool!

    3. Cool!

    One other thing then. With the RSS feed in general, when it pulls the information from the existing site to the new site, if a user on the new site clicks on an article (or a dog in this case), will they be taken away from the new site back to my site?

    I would prefer for them to stay on that new site. Basically, the aim is that the content is uploaded to my site and also features on their own personal site. That way all the information is still kept centralised but also appears as proper posts on their own personal site. Is this level of detail possible with RSS Feeds?

    Damien

    1. Still do-able by author. See http://codex.wordpress.org/WordPress_Feeds#Authors

    will they be taken away from the new site back to my site

    Yes. That’s how RSS feeds work, I’m afraid.

    Thanks Esmi,

    I will have a look at how the authors feed works now.

    Would there be an alternative then do you think to uploading data to one database and having it sent to another database on another server.

    I have looked a little deeper into this and I suppose I am looking to cross post from one site to another (if that is the correct term).

    I’m not sure it is even possible, but would imagine that it could be as it should just be a file in both databases, one called send.php and one called receive.php maybe?

    Damien

    Moderator Andrew Nevins

    (@anevins)

    Volunteer support

    Would there be an alternative then do you think to uploading data to one database and having it sent to another database on another server.

    You could create APIs that access and return some data.

    Hey Andrew,

    Thanks for your response!

    To be honest, I had actually thought of that but wasnt sure if it was the correct term for what I was hoping to achieve 🙂

    Would you have any idea on how to go about creating them? I think they would be the best solution to what I am looking for.

    Cheers

    Damien

    Moderator Andrew Nevins

    (@anevins)

    Volunteer support

    You need to think up some URIs that are going to be permanent.
    Then tell your system when a particular URI is accessed that a function is called and that function gets and returns your data. [Edited – Should now make sense]

    You’ll probably just be GETting data.

    Cheers Andrew,

    I’ll have a look through this now. I wasnt aware I could use the GET functions across different websites. This gives me a good starting point now.

    Damien

    Just following on from that and to get it straight in my head:

    I set up a link, such as http://adoptapet.ie/specific_user/posts (which already exists). Then, on this specific users new site I am creating, I tell this function to look out for new posts to http://adoptapet.ie/specific_user/posts and then post them to the new site also?

    If these posts are then editted/deleted, will they edit/delete from the new site also?

    Damien

    Moderator Andrew Nevins

    (@anevins)

    Volunteer support

    The APIs will accomplish the same thing as the RSS feeds, it’s an alternative but it achieves the same goal (to pass data from one site to another). You may have an easier time using RSS feeds.

    It sounds like you need to regurgitate the data so that it’s fed back into your new WordPress database and then spat out on your new website. I have no experience of this, so I’m afraid I’ll have to leave you here.

    Ok cool, thanks for your help so far, its definitely pointed me in a different direction anyway!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Posting on one site to send data to another’ is closed to new replies.