Premise [download] mbNewsTicker

Motorola Premise
C

chucklyons

Guest
index.php
File Name: mbNewsTicker
File Submitter: chucklyons
File Submitted: 20 Oct 2012
File Category: Premise
Author: Chuck Lyons
Contact: PM me
Version: 1.0

I like the 'life' that javascript brings to the UI. Couple that with the usefulness of Premise and 123’s Minibrowser and you get the beginnings of a dynamic non-IE bound Premise interface.
jQuery brings a lot of utilities that can be used with Premise. One jQuery plugin, developed over at http://www.jquerynewsticker.com/ is the NewsTicker. I modified it to work with the Premise MiniBrowser.
The mbNewsTicker Module is designed to work with JohninVA’s RSS Feeds Module which MUST be installed in order to work. Only one change was made to his module – the addition of a ‘NewsTicker’ property that allows the user to determine which RSS Feed they want to include in the News Ticker. This addition installs automatically as part of the NewsTicker xdo.

Installation: 1) BACK-UP!!!! 2) This requires the Javascript library ‘jQuery’, which has a number of useful utilities for web page interaction. Included in the zip is the News Directory, which contains jQuery 1.4.1; the NewsTicker.css and NewsTicker.js. Just unzip the file, put the News directory under C:\Program Files (x86)\Premise\SYS\web.
In the MiniBrowser module, open the Global MiniBrowserFunctions. You will need to place the following lines (commented as - cl) into <HEAD> section.


'add jQuery
sHTML = sHTML & ("<script src=""/News/jquery-1.4.2.min.js"" type=""text/javascript""></script>")

'add Newsticker
sHTML = sHTML & ("<link href=""/News/ticker-style.css"" rel=""stylesheet"" type=""text/css"" />")
sHTML = sHTML & ("<script src=""/News/jquery.ticker.js"" type=""text/javascript""></script>")


Optionally, I have included an updated MiniBrowserFunctions.xdo, which includes the calls to jQuery and the NewsTicker Files. If you care to use that (and haven&rsquo;t made any changes to your own
MiniBrowserFunctions), delete MiniBrowserFunctions from the Globalscripts in the MiniBrowser Module and import the included MiniBrowserFunctions.xdo
(Note: If you already have John&rsquo;s RSS module, you may have to bounce the SYS server to include the NewsTicker option.
Now you should have the new MinibrowserFunctions, either having added the jQuery.js, the News-ticker.js and the NewsTicker.css, or having imported the xdo for the MiniBrowserFunctions. Go to Home and add an RSSFeed (assumes you have set up John&rsquo;s RSS Feeds module). Where ever you added an RSS Feed, select the &lsquo;NewsTicker&rsquo; property (setting it to true).
You can now add the NewsTicker function to where ever you choose. For instance, I put it on my landing SYS page (e.g. sys/home?d??mbRenderPage) by adding to the mbLocationEx Class.(sHTML = gMBRenderHeader() & gMBRenderMacros() & gMBRenderNewsTicker(). The NewsTicker will then display on your home page. If you prefer it on the bottom of the screen, add it to the bottom of the mbLocationEx.
Another 'feature' - the displayed NewsFeed is an HTML link. Selecting the News Headline pops up a new window with the selected story. On some device/browsers, it opens a new tab.

Click here to download this file
 

Similar threads

C
Replies
0
Views
1K
chucklyons
C
C
Replies
2
Views
1K
chucklyons
C
Replies
16
Views
3K
chucklyons
C
C
Replies
0
Views
1K
chucklyons
C
Back
Top