Support » Themes and Templates » Twitter sidebar hyperlink problem?

Viewing 4 replies - 1 through 4 (of 4 total)
  • metserve

    (@metserve)

    Ooops …. this should be in the ‘fusion’ theme section!

    depoll

    (@depoll)

    I managed to fix this by replacing a method in functions.php:

    // theme widget: Twitter
    function fusion_TwitterWidget($args){
     extract($args);
     echo $before_widget;
     print $before_title.__('<a href="http://www.twitter.com/'.get_option('fusion_twitterid').'">Twitter posts</a>','fusion').$after_title; ?>
    
     <?php
     $username = get_option('fusion_twitterid');
     $limit = get_option('fusion_twitterentries');
     if($username<>'') {
      $feed = file_get_contents("http://search.twitter.com/search.atom?q=from:" . $username . "&rpp=" . $limit);
      $feed = html_entity_decode($feed);
      $clean = explode("<content type=\"html\">", $feed);
      $amount = count($clean) - 1;
      print '<ul id="twitterupdates">';
      for ($i = 1; $i <= $amount; $i++) {
       $cleaner = explode("</content>", $clean[$i]);
       print '<li class="entry">';
       echo $cleaner[0];
       print '</li>';
      }
      print '</ul>';
     }
    
     echo $after_widget;
    }

    Note: I also made the title of the widget link to your twitter id’s twitter page :). Hopefully this helps!

    @depoll

    Thank you for this fix…. 🙂

    Kieran

    http://www.kmcgraphics.com

    Hi!
    I’m using the fusion theme, and I like it very much, but I have a problem with twitter widget, infact i receive this error in my homepage.

    TWITTER POSTS

    Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /home/mhd-01/www.gsurbinospeleo.it/htdocs/blog/wp-content/themes/fusion/functions.php on line 646
    
    Warning: file_get_contents(http://search.twitter.com/search.atom?q=from:gsurbino&rpp=2) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /home/mhd-01/www.gsurbinospeleo.it/htdocs/blog/wp-content/themes/fusion/functions.php on line 646

    I’have tried to use another widget and it works well, but I don’t like it.

    Could you help me?
    Thanks
    Bye

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Twitter sidebar hyperlink problem?’ is closed to new replies.