[SOLVED] Is it possible to put frontend widgets in a service like blogger?
  • I tried to use this link
     https://wiki.sourcefabric.org/display/CC/Frontend+Widgets

    but i cant figure out how it works.
    I have ec2 server in amazon where i put airtime-widgets, api, and tmp folders
    The information is all there (i can see the api/week-info/index.php giving the raw information about shows)
    but the widgets dont show anything, but a few lines (just lines no text)

    Does any one know if it is possible to work it out
    or
    if it is completly impossible to have blogspot page with widgets working?

    do i have to have full control of the public site (to put the widgets and css, and whatever isnt working out)?

    thanks in advance
    Post edited by VAsco Pita at 2012-03-16 11:13:34
  • 25 Comments sorted by
  • If you post the link (you can private message if you wish), we can take a quick look at it.
    Airtime Pro Hosting: http://airtime.pro
  • I could also help, but you are not giving much info here.
    Of course you can use the widgets in blogspot!
  • the link to the blogger page
     http://blog.stress.fm/p/test.html

    what information to give you?

    the amazon server is here:
    http://ec2-50-19-137-146.compute-1.amazonaws.com/

    The structure is
    ROOT/ api/ live-info/ index.php
    week-info/ index.php
    airtime-widgets/ js/
    css/
    tmp/

    i can give you all the info you want

    thank you

  • The problem is that you are using widgets from a different version of Airtime. Please use the js files given in the widgets/ directory of the Airtime tarball for the version you have.

    Airtime Pro Hosting: http://airtime.pro
  • i've update airtime to 2.0.2 with aptitude

    i've downloaded the 2.0.2 tarball and took the widgets direectory to the airtime-widget directory in the root of the amazon server

    by trying out all diferent ideas that came trough my mind i might have misplaced the newer widget and the version i'm using is in fact older.
    right now i cannot check it out.

    but later i'll investigate the matter


    many thanks



  • Hi VAsco Pita, I looked at your site and noticed in the function jquery.showinfo.js.checkWidgetVersion airtime will look for a AIRTIME_API_VERSION in the data sent to the widgets and throw the exception if its not there. I rechecked the 2.0.2 locally and see this entry. Which leads me to believe your version of airtime isn't 2.0.2 but your widgets definitely are. Can you Confirm which version of airtime you're using?

    You can do this from the airtime UI's Help/About drop down menu action.

    Thank you, Daniel.
  • In the login prompt of airtime it says 2.0.2.

    like i said, i used aptitude to update airtime.

    maybe different widget version  .deb/tar.gz package.

    But your saying that the widget as to communicate with airtime server?
    The widgets that i've put in amazon server don't know nothing about airtime server location.

    The reason i'm doing this configuration is precisely not to load airtime server with http requests.....


    The airtime server puts a simple text file with program information at amazon server (artime-live-info or airtime-week-info)

    The widget would see this information and show me a beautiful calendar, without talking to airtime server.
    Thats my thinking.



    thanks
  • Okay, I still don't see the api version attribute in the data Airtime is sending back to your widgets. Can you send my your login url?

    thank you for your patients.
  • Sorry patience, I'd like to see your login page to confirm its really 2.0.2. When I step into the checkWidgetVersioin function in the Airtime widget javascript page on your site I don't see the AIRTIME_API_VERSION key, which we're sending as of 2.0.2 so that clients know when there is a version mismatch between itself and the server.

    Please let me know your login URL.

    Thank you, Daniel.
  • I've copied /usr/share/doc/airtime/examples/widgets folder to ec2-server/airtime-widgets
    i've also tried the widgets from the airtime-2.0.2.tar.gz

    the same goes

    i've altered the iframe-airtime.html file to:

    i dont understand java script.

    what should i do?

    the login page is this:

    image


    thanks
  • Hi Vasco,

    What version of Airtime did you have before you upgraded. I'm going to see if I can recreate this issue. In the meantime I'd suggest you do a package reinstall like so

    sudo apt-get install --reinstall airtime

    It might also be useful to post the output of that command on here.
    Airtime Pro Hosting: http://airtime.pro
  • martin,

    i had version 2.0.1 previously

    attached log of airtime reinstall

    a brief summary:
    webserver(not airtime server) gets the content of /api/week-info/?callback=*** at airtime server
    webserver as file structure like:
                                           api/ live-info /index.php
                                                 week-info /index.php
                                           airtime-widgets /css ...
                                                                  /js ...
                                           iframe-airtime.html
    at webserver /api/week-info/index.php gives sort of formated content of /api/week-info/?callback=*** from airtime server)

    now how does the widget use this information?
    because it isn't writing any information in the calendar.

    thank you


                                          

                                





  • ei,

    more information:
    firefox , after some time, asks if i want to stop the script jquery.showinfo.js(not sure) because it has stopped working

    is there a way to debug the script

    thanks


  • Have you played around with the apache vhost settings?

    What files are in /etc/apache2/sites-available/ ?

    If you have /etc/apache2/sites-available/airtime-vhost, what is in that file?

    If it points to /usr/share/airtime/ please post this file:
    /usr/share/airtime/application/controllers/ApiController.php

    It looks like somehow you have two version of Airtime installed on your system.
    Airtime Pro Hosting: http://airtime.pro
  • i had 2 airtime vhosts - airtime and airtime-vhost enabled

    i disabled both and enabled only one each time
     and all is the same
    root@server:~# apache2ctl -S
    VirtualHost configuration:
    wildcard NameVirtualHosts and _default_ servers:
    *:80                   is a NameVirtualHost
             default server server.dyn-services.com (/etc/apache2/sites-enabled/airtime:1)
             port 80 namevhost server.dyn-services.com (/etc/apache2/sites-enabled/airtime:1)
    Syntax OK

    attached both vhost definitions and usr/share/airtime/application/controllers/ApiController.php

    thanks

  • sorry

    usr/share/airtime/application/controllers/ApiController.php
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    you can delete airtime file since it duplicates airtime-vhost file
  • Your ApiController.php file looks up todate, and I've already confirmed that you're using the right version of jquery.showinfo.js so this problem doesn't make sense. Can you attach your Airtime  usr/share/airtime/application/configs/constants.php its where the constant AIRTIME_API_VERSION is defined.

    The only thing that makes sense is the ApiController.php file that you attached is not the one used by your server. I say this because when I looked at the data object in Chrome's debugger I did not see the AIRTIME_API_VERSION key value pair that you're setting in the ApiController that you attached here.
  • I agree with Daniel, apache is still pointing to an older version of ApiController.

    Please try "sudo service apache2 reload"
    Airtime Pro Hosting: http://airtime.pro
  • I've deleted /etc/apache2/sites-available/airtime
    I've reloaded apache2

    i've attached the file

    during the week i'll have airtime installed from zero in virtual machine to check.

    but i don't understand something:
    if i've the schedule information like
    ({"sunday":[{"id":"6","starts":"2012-02-26 22:00:00","ends":"2012-02-26 23:00:00","show_id":"6","record":"0","rebroadcast":"0","instance_id":null,"file_id":null,"time_filled": (................)

    is the format above correct?

    should'nt the widget just display that information in a pretty table?
    am i wrong?

    the web server that i'me using for the widgets doesn't know about airtime
    it uses the php scripts at /api/
    that use the static file sent over from the airtime machine
    to inform the widget of the schedule to show on the page

    could you send me a well formed airtime-week-info.txt so that i try it

    am i completely of track?




  • ok,

    by going http://ec2-50-19-137-146.compute-1.amazonaws.com/api/week-info/index.php
    i should get the raw information for the widget to display a pretty calendar.
    the information that shows is from two weeks ago. - this shouldn't be, right?
    i have scheduled programs for the past week and the next week. so they should be there, right?


    i'me running debian squeeze and i've used airtime first from tar.gz (1.8.2 i think) and have been upgrading until now, i have 2.0.2 that was updated with aptitude/apt-get. not sure when started using apt-get. probably something was left hanging around and is causing this mess...



    so what i want to do is a general cleanup. what should i watch for?
    apt-get purge airtime
    rm what directories? /etc/airtime
    /usr/share/airtime
    database?
    what?


  • It looks like there's something wrong with your /opt/airtime/export-widget-data.sh file.

    Can you try running it manually and see if it updates

    /tmp/airtime-live-info
    and 
    /tmp/airtime-week-info

    If this works, you need to make sure that the cron service is running this file once a minute as it's supposed to.
    Airtime Pro Hosting: http://airtime.pro
  • So it looks like after the apache2 reload fixed your widgets problem has been fixed.
  • yes.

    i think it was deleting the /etc/apache2/sites_enabled/airtime leaving only the airtime-vhost definition.

    and the cron script wasn't being executed (i removed because the widget wasn't working any way)

    so i was left with a outdated /tmp/airtime-week-info that was produced with a defective /etc/apache2/sites_enabled/airtime

    i've made sure that the cron is updating you can check at
    http://ec2-50-19-137-146.compute-1.amazonaws.com/api/week-info/index.php

    but now theres a different problem. the widgets work. i can see the days of week but no scheduled programs.

    but i can see the programs sheduled for today...
    and the running program also shows

    thanks for all the help


  • Thanks very much for all the help.

    I was using an old version of  airtime api

    It is now working.


    Though the code for the week schedule in the airtime wiki seems to be wrong (at least for my version of airtime - 2.0.2)

    i had to add two lines
        var d = new Date().getDay();
    jQuery('#scheduleTabs').tabs({selected: d === 0 ? 6 : d-1, fx: { opacity: 'toggle' }});

    so that it would show the contents for the different days

    cheers