You Are Here:

Community: Wiki

This page was last modified on 3 August 2009, at 10:54.

PicViewer widgets

From Forum Nokia Wiki

This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. The article is believed to be still valid for the original topic scope.
Image:FNWID.gif

Contents

Template widget model: PicViewer

The picviewer script, the picviewer service, and the widget skin are used to create picviewing widgets from RSS containing image links. This section explains how the picviewer script works and how you can create custom skins.

A generic picviewer script uses a server-side service to synchronize feed items every time a client goes online. An online server notifies the client when a new item becomes available, and the script downloads the new item automatically. The script saves synchronized and loaded content on the phone so it can be accessed offline.

The picviewer script works in a very similar way to the syndication script, and both utilize the same backend services.

Supported image feeds

The picviewer script supports various formats of image feeds. When configuring your picviewer service, use the following pictureserviceparam types depending on your feed format:

  • normal - Pictures presented as enclosures or as inline HTML <img> tags.
  • enclosure - RSS 2.0 feed with images inside enclosures


  • flickr - Used with Flickr.com image feeds (Yahoo MediaRSS RSS 2.0 extension).
  • slide - Used with Slide.com image feeds.
  • smugmug - Used with Smugmug.com image feeds.

Widget views

A picviewer widget consist of 4 views:

  • Minimized view "viewIndex"
    Normally displaying the icon of the feed viewed by the widget.
  • Minimized view "viewNew"
    Viewed when there are new images on the feed. The widsets framework will automatically place a green plus sign on the bottom right corner of the minimized view when the widget has new images.
  • Grid view "viewList"
    Displays a list of the newest images. In this view you can mark all images as read (seen).

Image:Picviewer_maximized_list.png

  • Large image view "viewItem"
    Displays an individual image in full screen. If the original image is larger than the screen size, it is reduced to the screen size.

Image:Picviewer_maximized_item.png

Scripted elements

  • feedItemList
    Creates a 3x3 thumbnail grid.
  • feedItem
    Creates a large image view with description text and author text, if available.
  • feedTitle
    Creates a Label component containing the parameter title or widgetname as content. Used in minimized views. Deprecated, use <label>${widgetname}</label> to display feed names.
  • feedNewCount
    Creates a Label component displaying the number of unseen (or old) images that this feed currently has. Used in minimized views.
  • feedNewCountNumber
    Same feedNewCount, but this one displays only the number.

Static styles

The following styles are used by the picviewer widget:

  • feedItem
    Item subject (seen) in the grid view.
  • feedItemNew
    Item subject (unseen) in the grid view.
  • pictureTitle
    Picture title text in the large image view.

Services and parameters

To create a picviewer widget, set up the following services in widget.xml:

<service type="picviewer" id="feed">
  <reference from="feedurlparam" to="feedurl"/>
  <reference from="pictureserviceparam" to="pictureservice"/>
</service>

You also need to set up the following parameters in widget.xml:

<parameters>
  <parameter type="string"
             name="widgetname"
             description="Name of widget"
             editable="false">
    My Picture Widget
  </parameter>
  <parameter type="string"
             name="feedurlparam"
             description="This feed URL"
             editable="true">
    http://api.flickr.com/services/feeds/photos_public.gne?tags=sunsets&format=rss_200
  </parameter>
  <parameter type="string"
             name="show.images"
             description="Show images"
             editable="true"/>
  <parameter type="string"
             name="pictureserviceparam"
             description="picture service provider"
             editable="false">
    flickr
  </parameter>
</parameters>
  • pictureserviceparam – Value of this should be the type of your feed as described in Supported RSS.

