×

Discussion Board

Results 1 to 2 of 2

Thread: Please Help!

  1. #1
    Registered User
    Join Date
    Jul 2011
    Posts
    2

    Please Help!

    I am a front-end web designer. I tried to create a web app with Rss from a site but don't get images only the news titles. I want the image associated with a news title to appear beside the title instead of the Rss logo.
    Thanks.

  2. #2
    Nokia Developer Moderator
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Please Help!

    Hi,

    If you have created the Web app using RSS Feed project wizard in SDK, you can modify jQuery.jfeed.js file to find images.
    By default script checks link or media elements in feed against common image content types and uses first one it finds.
    (Check code around rows 168 and 251).

    In your case, images might be in HTML tags in feed content, not in separate elements in feed.
    You can try following code to search for IMG tags in HTML formatted post content.

    Code:
    var images = jQuery(this).find('img');
    			
    if(images.length > 0){
    	item.image = {
    			width: '75',
    	                height: '50',
    			url : images.eq(0).attr('src')
    	};			
    }
    Br,
    Ilkka

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •