Mioplanet Documentation Center
Resources and Help
HomeProductsMioScriptJavaScriptTechNotesPHP
   Home | JavaScript | channels.js SEARCH    

channels.js

  Functions
channels_feeds_get
channels_feeds_getByCategory
channels_feeds_getIndex
channels_get_allCategories
channels_get_categories
channels_get_value
channels_init
channels_latestNews_clear
channels_latestNews_countUnread
channels_latestNews_getNextUnread
channels_latestNews_getReadMark
channels_latestNews_hasUnread
channels_latestNews_setAllReadMarks
channels_latestNews_setReadMark
channels_loadFromMemory
channels_readMarks_countUnread
channels_readMarks_nextUnread
channels_readMarks_setAllAsRead
channels_set_value
start_download_channels

  Events
all_channels_refreshed
latest_news_onchange

  Variables
default_channels[]
default_channels_count
enabled_channels[]
enabled_channels_count
feeds_data[][]
latest_news[]
latest_news_count
MAX_HISTORY_ITEMS
MAX_HISTORY_LENGTH
MAX_LATEST_NEWS_ITEMS
MAX_LATEST_NEWS_LENGTH
MAX_LATEST_NEWS_PER_CHANNEL

  Libraries
alertEngineEx.js
channels.js
gui.k
mioEngine.js
optionsMenu.js
popupAlert.kLIB
popupAlertEx.js
scrollingTicker.js
stats.js
window_resizable.k
xmlFeed.js
xmlSettings.js

  TechNotes
Adding a Login feature
Get the real size of a web page
How to create a Business Card
How to create a Desktop Alert
How to create a Desktop Ticker
How to create a Scrolling Alert Software
How to create a Scrolling Ticker
How to create a simple RSS Reader
How to debug
LCD Monitor Chart: Screen Resolution, Size, Pitch, Display Area
Managing read marks
Measuring Elements in JavaScript
Media center remote control
Statistics: How to track users and actions
XML Configuration File Format

Library
channels.js

Language: JavaScript
Product: MioFactory


The purpose of this library is to:
Download RSS feeds;
Store an history locally of all the feeds;
Build a list of latest news from all the feeds.

This library can be used to create a Desktop News Ticker, an RSS newsreader, etc.

History files are stored in a subfolder /_history_ in the application folder. If the application is not installed on the computer, the history files are saved in a temporary folder, and are lost when the application is closed and restarted.

General Use


Set the variable latest_news_onchange with the name of a function to be called when new items are retrieved and the viewer area should be refreshed.

Set the variable all_channels_refreshed with the name of a function to be called when all the feeds are downloaded.

Call the function channels_init to load the settings from the XML configuration file and / or to set the list of RSS feeds.

Call the function start_download_channels to start downloading the channels.

In your callback functions, you should browse the array default_channels[] to build HTML code to display the latest news.

You can also display the list of channels to have the user select or unselect some of them.
You will find a code sample here: channels_get_value.

Tracking IDs


This library supports tracking IDs. When tracking is enabled and when a tracking ID is provided for a channel in the XML configuration file, the library will send the tracking ID to the server one time per month. The group ID used when sending the tracking IDs is the software ID.

For more information: stats.js and XML Configuration File Format.


Library channels.js

Functions

channels_feeds_get  |  channels_feeds_getByCategory  |  channels_feeds_getIndex  |  channels_get_allCategories  |  channels_get_categories  |  channels_get_value  |  channels_init  |  channels_latestNews_clear  |  channels_latestNews_countUnread  |  channels_latestNews_getNextUnread  |  channels_latestNews_getReadMark  |  channels_latestNews_hasUnread  |  channels_latestNews_setAllReadMarks  |  channels_latestNews_setReadMark  |  channels_loadFromMemory  |  channels_readMarks_countUnread  |  channels_readMarks_nextUnread  |  channels_readMarks_setAllAsRead  |  channels_set_value  |  start_download_channels

Events

all_channels_refreshed  |  latest_news_onchange

Variables

default_channels[]  |  default_channels_count  |  enabled_channels[]  |  enabled_channels_count  |  feeds_data[][]  |  latest_news[]  |  latest_news_count  |  MAX_HISTORY_ITEMS  |  MAX_HISTORY_LENGTH  |  MAX_LATEST_NEWS_ITEMS  |  MAX_LATEST_NEWS_LENGTH  |  MAX_LATEST_NEWS_PER_CHANNEL