NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Help with magpierss

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 08-21-2008, 06:46 AM THREAD STARTER               #1 (permalink)
NamePros Member
Join Date: Jul 2007
Location: CVVCC.com
Posts: 26
Captain Clay is an unknown quantity at this point
 



[resolved] Help with magpierss


Hey all,

Can someone please offer a suggestion. I'm using magpierss but I don't want to display the "email this" and bookmark links at the end of each item description. (I know this is rather specific - I can't seem to find a solution for this ANYWHERE!) Any help much appreciated...

This is what I've got:
PHP Code:
  ...
????: NamePros.com http://www.namepros.com/programming/506069-help-with-magpierss.html

  <!-- start magpie rss feed -->
  <?php include('rss_fetch.inc');

    
$rss fetch_rss($url);

    if (
$rss)
????: NamePros.com http://www.namepros.com/showthread.php?t=506069
    {

      
// Split the array to show first 5
      
$items array_slice($rss->items05);

      
// Cycle through each item and echo
      
foreach ($items as $item 
      {
      echo 
'<div class="newsheader">';
      echo 
'<a href="'.$item['link'].'">'.$item['title'].'</a>';
      echo 
'</div>';
      echo 
$item['description'];
      }
      
//description includes email and bookmark links...

      
...
Thanks in advance...

Clay
Last edited by Captain Clay; 08-22-2008 at 05:45 AM.
Captain Clay is offline  
Old 08-21-2008, 07:36 AM   #2 (permalink)
NamePros Regular
 
baxter's Avatar
Join Date: Apr 2006
Posts: 363
baxter is just really nicebaxter is just really nicebaxter is just really nicebaxter is just really nice
 


Ethan Allen Fund Save The Children
you'll want to use preg_replace to remove the email and bookmark links from the description if you have an example output I can give you the regex
__________________
Canadian Domain Registrar Ready.ca
baxter is offline  
Old 08-21-2008, 03:24 PM THREAD STARTER               #3 (permalink)
NamePros Member
Join Date: Jul 2007
Location: CVVCC.com
Posts: 26
Captain Clay is an unknown quantity at this point
 



Thanks for the reply Baxter.

Yeah, therein lies the problem. The description seems to only include the text before the email/bookmark. I'm a bit green to php so stumbling my way through - how should I get an example (other than the straight text above these elements) that I could then strip with preg_replace?

Clay.
Captain Clay is offline  
Old 08-22-2008, 05:44 AM THREAD STARTER               #4 (permalink)
NamePros Member
Join Date: Jul 2007
Location: CVVCC.com
Posts: 26
Captain Clay is an unknown quantity at this point
 



Don't fret - I've worked it out. Ta.
Captain Clay is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 06:40 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger