We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 436 ☆ A M B ☆
    • 265 Posts
    I’m a really big fan of Dan Cederholm’s latest project, Dribbble. A website for designers to show what they’re working on.

    and today I came across this WordPress Plugin which pulls your Dribbble shots into your site; I’ve taken a look at the code, and its pretty much just one main PHP file.

    Would anyone have the expertise to convert this into a MODx Snippet or recreate its functionality for MODx?

    Any help from a programmer would be awesome smiley

    If anyone’s a member of the site you can follow me here: http://dribbble.com/players/AdamWintle
      MODX Ambassador for Thailand. Managing Director at Monogon, a web design and development studio based in Bangkok, Thailand. - Follow me on Twitter.
      • 4310
      • 2,310 Posts
      Here’s a very quick and dirty snippet that will output the title, date & image for each of the latest items :
      <?php
      $limit = (isset($limit)) ? $limit : 4; //$limit is how many you want
      $playerName = (isset($playerName)) ? $playerName : "AdamWintle";
      $feed_url = (isset($feed_url)) ? $feed_url : 'http://dribbble.com/players/'.$playerName.'/shots.rss';
      $xml = simplexml_load_file($feed_url);
      $i=0;
      $o .='<div class="dribbble">'."\r\n";
      foreach($xml->channel->item as $key => $value)
      {
      if ($i < $limit)
      {
      preg_match("/img\ (.*(img>))/", $value->description, $image_url);
      $o .= '<h2>'.$value->title.'</h2>'."\r\n";
      $o .= '<h4>'.$value->pubDate.'</h4>'."\r\n";
      $o .= '<img '.$image_url[1].''."\r\n";
      }
      $i++;
      }
      $o .= '</div>'."\r\n";
      return $o;
      ?>


        • 436 ☆ A M B ☆
        • 265 Posts
        Thank you! I should be able to build onto that. That’s exactly what I needed smiley
          MODX Ambassador for Thailand. Managing Director at Monogon, a web design and development studio based in Bangkok, Thailand. - Follow me on Twitter.