See also

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZdescriptionQSxEa0E20WikiE20javaE20symbianE5fosE20s60E20maemoE20cE2bE2bE20WikiE20HomeE20WikiE20HelpE20OverviewE20GlossaryE20CreateE20PageE20ProposeE20anE20ArticleE20SpotlightE20TopicE20E2dE20WE52TE20WidgetsE20ProgrammingE20E4canguageE20E2dE20SymbianE20CE2bE2bE20E2dE20OpenE20CE2fCE2bE2bE20E2dE20JavaE20E2dE20FlashE20E4citeE20E2dE20PythonE20WebE20TechnologiesE20E2dE20WE52TE20WidgetsE20E2dE20WidSetsE20ToolsE20andE20SE44KE20CodeE20E45E78amplesE20KnowledgeE20BaseE20TechnologyE20AreasE20SoftwareE20PlatformsE20E44evelopmentE20ProcessE20E3fE3fWikiE20ChineseE20E3fE3fE3fWikiE20JapaneseE20PortugueseE2fBrazilianE20E52ussianE20WhatE20linksE20hereE20UploadE20fileE20SpecialE20pagesE20PrintableE20versionE44ownloadE20asE20PE44FE20GoE20ToE20E2eE2eE2eX qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fFilterE5feE78pressionsE5freferenceX qdcZpublisherQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fidE2fc764fd1cE2d8b06E2d499aE2d9a6aE2d17c3903d5a65E2fforumE5fnokiaE5fcrawlerE5fagentX qdcZtitleQSxFilterE20eE78pressionsE20referenceE20E2dE20ForumE20NokiaE20WikiX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qrssZdescriptionQSxEa0E20WikiE20javaE20symbianE5fosE20s60E20maemoE20cE2bE2bE20WikiE20HomeE20WikiE20HelpE20OverviewE20GlossaryE20CreateE20PageE20ProposeE20anE20ArticleE20SpotlightE20TopicE20E2dE20WE52TE20WidgetsE20ProgrammingE20E4canguageE20E2dE20SymbianE20CE2bE2bE20E2dE20OpenE20CE2fCE2bE2bE20E2dE20JavaE20E2dE20FlashE20E4citeE20E2dE20PythonE20WebE20TechnologiesE20E2dE20WE52TE20WidgetsE20E2dE20WidSetsE20ToolsE20andE20SE44KE20CodeE20E45E78amplesE20KnowledgeE20BaseE20TechnologyE20AreasE20SoftwareE20PlatformsE20E44evelopmentE20ProcessE20E3fE3fWikiE20ChineseE20E3fE3fE3fWikiE20JapaneseE20PortugueseE2fBrazilianE20E52ussianE20WhatE20linksE20hereE20UploadE20fileE20SpecialE20pagesE20PrintableE20versionE44ownloadE20asE20PE44FE20GoE20ToE20E2eE2eE2eX qfnZdistributionQUxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2fX qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qfnZupdatedQDx2008E2d10E2d02X qmarsZdescriptionQSxEa0E20WikiE20javaE20symbianE5fosE20s60E20maemoE20cE2bE2bE20WikiE20HomeE20WikiE20HelpE20OverviewE20GlossaryE20CreateE20PageE20ProposeE20anE20ArticleE20SpotlightE20TopicE20E2dE20WE52TE20WidgetsE20ProgrammingE20E4canguageE20E2dE20SymbianE20CE2bE2bE20E2dE20OpenE20CE2fCE2bE2bE20E2dE20JavaE20E2dE20FlashE20E4citeE20E2dE20PythonE20WebE20TechnologiesE20E2dE20WE52TE20WidgetsE20E2dE20WidSetsE20ToolsE20andE20SE44KE20CodeE20E45E78amplesE20KnowledgeE20BaseE20TechnologyE20AreasE20SoftwareE20PlatformsE20E44evelopmentE20ProcessE20E3fE3fWikiE20ChineseE20E3fE3fE3fWikiE20JapaneseE20PortugueseE2fBrazilianE20E52ussianE20WhatE20linksE20hereE20UploadE20fileE20SpecialE20pagesE20PrintableE20versionE44ownloadE20asE20PE44FE20GoE20ToE20E2eE2eE2eX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