Thank you for choosing Music Window.
We like music
We like music
// assign some content to smarty. This would typically come from // a database or other source, but we'll use static // values for the purpose of this example.
- $smarty->assign('name', 'george smith');
- $smarty->assign('address', '45th & Harris');
// display it- $smarty->display('index.html');
====================================================== // example for foreach loop // build query- $query = $this->__om_query("select * from songs");
// assign loop to smarty- $smarty->assign('query', $query);
// use created loop in html file// display html file- {foreach $query as $result}
... <div id="my_name"> {$result.my_name} </div> ... // close foreach loop- {/foreach}
- $smarty->display('index.html');
JS Usage
- <script src="/js/jquery-v1.11.1.js"></script>
- <script src="/js/init_music.js"></script>
- // create a div element
- <div id="music"><div>
- // after creating an div element
- <script>
- jQuery('#music').NobilMusicWindow({ // define the path of music files music_path: '/music/', // initialize file name p_file: '/index.html', // where append the popup box append_to: 'body', // choose your favorite open method, use 'default or 'overlay' open_method: 'default', // set left position of popup box in px p_left: '100', // set top position of popup box in px p_top: '50', // enable|disable modal w_modal: true, // this is a callback before open the popup box beforeOpen: function(){ }
- </script>
Read more...
| Name | Property | Role |
|---|---|---|
| host | value | http://localhost |
| catselectoninit | value | the default category selected when initialize MusicWindow |
| ajaxLoadingIcon | boolean | when navigate show loading icon |
| MusicWIndowTitle | value | set the secondary title when music popup is visible |
| errorReportingCSS | value | are two classes for choosing |
| showPlayingNotification | boolean | show details about who sings bottom left |
| showShare | value | for sharing current playing song |
| popupLayerZ | boolean | to enlarge the popup box |
| popupLayerToCenter | boolean | set the popup box to center of window |
| changeDOCtitle | boolean | change the title of document with the current playing song |
| defaultVolume | value | the default volume for the first time opens MusicWindow |
| uphistorylist | boolean | update history by listen |
| maximumFileUpload | number | the maximum file for upload, you can choose a number between 1-20 |
| errorTimeout | number | time in milliseconds for error reporting closing |
| errorTimeout | number | time in milliseconds for error reporting closing |
| showLoaderTimeout | number | time in miliseconds, when the server is busy show loading icon |
| AjaxLoadingTimeOut | number | timeout for ajax request loading |
| AnimateSortable | boolean | when music is sorted, the items will animate with the default duration, OR number the duration for the animation, in milliseconds. |
| AnimateCoverTime | boolean | when the track is changed create animation for cover |
| autoplay | boolean | auto play the first song when MusicWindow is initializing |
| updatePLDOTNotif | number | auto check if there is new music in my collections, and turn on the green lamp |
| hideOnESC | boolean | hide popup box when ESC key is pressed |
| hideOnOverlay | boolean | hide popup box when come click on overlay |