On the first run ownCloud will setup the database and admin user.
Default admin is:
Username: linuxmce Password: linuxmce
wget http://svn.linuxmce.org/svn/people/ochorocho/owncloud/owncloud_setup.sh
Basically a modification of usr_sql app by Andreas Böhler
vlc -vvv file:///mnt/device/61/sadasdasd.avi --sout="#transcode{vcodec=theo, vb=800, acodec=vorb, ab=128, scale=1, audio-sync, width=480, height=320}:std{access=http, mux=ogg, dst='192.168.1.210:9080/streaming/test/106.ogg' }"
Add Settings in admin area (appinfo/app.php):
\OCP\App::registerAdmin('lmce_vdr', 'admin/settings');
Get users ID:
OCP\User::getUser();
Translate in Template
<?php echo $l->t('Channel manager'); ?>
Check for logged in user:
OCP\JSON::checkLoggedIn();
Check for enabled app:
OCP\JSON::checkAppEnabled('lmce_vdr');
Include JS (appinfo/app.php):
OCP\Util::addscript('lmce_vdr','script');
Includes file app_folder/js/script.js
Translate:
t('appname','text to translate');
Select a File:
OC.dialogs.filepicker('test', function(val) {console.log(val)}, true, null, true);
AJAX URL:
OC.filePath('lmce_vdr','ajax','moveChannel.php'),
Example AJAX request:
$.ajax({ // REQUEST URL url: OC.filePath('lmce_vdr','ajax','action.php'), type: "post", // URL PARAMS data: { action: action}, success: function(data){ // DO SOMETHING WITH data }, error: function(data){ alert('Error running action ...'); }, });
Include CSS (appinfo/app.php):
OCP\Util::addStyle("lmce_vdr", "style");
Includes file app_folder/css/style.css
Get file app folder using %appswebroot%:
#someId { background:url(%appswebroot%/lmce_vdr/img/textfield-rename.png) }
Good to know vars in JS:
0 oc_debug=false; oc_webroot="/userspace"; oc_appswebroots={"files":"/userspace/apps/files","activity":"/userspace/apps/activity","calendar":"/userspace/apps/calendar","contacts":"/userspace/apps/contacts"}datepickerFormatDate="dd.mm.yy"; dayNames=["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]; var monthNames=["Januar","Februar","M\u00e4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]; var firstDay=0; var oc_config={"session_lifetime":"144000","session_keepalive":true};