PHP Wordpress Fix - 5$

Discussion in 'PHP' started by Susie Cheap Link, May 16, 2008.

  1. #1
    I have a problem with Wordpress MU fetching RSS Code which is also used in wordpress here is the function and it works.

    What I want to do is use this RSS feed:

    http://example.com/author/"the author login of the post"/feed/
    Code (markup):
    The author of the post is found in this function

    The reason why I am doing this is because I am using wordpress MU where there is a main blog and blogs for each registered users. Each registered users has the ability to write in the main blog upon registration and also I will be using the RSS feed to parse the links they have posted on the main blog to their individual blogs.

    ________________________________________________


    I triend to use

    <?php the_author_login(); ?> 
    Code (markup):
    the_author_login usage

    and it works
    ___________________________________________
    and used

     <?php
    include_once(ABSPATH . WPINC . '/rss.php');
    $rss = fetch_rss($uri);
    ?> 
    
    <h2><?php _e('Headlines from AP News'); ?></h2>
    <?php // Get RSS Feed(s)
    include_once(ABSPATH . WPINC . '/rss.php');
    $rss = fetch_rss('http://example.com/rss/feed/goes/here');
    $maxitems = 5;
    $items = array_slice($rss->items, 0, $maxitems);
    ?>
    
    <ul>
    <?php if (empty($items)) echo '<li>No items</li>';
    else
    foreach ( $items as $item ) : ?>
    <li><a href='<?php echo $item['link']; ?>' 
    title='<?php echo $item['title']; ?>'>
    <?php echo $item['title']; ?>
    </a></li>
    <?php endforeach; ?>
    </ul>
    Code (markup):
    fetch_rssusage


    It also worked. but when I combine the two just like this one

    $rss = fetch_rss('http://example.com/author/".the_author_login()."/feed/');
    Code (markup):
    it wouldn't work.

    Anyone good at PHP syntax?
     
    Susie Cheap Link, May 16, 2008 IP
  2. MakeThatDollar

    MakeThatDollar Notable Member

    Messages:
    4,451
    Likes Received:
    158
    Best Answers:
    0
    Trophy Points:
    225
    #2
    I can do it for you.
     
    MakeThatDollar, May 16, 2008 IP
  3. allaboutgeo

    allaboutgeo Peon

    Messages:
    85
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Try this
    $rss = fetch_rss('http://example.com/author/'.the_author_login().'/feed/');
    Code (markup):
    Do you really want to have double quotes in the url?
     
    allaboutgeo, May 16, 2008 IP
  4. Susie Cheap Link

    Susie Cheap Link Banned

    Messages:
    104
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Sorry but this job is taken and finished
     
    Susie Cheap Link, May 16, 2008 IP
  5. viral2583

    viral2583 Well-Known Member

    Messages:
    352
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #5
    Hi,

    I can do it for you. I have 4.5 years of good experience in PHP.
     
    viral2583, May 16, 2008 IP
  6. allaboutgeo

    allaboutgeo Peon

    Messages:
    85
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    No problem.
     
    allaboutgeo, May 16, 2008 IP
  7. samyak

    samyak Active Member

    Messages:
    280
    Likes Received:
    7
    Best Answers:
    4
    Trophy Points:
    90
    #7
    I could have fixed it for you :(
     
    samyak, May 19, 2008 IP