facebook

MobiBike-News – RSS Reader Example

  1. MobiOne Archive
  2.  > 
  3. Examples, HOW-TOs
Viewing 15 posts - 31 through 45 (of 56 total)
  • Author
    Posts
  • #328414 Reply

    philvos
    Participant

    Hello Nivar,
    Try this: don’t use the link, create new button image then call function below

    function showFullArticle() {
    var url = articles[curArticleIdx].channel.item.link;
    phoneui.showURL(url,’Popupwindow’)
    }

    It should work fine

    #328432 Reply

    nivar
    Member

    thank you based on your response philvos.

    This is what i did.

    1) open the articles-page.mobi
    2) deleted the full article text
    3) inserted a button image (chose random pic)
    4) to the right i use the on click action of run javascript
    5) I clicked browse for the code part and pasted exactly the information you left here then clicked ok.

    function showFullArticle() {
    var url = articles[curArticleIdx].channel.item.link;
    phoneui.showURL(url,’Popupwindow’)
    }

    6) saved the file
    7) opened mobibike-news.mobi in the test center

    I still get nothing happening.

    Can you share some more light on this

    Thank you.

    #328434 Reply

    philvos
    Participant

    @Nivar,
    After step 4, you need to add as follow:

    4a. showFullArticle()
    4b. Open page; mobibike-news.mobi and run a test center
    4c. open mobibike-news_custom.js
    4d. go to function showFullArticle() and replace your step 5.

    #328501 Reply

    nivar
    Member

    thank you it worked, however, it takes me to the full article on the website not the full article on the rss feed.

    Any light that can be shed on this would be appreciated.

    Thank again

    #329048 Reply

    Hi pmadika,

    Is there anything in that we can help you? I don’t clearly understand your request.

    #332567 Reply

    Hi
    First, my project is a free mobile site I am building for the local school. Im not getting paid, so any help is really appreciated and is all in the name of furthering the education of our younger generation! (and the parents!)

    Second, I only know very basic HTML (thats why im here and using Mobi One in the first place …which is fantastic by the way)

    Third, the problem…

    I have altered the custom javascript and replaced the motorbike news code with my own, going to a school rss video feed as follows:

    fu[b]nction loadArticles() {

    //usacycling headlines
    var url = “http://query.yahooapis.com/v1/public/yql?q=select%20channel.title%2Cchannel.link%2Cchannel.item.title%2Cchannel.item.link%2C%20channel.item.pubDate%2C%20channel.item.description%20from%20xml%20where%20url%3D%22http%3A%2F%2Fmichaelfaradayschoo.blip.tv%2Frss%22&format=json&callback=?”;

    var list = $(‘#m1-mobibike-news-list1’);
    $(list).empty();
    [/b]

    This brings up a nice list of the feed titles as I wanted (but without a screenshot of the video which I would have loved to have). When I chick on the title of a feed, it takes me to the ‘Article’ page where the title, date and a link to the full article are listed but under that I get a string of html as follows:

    <iframe src=”http://blip.tv/play/hKteg4nLCAI.html?p=1&#8243; width=”550″ height=”4 …(and thats all i can see on my iPhone)

    All I have done so far is download the example file, changed the Motorbike news custom javascript code to the code generated via the YQL builder site and then preview it via my iPhone. I am still using the Motobike news demo files for now and thats fine -I just want to get it working in that state first before I start trying anything else.

    Link is as follows:

    http://goo.gl/7Tr9U (this dosent work for me in firefox but works on my iPhone)

    A. How tdo I get rid of the html and get the feed displayed?

    B. How do I get a snapshot of the video displayed with each feed in the Mobi-Bike News page under the feed titles?

    Im looking for a result like the Iphone html 5 builder http://www.shoutem.com/ (see image below) that has a dedicatd RSS button option. When you select these feeds, the video will play with out going to an external site and just has a ‘Done’ button to return. Shoutem is OK but way too expensive for a school to afford. MobiOne is very affordable on the other hand.

    Im sure this can be done when you know what your doing and MobiOne can easily match or even better the more expensive alternative WYSIWYG editors!

    Thanks for your time in advance!

    Dan

    #334616 Reply

    m12m345m
    Member

    how do you know the columns in the tables? channel.link. description, etc…
    i wanted to add a thumbnail image, i would i add that?

    #336314 Reply

    Hi skip8it,

    I’ve answered your question in this post: http://www.genuitec.com/support-genuitec/viewtopic.php?p=15516#p15516
    Hope this make sense.

    #338231 Reply

    poisom
    Member

    Hello, i am a new developer via mobione because i want one app to be native in IOS and Android also, thats why i bought mobione!

    Now i have some problems and i would like to help me if you can please!
    The project i am working on is a promo app for a company.
    The setup of the app is 3 tabs (multitab widget + multipages with 3 pages).

    1 tab is the main content for the app (evrything OK here).
    2 tab is the RSS feeds from their site (link from their feeds http://www.mathisinet.gr/?format=feed&type=rss).
    3 tab communication details

    In the app i am working i try to implement the rss Reader from this post.

    Now my problems are:

    problem 1
    When the app starts the loading articles procedure starts also in tab 1, i want only to load the rss in the 2 tab and only the first time someone is using the tab 2. How to fix this? i understant the why and i found also the on change trigger on page 2 but what should be the code to trigger it? any example?

    problem 2
    I have copied evrything from the source files but the list items isn’t populated correctly. So i get only the first listitem that i already copied from the progect here.

    problem 3
    If i click in the first list item (and the only one see problem 2) nothing happens, it doesn’t go into the article page. Why this? how to fix it please?

    problem 4
    i click the hyperlink in the bottom of the page and then i get the article page, but it has only the title1 title2 pubdae etc no data on it. If i click the Next article (top right button) i get the feeds ok but inside them there is a html code also example: <p>bla blablablablablbalbalbalbal</p><span>texttexttextetxtetxtextet</span> etc. how i can filter out the html tags??

    and also the feed link i have provides an image too, how i can implement it in the listitems and in the article page when one item clicked?

    i know is too much but i believe i need a little help to get this app to work!
    thank you

    #338237 Reply

    Brandon
    Member

    @poisom
    My suggestions is to check out this tutorial, it is a much better rss reader that does not rely on a thirid party like the bike reader sample:
    http://www.genuitec.com/support-genuitec/viewtopic.php?f=14&t=5212

    #339992 Reply

    liight
    Member

    @ALincoln wrote:

    Wayne
    I think that method has problems reading a Joomla feed, so I converted it in FeedBurner and it works ok now.

    Hello, please kindly show me how you did this with feedburner? How do you change a basic website into a mobile website? Please help out with any answers you have. I need to build an app and this is the closest I have seen to building a mobile website. Can’t anyone help with a ‘simple’ technique of converting a regular website into a mobile website we can use in building mobile websites on the Mobione software?

    I do not know much about coding, someone help please 🙁

    #340023 Reply

    Brandon
    Member

    Not sure if it would be easier or would even help, but my Mobione Cheatsheet has an RSS Feed that uses the Google API:
    http://www.genuitec.com/support-genuitec/viewtopic.php?f=14&t=5032

    #340804 Reply

    StephenBrown
    Member

    I am new here so take it easy on me…

    I have managed to get this working well. The only issue I am encountering is if I only have one record returned from the RSS feed. It doesn’t seem to load the result into the articles array correctly.

    i.e.

    $.getJSON( url, function( data ){
    articles = data.query.results.rss;

    returns articles as undefined. It is as though when there is only one record it doesn’t load as an array but some other data type.

    I can check the data.query.count for how many records are returned, but not sure how to easily deal with this.

    Does anyone have any thoughts?

    #340806 Reply

    StephenBrown
    Member

    Okay, some progress. I have managed to get it working with just one item. I now need to work out how to go to the details page successfully.

    $.getJSON( url, function( data ){
    events = data.query.results.rss;

    $.each(events, function(i, event){
    if (data.query.count == 1)
    {
    var jsdate = new Date(data.query.results.rss.channel.item.pubDate);
    var dispdate = formatAMPM(addMinutes(jsdate, 30));
    var title = data.query.results.rss.channel.item.title;
    }
    else
    {
    var jsdate = new Date(event.channel.item.pubDate);
    var dispdate = formatAMPM(addMinutes(jsdate, 30));
    var title = event.channel.item.title;
    }

    var id = “m1-RaggiesWebAppEvents-listItem1″ ;

    $(list).append(
    ‘<li id=”‘ + id + ‘” class=”‘ +
    (i == 0 ? ‘m1-first’ : ”) +
    (i == (events.length – 1) ? ‘m1-last’ : ”) +
    ‘ m1-clickable m1-event-listItem” ‘ +
    ‘eventIdx=”‘ + i + ‘”>’ +
    ‘<div id=”m1-RaggiesWebAppEvents-text4″ class=”m1-text rss-article”>’ +
    removeNL(title) +
    ‘</div>’ +
    ‘<div id=”m1-RaggiesWebAppEvents-text2″ class=”m1-text”>’ +
    dispdate + …..etc…….

    #340830 Reply

    StephenBrown
    Member

    Okay, cancel all that. I have found I should add query parameter jsonCompat=new to the YQL URL. I have done this but it has made no difference. This is meant to return a single item as an array and not an object. Exactly my problem but it isn’t working.

    I will persevere.

Viewing 15 posts - 31 through 45 (of 56 total)
Reply To: MobiBike-News – RSS Reader Example

You must be logged in to post in the forum log in