I have a very modified & extended widget system working in test.
  • Changed & Added Features:

    • Shows times in client's local time zone (as set on their pc/phone)
    • Highlights current show.
    • Brings 'Genre' to frontend
    • Brings 'Show Description' to frontend
    • Brings 'Color' & 'Background Color' to frontend - used to color the Genre box
    Wanted - testers - so that I can release this properly into the community
    800 x 673 - 102K
    No longer using Airtime or Libretime.
  • 13 Comments sorted by
  • Not for novices (yet). Needs changes to:
    On Airtime Server:
    Airtime time set to UTC - mandatory (needs UTC adding to timezone list) - backend user time zone can be whatever you want.
    /usr/share/airtime/application/controllers/ApiController.php
    /usr/share/airtime/application/models/Show.php
    and on show website:
    /at-widget/js/jquery.showinfo.js
    and the weekly schedule widget page (replacing)
    Post edited by John Chewter at 2013-09-23 00:15:05
    No longer using Airtime or Libretime.
  • Will experienced testers ONLY with NON LIVE test systems please form an orderly queue. Thank you.
    :-B :D
    Post edited by John Chewter at 2013-09-23 00:55:28
    No longer using Airtime or Libretime.
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator
    I'll try it asap. where to get the code from?
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • WARNING - ALPHA TEST ONLY - DO NOT USE ON A PRODUCTION SITE!

    Note: Known issue - "Next Monday" becomes "Monday" at UTC midnight not Local Time midnight - on the fix-it list.

    It should look like this:
    http://www.deprogrammedradio.com/x_widget.html
    Post edited by John Chewter at 2013-09-23 08:00:21
    No longer using Airtime or Libretime.
  • Vote Up0Vote Down AndyAndy
    Posts: 42Member
    hi john, 

    I have a question, i would set automaticly a image for genre, example

    if ($genre === "HipHop")
    echo "src=''/images/HipHop.png"

    if ($genre === "Rock")
    echo "src=''/images/Tock.png"

    etc.....

    Can you show me a code example for your new schedule?

    Thx Andy
  •     switch (daySchedule[j].genre)
    {
        case "Alt-History":
    // Magenta White
            $mybgcolor = "#ffaaff";
            $myfgcolor = "#000000";
            $mybgimage = "alt-history.png";
            break;    
        case "Conspiracy":
        case "Geopolitics":
        case "Conspiracies":
    // Grey Black    
            $mybgcolor = "#d9d9d9";
            $myfgcolor = "#000000";
            $mybgimage = "conspiracy.png";
            break;
        case "Cryptids":
    // Yellow Black    
            $mybgcolor = "#ffff44";
            $myfgcolor = "#000000";
            $mybgimage = "cryptids.png";
            break;
        case "Ecology":
    // Green White
            $mybgcolor = "#44ff44";
            $myfgcolor = "#000000";
            $mybgimage = "ecology.png";
            break;        
        case "Education":
            $mybgcolor = "#9cf0ff";
            $myfgcolor = "#000000";
            $mybgimage = "education.png";
            break;
        case "Esoterica":
        
    // Grey White
            $mybgcolor = "#9898b0";
            $myfgcolor = "#000000";
            $mybgimage = "esoterica.png";
            break;
        case "History":
    // Lt Magenta Black
            $mybgcolor = "#ffbfff";
            $myfgcolor = "#000000";
            $mybgimage = "history.png";
            break;
        case "Music":
    // Lt Red Black    
            $mybgcolor = "#55e271";
            $myfgcolor = "#000000";
            $mybgimage = "music.png";
            break;    
        case "Myths":
    // Orange Black
            $mybgcolor = "#ffba44";
            $myfgcolor = "#000000";
            $mybgimage = "myths.png";
            break;
        case "Mysteries":
    // Lt Orange Black    
            $mybgcolor = "#ffc787";
            $myfgcolor = "#000000";
            $mybgimage = "mysteries.png";
            break;
        
        case "News":
    // Blue White    
            $mybgcolor = "#b4b4ff";
            $myfgcolor = "#000000";
            $mybgimage = "truth.png";
            daySchedule[j].genre = "THE NEWS";
            break;
        case "Science":
    // Lt Blue Black        
            $mybgcolor = "#cfcfff";
            $myfgcolor = "#000000";
            $mybgimage = "science.png";
            break;
        case "Security":
    // Red White        
            $mybgcolor = "#ff7777";
            $myfgcolor = "#000000";
            $mybgimage = "security.png";
            break;
        case "Skepticism":
    // Cyan Black
            $mybgcolor = "#7296a9";
            $myfgcolor = "#000000";
            $mybgimage = "skepticism.png";
            break;    
        case "Spiritual":
    // Lt Cyan Black
            $mybgcolor = "#bfffff";
            $myfgcolor = "#000000";
            $mybgimage = "spiritual.png";
            break;    
        case "UFO-Aliens":
        case "UFO/Aliens":
    // Lt Yellow Black
            $mybgcolor = "#ffffaa";
            $myfgcolor = "#000000";
            $mybgimage = "ufo.png";
            break;    
        case "Health":
    // Lt Yellow Black
            $mybgcolor = "#79ffce";
            $myfgcolor = "#000000";
            $mybgimage = "health.png";
            break;        
           default:
            $mybgcolor = "#eeeeee";
            $myfgcolor = "#000000";
            $mybgimage = "mysteries.png";
            break;    
    }
    No longer using Airtime or Libretime.
  • Here is the code for one row odf the schedule
    $mybgimage = "images/backgrounds/"+$mybgimage;
    if (daySchedule[j].genre == "") {
        daySchedule[j].genre = "Other";
    }
    // daySchedule[j].background_colordaySchedule[j].color
    // <a href="#"> - ' + jLocalSchedEnd+'</a>
    var spliturl = url.split("|");
    html +=    '<td><p style="text-align:center; line-height: 4px;">'+jLocalSchedStart+'</p><p style="text-align:center; font-size:28px;line-height: 4px; font-weight:bold;">&#8681;</p><p style="text-align:center; line-height: 8px;">'+jLocalSchedEnd+'</p></td>';
    html +=    '<td align="center" style="border-left:1px #741d00 dotted;border-right:1px #741d00 dotted; background: url('+$mybgimage+') no-repeat  center 35px; background-color: '+$mybgcolor+'"><span style="font-size: 14px; text-transform: uppercase; color: '+$myfgcolor+'">'+daySchedule[j].genre+'</span></td>';
    if (daySchedule[j].description == '') {
        html +=    '<td><a href="#">'+daySchedule[j].name+'</a></td>';
    } else {
        if (undefined == spliturl[1]){
            html += '<td><a href="#">'+daySchedule[j].name+'</a><br /><span style=\'font-weight:lighter\; font-style:italic \'>'+daySchedule[j].description+'</span><br/><ul style="text-align:right;"><li style="float:left;">'+(url.length > 0 ? '<a href="'+spliturl[0]+'" target="_blank">'+options.miscText.readMore+'</a>':'')+'</li></ul></td>';
            } else {
                html += '<td><div id="widget_logobox"><img src="'+spliturl[1]+'"><div style="float:right;"><ul><li><a href="'+url+'"><span id="jbcReadmore">'+options.miscText.readMore+'</span></a></li></ul></div></div><span id="jbcShowname">'+daySchedule[j].name+'</span><br /><span id="jbcShowdesc">'+daySchedule[j].description+'</span></td>';
            }
    }   

    No longer using Airtime or Libretime.
  • Vote Up0Vote Down AndyAndy
    Posts: 42Member
    Thx John for this code,

    i have copy Timezone.php, Apicontroller.php, Show.php, in Backend i have Errors.

    image


  • Sorry Andy,


    Yes someone else had this problem this week.
    Copy the old files back.
    You can get them from the GIT or i can email them.


    I am NOT going to hand out any more code until after 2.5.2
    Its causing to many problems and it will all need changing again very shortly. I am looking forward to last spring’s release. :/
    Post edited by John Chewter at 2014-06-18 08:47:44
    No longer using Airtime or Libretime.
  • Vote Up0Vote Down AndyAndy
    Posts: 42Member
    Ok John, is not a problem, i have the old files saved before i changed, and it is a testing system in a virtual machine ;) the productive System i never touch it ;)

    it would be nice in the future the scheduler have more options in api for a individual scheduler plan, let me now it ;)

    Thx


  • Hi all,
    this is what I was looking for, in fact I need to bring the Genre and Description to frontend - I don't know if I can help by the tech side, but I'm following the development.

    Keep up the good work

    zootcast.com
  • Vote Up0Vote Down byronbyron
    Posts: 2Member
    John you are fantastic!

    because I have hacked the core, in a newbie way, it is not worth sharing how I did it, but essentially I was in need of the 'show description' being send via API, so I hacked your code too (lol) and by just adding a few of your lines to the server files + .js file
    voilà: http://inr.feltcollective.com/#schedule

    thank you very much

    edit: Airtime 2.5.1
    Post edited by byron at 2014-07-15 18:50:54
  • :)
    No longer using Airtime or Libretime.