Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
  1. #1
    Junior Member
    Join Date
    Apr 2010
    Posts
    5
    Member #
    21612
    I'm currently in the middle of a redesign of my website to make it less graphics intensive and more socially interactive. I'm trying to create twitter and blog feeds for each of the members of the band that combine into one feed, like the ones on Paramore's home page (http://www.paramore.net). I haven't had much luck trying to wade through their source html to see how they did it, I'm hoping someone would have seen or done something similar to that before?

    Thank you for your time!

    Brett
    http://www.alizarinmusic.com

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,720
    Member #
    5580
    Liked
    718 times
    Do you have a MySQL database?

    The other site you mentioned is a whole CMS based site.
    They build everything from a database, including content, feeds, etc.

    What is the backend of your site?
    How are the blog and content created?


  4. #3
    Junior Member
    Join Date
    Apr 2010
    Posts
    5
    Member #
    21612
    Right now I was just planning on using the rss feeds from twitter and a blog like wordpress. I have drupal installed but haven't figured it out at all so if I have to use a content management system instead of just a rss reader I think it is going to be beyond my abilities. I don't have a lot of free time to learn a whole new system unfortunately.

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,720
    Member #
    5580
    Liked
    718 times
    So the music site is not Drupal, it's just a stand-alone site you made? Is that correct?

    And you want to "create" rss feeds of your own, as opposed to displaying feeds from other sites? Is that correct?

    You can manually create an RSS feed by creating an XML file. But the whole point is
    to have the RSS feeds update automatically using a database (your content).

    If you want to display RSS feeds from other sites, you can use a simple PHP script to do that.
    If that's what you want, give us a link to one of those RSS feeds that you want to use.


  6. #5
    Junior Member
    Join Date
    Apr 2010
    Posts
    5
    Member #
    21612
    Sorry for the confusion, I want to use the RSS feeds generated by our twitter accounts and blogs. Yes, the site I am building is a stand alone. I have previously installed readers that will display one feed at a time, but the goal is to have, for example, all 5 twitter feeds from each band member update in the same box, and like the Paramore example, show the name of the person posting it then it adds a "follow me" link under the tweet. Two of our feeds below (not really in use yet until the website starts working so not much data in them)

    http://twitter.com/statuses/user_timeline/114530270.rss
    http://twitter.com/statuses/user_timeline/117117286.rss

    I want to do the same thing with the 5 different blogs, once again combining them all into a single feed reader that displays maybe the 5 most recent entries, regardless of who wrote them.

    Thanks for your help!

  7. #6
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times

  8. #7
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,720
    Member #
    5580
    Liked
    718 times
    Before I spend too much time on this, try the script below and see if
    that PHP CURL routine works on your server. It's just a simple thing to
    print the first 10 entries. If that works, I can show you the rest of it ...
    to work how you want it to.

    Upload this as "test.php" and let me know if it works on your webhost ...
    PHP Code:
    <?php
    # INITIALIZE CURL.
    $curl curl_init();

    # CURL SETTINGS.
    curl_setopt($curlCURLOPT_URL"http://twitter.com/statuses/user_timeline/114530270.rss");
    curl_setopt($curlCURLOPT_RETURNTRANSFER1);
    curl_setopt($curlCURLOPT_CONNECTTIMEOUT0);

    # GRAB THE XML FILE.
    $xmlTwitter curl_exec($curl);

    curl_close($curl);

    # SET UP XML OBJECT.
    $xmlObjTwitter simplexml_load_string$xmlTwitter );

    $tempCounter 0;

    foreach ( 
    $xmlObjTwitter->channel->item as $item )
    {                    
        
    # DISPLAY ONLY 10 ITEMS.
        
    if ( $tempCounter 11 )
        {
            echo 
    "<li><a href=\"{$item -> guid}\">{$item -> title}</a></li>
    "
    ;
        }

        
    $tempCounter += 1;
    }
    ?>


  9. #8
    Junior Member
    Join Date
    Apr 2010
    Posts
    5
    Member #
    21612
    Ok, it appears to work as far as I can tell. It listed the headings to the most recent 10 entries as links to the full blog entry, which is what it was supposed to do right?

    http://www.alizarinmusic.com/NewSiteApril/test.php

    BTW, I really appreciate the help!!

    Also, if you want to see where the stuff is going to go, I've uploaded the new site (still in template mode pretty much) into a testing folder at http://www.alizarinmusic.com/NewSiteApril

    The Blog feed will go where the lame looking blog feeder in the left column is, and the twitter feed into the spot where the current twitter feed is.

  10. #9
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,720
    Member #
    5580
    Liked
    718 times
    Below is what I came up with.

    Add as many Twitter user id's as you want (to the array line).

    So this is what I currently have.
    In the echo part, use your own CSS DIV references to style it your own way.
    I'm picking 5 from each twitter, but you can change that count also.

    PHP Code:
    <?php

    // Twitter RSS Reader - Alizarin The Band

    // Array of Twitter User Accounts ... add them as needed.
    $feeds = array("114530270","117117286");

    $rss=array();
    $rss_count=0;

    // Loop through User Accounts
    foreach($feeds as $feed){
    // INITIALIZE CURL.
    $curl curl_init();

    // CURL SETTINGS.
    curl_setopt($curlCURLOPT_URL"http://twitter.com/statuses/user_timeline/".$feed.".rss");
    curl_setopt($curlCURLOPT_RETURNTRANSFER1);
    curl_setopt($curlCURLOPT_CONNECTTIMEOUT0);

    // GRAB THE XML FILE.
    $xmlTwitter curl_exec($curl);

    curl_close($curl);

    // SET UP XML OBJECT.
    $xmlObjTwitter simplexml_load_string$xmlTwitter );

    // How many from each to display from each Twitter.
    $count=5;

    // Build the array for final sorting by time posted.
    foreach ( $xmlObjTwitter->channel->item as $item ){
       if(
    $count>0){
       
    $time=time();
       
    // how many hours ago
       
    $tdiff=intval(($time strtotime($item -> pubDate))/3600);
          
    // parse the date and title
          
    $date_items=explode(" ",$item -> pubDate);
          
    $title_items=explode(":",$item -> title);
          
    $desc=$item -> description;
          
    $line1="<a href='{$item -> guid}' target='_blank'>".$title_items[0]."</a><br />";
          
    $rss[$rss_count]="
          
    $tdiff|
          <div>
          
    $line1
          
    $desc <br /><a href='{$item -> guid}' target='_blank'>Follow {$title_items[0]}</a><br />
          
    $tdiff hours ago.<br /><br />
          </div>
          "
    ;
          
    $rss_count++;
          
    $count--;
       }
    }
    }

    // Sort the array by least amount of hours it was posted.
    sort($rss);

    // Display the final sorted array ...
    foreach ($rss as $twitter){
    $entry=explode("|",$twitter);
    echo 
    $entry[1];
    }

    ?>

    EDIT:
    This is what it looks like using the script above in my working example:
    http://www.nonsense2.net/band.php



    .


  11. #10
    Junior Member
    Join Date
    Apr 2010
    Posts
    5
    Member #
    21612
    Sorry for taking so long to reply... THANK YOU!!! That is exactly what I am looking for!!!

    Brett


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:47 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com