DISQUS

Benjamin Golub's Blog: How to Use the RSSmeme API to Pull Notes into Wordpress

  • Paul · 1 year ago
    I'm trying to put something together that pulls in the name & comment. My JSON to PHP skills are weak so I could use some help if you know how...

    Disqus won't allow the code so I threw it on http://www.shorttext.com/mesmfpw

    I don't think the $comments = $obj5->{'entries'}->{'feeds'}->{'notes'}->{'content'}; is correct at grabbing all the notes.
  • Benjamin Golub · 1 year ago
    No that won't work. Remember that entries is a list, feeds is a lit, and
    notes is a list. So you have to iterate over each of them. But you've also
    got the heirarchy wrong. It looks like this:

    {
    'entries':
    [
    {
    'feeds': []
    'notes':
    [
    {
    'feed':
    'content':
    }
    ]
    },
    {
    'feeds': []
    },
    ]
    }

    My PHP is rusty but it'll be something like this:

    foreach($entry in $json['entries]) {
    foreach($note in $entry['notes'])
    $name = $note['feed']['name'];
    $content = $note['content']
    }

    Makes sense?
  • Benjamin Golub · 1 year ago
    Sigh; Disqus messes with the whitespace but you get the idea.
  • Phil Glockner · 1 year ago
    Another cool application of RSSmeme, I like!
    Do you guys know if anyone has made the request to put a code tag in Disqus yet? It shouldn't be that hard. I'll tweet Daniel.
  • Paul · 1 year ago
    Thanks! I just had to change a few things, but you gave me the right direction.

    foreach($json['entries'] as $entry) {
    foreach($entry['notes'] as $note) {
    echo $note['feed']['name'];
    echo " - ".$note['content'];
    }
    }
  • Benjamin Golub · 1 year ago
    Glad you were able to get it working.
  • linkso0flondon · 2 months ago
    Jewelry is to women what rice is to mice. Once seeing wonderful jewelries, women always can't help buying them. links of london It is said that people born under Cancer are tend to be gentle and kind-hearted, preferring to give friends some help, being less likely to be influenced by current fashion. links of london Since once the jewels and dresses are well matched, the personal taste and qualities will be revealed. links of london However, as for many people, it is too hard for them to match jewels properly. links of london Here are some tips for you to choose and match jewelries. Hope to have some assistance. links of london The jewelries that you chose should highlight the decorative effect and increase your personal charm. Therefore, make sure that the jewelries go with your complexion, temperament, hairstyle, etc. links of london The top principle is that the jewels you chose should be neither repeat your face shape nor extremely opposite to your face shape. links of london The best jewel piece for a girl with a heart-shape face is the one that is wider at the bottom because once again that will balance out that chin. And something likes a teardrop links of london, upside down triangle, or even a button look perfect. links of london The long hair matched with narrow and long earrings will display graciousness. links of london These shining links of london jewelries, necklaces for example, are suitable for black dress. links of london A piece of colored jewelry with specials is a complement to a sportswear in casual occasions. links of london In order to cover up the color of skin, the girls with muddy complexion can choose the less gaudy jewels, for instance, silver links of london. links of london The ladies having plump figure could choose some brilliant links of london which will let them look noble and dignified. links of london The working women could decorate their suits with neat and simple links of london which will have the effect of displaying their beauty and elegance. links of london
  • Dual Sim Mobile · 1 month ago
    nice
  • women_beauty · 1 month ago
    I'm so love this blog, already bookmarked it! Thanks.