Ever Want to Build Your Own Test Container and Pimp The UI ? another in 101 series
  • DEVELOP YOUR OWN TEST BED or BRANCH OFFICE INTERFACE
    Yu can use this tutorial to
    • Create a production Interface separate rom a development interface
    • Set separate Interface for each of your user or branch and with CSS You can customize each interface

    In this tutorial I will show you how to make your own little testbeds so that you can customize the UI layout and othe task to pimp your own Airtime before putting it in production

    Let me be frank here,The Airtime has done a lot to upgrade the UI but since the new approach is for "business -orientation" .
    I donot know when these changes will coming to Open Source  
    Decide on which directory your want to place your files in.for simplicity ,my files will be located at airtime_test

    copy the original files to this folder

    sudo cp -R /usr/share/airtime /usr/share/airtime_test


    Chose an available port to run your test-bed on,I will choose port 444


    copy the original virtual host

    sudo cp -R /etc/apache2/sites-available/airtime-vhost.conf /etc/apache2/sites-available/airtime_test-vhost.conf

     sudo pico /etc/apache2/sites-available/airtime_test-vhost.conf


    change also your DocumentRoot and the Directory to match your environment



    Now lets create the listen ports
    sudo cp /etc/apache2/ports.conf /etc/apache2/ports.conf.bak
    sudo gedit /etc/apache2/ports.conf

    modify the ssl_module and the mod_gnutls and added the listen port to 444


    Enable the new test configuration and reload the Apache web server:

    sudo a2ensite airtime_test-vhost.conf
    sudo /etc/init.d/apache2 reload

    I found this also a nice security tool in that you can create any https port and have it point to the public
    or if you have separate branches ,you can have them used different interface and ports to access airtime.
    There are many other advantages of this approach but its beyon the scope of the tutorial

    Let me say thanks to Volker Theile for a true spirit io develop NAS and the new product OPEN MEDIA VAULT

    Post edited by Voisses Tech at 2016-02-08 21:39:31
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • 15 Comments sorted by
  • Changing The Order of the Airtime Library Items

    I find it Annoying ,whenever you open the interface the first four (4) library items makes little sense

    the order is

    select(checkbox),preview(icon),schedule(icon),playlist(title)

    We will modify this to be

    title,artist,album.lenght(all textbox)

    we will do the coding in the next post 

    Here is the before  and after look
    1024 x 768 - 97K
    1024 x 768 - 100K
    Post edited by Voisses Tech at 2016-01-06 10:57:31
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • so lets modified the library datatable
     
    The Library datatable is found at

    /public _folder_path/js/airtime/library/library.js

    the public folder path(test) is /usr/share/airtime_test (you need to have created this like in the previous) post

    in our case

    /usr/share/airtime_test/public/js/airtime/library/library.js

     cp /usr/share/airtime_test/public/js/airtime/library/library.js /usr/share/airtime_test/public/js/airtime/library/library.js.bak

    gedit /usr/share/airtime_test/public/js/airtime/library/library.js

    put the following  in the order put this starting at the second available
    make sure the first item which is invisible (bvisible is false
                 
                  /* Title */  { "sTitle" : $.i18n._("Title")         , "mDataProp" : "track_title"  , "sClass"      : "library_title"       , "sWidth"      : "170px"                 }          ,
                  
                  /* Creator */  { "sTitle" : $.i18n._("Creator")       , "mDataProp" : "artist_name"  , "sClass"      : "library_creator"     , "sWidth"      : "160px"                 }          ,

       /* Album */  { "sTitle" : $.i18n._("Album")         , "mDataProp" : "album_title"  , "sClass"      : "library_album"       , "sWidth"      : "150px"                 }          ,


    if your satisfied close and test (read intro for this)
    https://localhost:444/

    then go to the library and you should see this lovely change
    1024 x 768 - 173K
    1024 x 768 - 141K
    Post edited by Voisses Tech at 2016-01-06 13:07:26
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.


  • NEW TRICK
    if we are satisfied lets back up this file

    I like to date my back up files so that in case,i can go back and locate any errror,here is a nice bash type backup

    append your back up extension like this

    .(what I did).$(date "+%b_%d_%Y_%H.%M.%S")

    This give you a nice audit trail so that for future you can just go back an fix whatever you want

    like this

    cp /usr/share/airtime_test/public/js/airtime/library/library.js /usr/share/airtime_test/public/js/airtime/library/library.js.ordermod.$(date "+%b_%d_%Y_%H.%M.%S")

    notice my first bak up was like this

    /usr/share/airtime_test/public/js/airtime/library/library.js /usr/share/airtime_test/public/js/airtime/library/library.js.bak

    the .bak is my first backup and incase i need to restore I just copy this file to the js

    Go ahead verify your back up in the folder and if you like the changes then copy it to the production envirement

    This is an important lesson so practice it as much as possible
    We will using it in a subsequent lesson
    explain what each terms are for
    we will be adding additional column to the MVC framework and the database

    Now  here is a nice  customization for the css, https://forum.sourcefabric.org/discussion/17321/dark-theme-for-my-bad-sight

    Go ahead and do this on your own I will not

    In My next posts it will be as follows

        Adding two additional field (column) in the library table namely start date and end date
        modifying the preference view for tunein and lastfm settings and how to parse these
        Addition Drop-down box to select  the card index
        I will show you how to use the Airtime library to create playlist to be used for autodj
        How to Have the autodj included in the Airtime Api and show on the dashboard
        Create Autodj in 5 minutes (separate module plugins ) using all information from th airtime interface and  have the history update from this
        Anything I deem necessary to run a good radio station

    stay tune

     


    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator
    interesting, good work. go ahead!
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • I will
    just busy until june 15
    Post edited by Voisses Tech at 2016-04-28 13:04:21
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Someone ask me via pm how best to use this and how I do.
    Let me outline here.

    Lets say I want to create a form that does not  currently exist in Airtime

    I start by downloading the zendframework from the software center which gives me the ability to use the command line tools

    then

    • go to sourceforge and download the source package
    • unzip the package for the file
    • copy the zfproject.xml to your project file

    my test folder
    • sudo cp /myhome_directory/Desktop/.zfproject.xml  /usr/share/airtime_test/

    now use the tool to create your various controller ,forms,modules and views

    lets create our own controller

    • go to your project folder
    • cd /usr/share/airtime_test/

    create your own page

    at the prompt you will see
    • zf create controller mytest

    the output is something like this
    Note: The canonical controller name that is used with other providers is "Mytest"; not "mytest" as supplied
    Creating a controller at /usr/share/airtime_test/application/controllers/MytestController.php
    Creating an index action method in controller Mytest
    Creating a view script for the index action method at /usr/share/airtime_test/application/views/scripts/mytest/index.phtml
    Creating a controller test file at /usr/share/airtime_test/tests/application/controllers/MytestControllerTest.php
    Updating project profile '/usr/share/airtime_test/.zfproject.xml'

    notice the files created including the views

    your test location  (with the Header layout) is now at
    https://localhost/mytest


     
    you could also create your own action in an existing controller like the indecontroller

    reference
    http://framework.zend.com/manual/1.12/en/zend.tool.usage.cli.html

    As Long as you have basic knowledge of php array and MVC ,you could take any hack a make your own framework without troubling the airtime core code

    As far as putting Examples,I will revamp my website and start blogging more there with examples on my github for the summer



    Post edited by Voisses Tech at 2016-04-28 13:03:24
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Ha Finally I got a break again
    Today I will
    • finally show you how to make those additional streams  3 more  in fact
    • Also I find it curious why I have to give someone Admin rights to see the Listener Stats,why not make it possible that the Program manager is ble to see the stats.,you could even give that ability to your dj or Guess

    I have include my test files in the  tar -gz file.

    I urge you not to just copy and paste these as I might have codes in there that does not fit  or suit your setup

    • do the necessary edits
    • compare my changes with yous that is all the reason I include them ,just for comparison
    • I have taken the liberty of included the way to back up the files before amendment.This do not guarantee,you will not break your system.Please test on non-production systems.I have outlined how to build yourself a test container if you only have one system.
    • I give no warranty and although I do these within 5 -30 minutes sometimes watching "Everybody Loves Raymond",these mods do require more than basic skills
    • I wish you the best but I am hiding in my comfort spot,do not disturb me .Or  more formally just try and try I cannot solve your mistakes
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • This is the way to add 3 more streams to your
    Require you to insert and update the database using a GUI or the php script I included




    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Step 1  - Modify Views See below for line number to edits  
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    cp /usr/share/airtime/public/js/airtime/preferences/streamsetting.js /usr/share/airtime/public/js/airtime/preferences/streamsetting.js.$(date "+%b_%d_%Y_%H.%M.%S") && gedit /usr/share/airtime/public/js/airtime/preferences/streamsetting.js


    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Step 2  - Modify Controllers See below for line number to edits  
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    cp /usr/share/airtime/application/controllers/PreferenceController.php /usr/share/airtime/application/controllers/PreferenceController.php.$(date "+%b_%d_%Y_%H.%M.%S") &&
    gedit /usr/share/airtime/application/controllers/PreferenceController.php


    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Step 3  - Modify Restful API Controllers See below for line number to edits  
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    cp /usr/share/airtime/application/controllers/ApiController.php /usr/share/airtime/application/controllers/ApiController.php.$(date "+%b_%d_%Y_%H.%M.%S") &&
    gedit /usr/share/airtime/application/controllers/ApiController.php


    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Step 4  - Modify Database scheme See below for line number to edits  
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    cp /usr/share/airtime/build/sql/defaultdata.sql /usr/share/airtime/build/sql/defaultdata.sql.$(date "+%b_%d_%Y_%H.%M.%S") &&
    gedit /usr/share/airtime/build/sql/defaultdata.sql

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Step 5  - Modify Ls_scripts See below for line number to edits  
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    sudo cp /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.$(date "+%b_%d_%Y_%H.%M.%S") &&
    gedit /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Step 6  - update the tables See below for line number to edits  
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    update the tables
    At the terminal run

    curl -k https://localhost/update-stream-setting-table/format/json/api_key/YOUR_OWN_DARN_KEYS

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Step 7  - update the tables See below for line number to edits  
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    update the database
    At the terminal run

    airtime-update-db-settings

    ###################################################################################
    *******************************************************************************
    These are the edits below
    Step 1
    *******************************************************************************
    gedit /usr/share/airtime/public/js/airtime/preferences/streamsetting.js
    *******************************************************************************
    #444
    function setPseudoAdminPassword(s1, s2, s3) {
        if (s1) {
            $('#s1_data-admin_pass').val('xxxxxx');
        }
        if (s2) {
            $('#s2_data-admin_pass').val('xxxxxx');
        }
        if (s3) {
            $('#s3_data-admin_pass').val('xxxxxx');
        }
        if (s4) {
            $('#s4_data-admin_pass').val('xxxxxx');
        }
        if (s5) {
            $('#s5_data-admin_pass').val('xxxxxx');
        }
        if (s6) {
            $('#s6_data-admin_pass').val('xxxxxx');
        }
    }



    #456
    function getAdminPasswordStatus() {
        $.ajax({ url: baseUrl+'Preference/get-admin-password-status/format/json', dataType:"json", success:function(data){
            setPseudoAdminPassword(data.s1, data.s2, data.s3, data.s4, data.s5, data.s6);
          }});   
    }

    #477
    setPseudoAdminPassword(json.s1_set_admin_pass, json.s2_set_admin_pass, json.s3_set_admin_pass, json.s4_set_admin_pass, json.s5_set_admin_pass, json.s6_set_admin_pass);
                });

    Step 2
    *******************************************************************************
     gedit /usr/share/airtime/application/controllers/PreferenceController.php
    *******************************************************************************
    #219
    if ($request->isPost()) {
                $params = $request->getPost();
                /* Parse through post data and put in format
                 * $form->isValid() is expecting it in
                 */
                $postData = explode('&', $params['data']);
                $s1_data = array();
                $s2_data = array();
                $s3_data = array();
                $s4_data = array();
                $s5_data = array();
                $s6_data = array();
                $values = array();
    #232
    foreach($postData as $k=>$v) {
                    $v = explode('=', urldecode($v));
                    if (strpos($v[0], "s1_data") !== false) {
                        /* In this case $v[0] may be 's1_data[enable]' , for example.
                         * We only want the 'enable' part
                         */
                        preg_match('/\[(.*)\]/', $v[0], $matches);
                        $s1_data[$matches[1]] = $v[1];
                    } elseif (strpos($v[0], "s2_data") !== false) {
                        preg_match('/\[(.*)\]/', $v[0], $matches);
                        $s2_data[$matches[1]] = $v[1];
                    } elseif (strpos($v[0], "s3_data") !== false) {
                       preg_match('/\[(.*)\]/', $v[0], $matches);
                        $s3_data[$matches[1]] = $v[1];
                    } elseif (strpos($v[0], "s4_data") !== false) {
                       preg_match('/\[(.*)\]/', $v[0], $matches);
                        $s4_data[$matches[1]] = $v[1];
                    } elseif (strpos($v[0], "s5_data") !== false) {
                       preg_match('/\[(.*)\]/', $v[0], $matches);
                        $s5_data[$matches[1]] = $v[1];
                    } elseif (strpos($v[0], "s6_data") !== false) {
                       preg_match('/\[(.*)\]/', $v[0], $matches);
                        $s6_data[$matches[1]] = $v[1];
                    } else {
                        $values[$v[0]] = $v[1];
                    }
                }

    #259
            $values["s1_data"] = $s1_data;
                $values["s2_data"] = $s2_data;
                $values["s3_data"] = $s3_data;
                $values["s4_data"] = $s4_data;
                $values["s5_data"] = $s5_data;
                $values["s6_data"] = $s6_data;


    #279
            $s1_set_admin_pass = !empty($values["s1_data"]["admin_pass"]);
                    $s2_set_admin_pass = !empty($values["s2_data"]["admin_pass"]);
                    $s3_set_admin_pass = !empty($values["s3_data"]["admin_pass"]);
                    $s4_set_admin_pass = !empty($values["s4_data"]["admin_pass"]);
                    $s5_set_admin_pass = !empty($values["s5_data"]["admin_pass"]);
                    $s6_set_admin_pass = !empty($values["s6_data"]["admin_pass"]);

    #351
                $this->_helper->json->sendJson(array(
                        "valid"=>"true",
                        "html"=>$this->view->render('preference/stream-setting.phtml'),
                        "s1_set_admin_pass"=>$s1_set_admin_pass,
                        "s2_set_admin_pass"=>$s2_set_admin_pass,
                        "s3_set_admin_pass"=>$s3_set_admin_pass,
                "s4_set_admin_pass"=>$s4_set_admin_pass,
                        "s5_set_admin_pass"=>$s5_set_admin_pass,
                        "s6_set_admin_pass"=>$s6_set_admin_pass,      

                    ));

    #509

        public function getAdminPasswordStatusAction()
        {
            $out = array();
            for ($i=1; $i<=6; $i++) {
                if (Application_Model_StreamSetting::getAdminPass('s'.$i)=='') {
                    $out["s".$i] = false;
                } else {
                    $out["s".$i] = true;
                }
            }
            $this->_helper->json->sendJson($out);
        }
    }



    Post edited by Voisses Tech at 2016-06-24 09:33:30
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Step 3
    *******************************************************************************
     gedit /usr/share/airtime/application/controllers/ApiController.php
    *******************************************************************************
    #1081
    public function getStreamParametersAction() {
            $streams = array("s1", "s2", "s3", "s4", "s5", "s6");
            $stream_params = array();
            foreach ($streams as $s) {
                $stream_params[$s] =
                    Application_Model_StreamSetting::getStreamDataNormalized($s);
            }
            $this->view->stream_params = $stream_params;
        }

    Step 4
    *******************************************************************************
     gedit /usr/share/airtime/build/sql/defaultdata.sql
    *******************************************************************************
    #347


    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s4_enable', 'false', 'boolean');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s4_output', 'icecast', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s4_type', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s4_bitrate', '', 'integer');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s4_host', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s4_port', '', 'integer');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s4_user', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s4_pass', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s4_admin_user', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s4_admin_pass', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s4_mount', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s4_url', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s4_description', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s4_genre', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s4_name', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s4_channels', 'stereo', 'string');
          
          
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s5_enable', 'false', 'boolean');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s5_output', 'icecast', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s5_type', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s5_bitrate', '', 'integer');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s5_host', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s5_port', '', 'integer');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s5_user', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s5_pass', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s5_admin_user', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s5_admin_pass', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s5_mount', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s5_url', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s5_description', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s5_genre', '', 'string');  
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s5_name', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s5_channels', 'stereo', 'string');

    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s6_enable', 'false', 'boolean');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s6_output', 'icecast', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s6_type', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s6_bitrate', '', 'integer');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s6_host', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s6_port', '', 'integer');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s6_user', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s6_pass', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s6_admin_user', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s6_admin_pass', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s6_mount', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s6_url', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s6_description', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s6_genre', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s6_name', '', 'string');
    INSERT INTO cc_stream_setting ("keyname", "value", "type") VALUES ('s6_channels', 'stereo', 'string');
             
    UPDATE cc_pref SET valstr = 6 WHERE id = 5;
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Step 6
    *******************************************************************************
     gedit /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq
    *******************************************************************************
    #29

    s1_connected = ref ''
    s2_connected = ref ''
    s3_connected = ref ''
    s4_connected = ref ''
    s5_connected = ref ''
    s6_connected = ref ''
    s1_namespace = ref ''
    s2_namespace = ref ''
    s3_namespace = ref ''
    s4_namespace = ref ''
    s5_namespace = ref ''
    s6_namespace = ref ''

    #113
     fun (s) -> begin log("streams.connection_status") "1:#{!s1_connected},2:#{!s2_connected},3:#{!s3_connected},4:#{!s4_connected},5:#{!s5_connected},6:#{!s6_connected}" end)



    #375
    if s1_enable == true then
        if s1_output == 'shoutcast' then
            s1_namespace := "shoutcast_stream_1"
        else
            s1_namespace := s1_mount
        end
        server.register(namespace=!s1_namespace, "connected", fun (s) -> begin log("#{!s1_namespace}.connected") !s1_connected end)
        output_to(s1_output, s1_type, s1_bitrate, s1_host, s1_port, s1_pass,
                    s1_mount, s1_url, s1_description, s1_genre, s1_user, s, "1",
                    s1_connected, s1_name, s1_channels)
    end

    if s2_enable == true then
        if s2_output == 'shoutcast' then
            s2_namespace := "shoutcast_stream_2"
        else
            s2_namespace := s2_mount
        end
        server.register(namespace=!s2_namespace, "connected", fun (s) -> begin log("#{!s2_namespace}.connected") !s2_connected end)
        output_to(s2_output, s2_type, s2_bitrate, s2_host, s2_port, s2_pass,
                    s2_mount, s2_url, s2_description, s2_genre, s2_user, s, "2",
                    s2_connected, s2_name, s2_channels)

    end

    if s3_enable == true then
        if s3_output == 'shoutcast' then
            s3_namespace := "shoutcast_stream_3"
        else
            s3_namespace := s3_mount
        end
        server.register(namespace=!s3_namespace, "connected", fun (s) -> begin log("#{!s3_namespace}.connected") !s3_connected end)
        output_to(s3_output, s3_type, s3_bitrate, s3_host, s3_port, s3_pass,
                    s3_mount, s3_url, s3_name, s3_genre, s3_user, s, "3",
                    s3_connected, s3_description, s3_channels)
    end

    if s4_enable == true then
        if s4_output == 'shoutcast' then
            s4_namespace := "shoutcast_stream_4"
        else
            s4_namespace := s4_mount
        end
        server.register(namespace=!s4_namespace, "connected", fun (s) -> begin log("#{!s4_namespace}.connected") !s4_connected end)
        output_to(s4_output, s4_type, s4_bitrate, s4_host, s4_port, s4_pass,
                    s4_mount, s4_url, s4_name, s4_genre, s4_user, s, "4",
                    s4_connected, s4_description, s4_channels)
    end
    if s5_enable == true then
        if s5_output == 'shoutcast' then
            s5_namespace := "shoutcast_stream_5"
        else
            s5_namespace := s5_mount
        end
        server.register(namespace=!s5_namespace, "connected", fun (s) -> begin log("#{!s5_namespace}.connected") !s5_connected end)
        output_to(s5_output, s5_type, s5_bitrate, s5_host, s5_port, s5_pass,
                    s5_mount, s5_url, s5_name, s5_genre, s5_user, s, "5",
                    s5_connected, s5_description, s5_channels)
    end

    if s6_enable == true then
        if s6_output == 'shoutcast' then
            s6_namespace := "shoutcast_stream_6"
        else
            s6_namespace := s6_mount
        end
        server.register(namespace=!s6_namespace, "connected", fun (s) -> begin log("#{!s6_namespace}.connected") !s6_connected end)
        output_to(s6_output, s6_type, s6_bitrate, s6_host, s6_port, s6_pass,
                    s6_mount, s6_url, s6_name, s6_genre, s6_user, s, "6",
                    s6_connected, s6_description, s6_channels)
    end

    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Step 6  - update the tables See below for line number to edits  
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    update the tables
    At the terminal run

    curl -k https://localhost/update-stream-setting-table/format/json/api_key/YOUR_OWN_DARN_KEYS

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Step 7  - update the tables See below for line number to edits  
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    update the database
    At the terminal run

    airtime-update-db-settings

    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • This is the snap shot

    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Step 1
    Make Backup of the Navigation feild
    cp /usr/share/airtime/application/configs/navigation.php /usr/share/airtime/application/configs/navigation.php.$(date "+%b_%d_%Y_%H.%M.%S")

    Step 1a
     I recommend you edit the files as is done below.I also include the amended files. Untar the files given (listenerstats.tar.gz) and compare with your edits.You could copy these files to replace existing files but I give no warranty


    Step 2
    Remove the Listeners stats from system section
    gedit /usr/share/airtime/application/configs/navigation.php

    array(
                    'label'      => _('Listener Stats'),
                    'module'     => 'default',
                    'controller' => 'listenerstat',
                    'action'     => 'index',
                    'resource'   => 'listenerstat'
                )


    Step 2a
    Add the New section below the system Array

    array(
            'label' => _('Statistics'),
            'uri' => '#',
            'resource'   => 'listenerstat',
            'pages'      => array(
                        array(
                            'label'      => _('Listeners'),
                            'module'     => 'default',
                            'controller' => 'listenerstat',
                            'action'     => 'index',
                            'resource'   => 'listenerstat'
                                 ),
                        )
                  ),


    Step 3

    cp /usr/share/airtime/application/configs/ACL.php /usr/share/airtime/application/configs/ACL.php.$(date "+%b_%d_%Y_%H.%M.%S") &&
     gedit /usr/share/airtime/application/configs/ACL.php


    Create the New Permissions and Resource  in the ACL

    Change the PERMISSIONS
    ->allow('G', 'listenerstat')

    where
    G is for program manager

    I prefer at least the program manager to see the stats but you migh want the djs too
    H is for DJ
    Post edited by Voisses Tech at 2016-06-24 09:36:44
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • This is a snapshot

    1024 x 768 - 44K
    Post edited by Voisses Tech at 2016-06-24 09:46:46
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Thats it for now . Lovely things next

    Remember
    1. php script is include in the tar file to update and insert the necessary files
    2. test each time before you move to the next
    3. No Warranty,it May not work for you
    4. Pause if you must and pray if you pause and believe if you pray and if you believe you will have success

    referring

    https://forum.sourcefabric.org/discussion/comment/34498#Comment_34498

    https://forum.sourcefabric.org/discussion/comment/34499#Comment_34499
    https://forum.sourcefabric.org/discussion/14811/how-to-make-more-than-three-radio-streams-such-as-10-/p1


    Post edited by Voisses Tech at 2016-06-24 10:07:14
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.