/** * @param array $attr * @param HTMLPurifier_Config $config * @param HTMLPurifier_Context $context * @return array */ public function transform($attr, $config, $context) { if (!isset($attr['style']) || strpos($attr['style'], 'background') === false) { return $attr; } // Check if there is a background image given $cssAttributes = explode(';', $attr['style']); $func = function ($cssAttribute) { if (preg_match('/\\S/', $cssAttribute) === 0) { // empty or whitespace return ''; } list($name, $value) = explode(':', $cssAttribute, 2); if (strpos($name, 'background') !== false && strpos($value, 'url(') !== false) { // Replace image URL $value = preg_replace('/url\\("?http.*\\)/i', 'url(' . Util::imagePath('mail', 'blocked-image.png') . ')', $value); return $name . ':' . $value; } else { return $cssAttribute; } }; // Reassemble style $cssAttributes = array_map($func, $cssAttributes); $newStyle = implode(';', $cssAttributes); // Replace style if required if ($newStyle !== $attr['style']) { $attr['data-original-style'] = $attr['style']; $attr['style'] = $newStyle; } return $attr; }
/** * @param array $attr * @param HTMLPurifier_Config $config * @param HTMLPurifier_Context $context * @return array */ public function transform($attr, $config, $context) { if ($context->get('CurrentToken')->name !== 'img' || !isset($attr['src'])) { return $attr; } $attr['data-original-src'] = $attr['src']; $attr['src'] = Util::imagePath('mail', 'blocked-image.png'); return $attr; }
/** * @param array $attr * @param HTMLPurifier_Config $config * @param HTMLPurifier_Context $context * @return array */ public function transform($attr, $config, $context) { if ($context->get('CurrentToken')->name !== 'img' || !isset($attr['src'])) { return $attr; } // Block tracking pixels if (isset($attr['width']) && isset($attr['height']) && (int) $attr['width'] < 5 && (int) $attr['height'] < 5) { // Replace with a transparent png in case it's important for the layout $attr['src'] = Util::imagePath('mail', 'blocked-image.png'); $attr = $this->setDisplayNone($attr); return $attr; } // Do not block images attached to the email $url = $this->parser->parse($attr['src']); if ($url->host === Util::getServerHostName() && $url->path === $this->urlGenerator->linkToRoute('mail.proxy.proxy')) { $attr['data-original-src'] = $attr['src']; $attr['src'] = Util::imagePath('mail', 'blocked-image.png'); $attr = $this->setDisplayNone($attr); } return $attr; }
3) <?php p($l->t('Enter your newly created TrustedSpace backup user name')); ?> </div> <span class="easybackup_label"> <?php p($l->t('TrustedSpace user')); ?> :</span> <span id="easybackup_userNameEdit"> <span id="easybackup_userName"> <?php p($_['userName']); ?> </span> <a class="action" href="#"> <img src="<?php print_unescaped(\OCP\Util::imagePath('core', 'actions/rename.svg')); ?> " /> </a> </span> <div class="easybackup_explanation easybackup_bullet"> 4) <?php p($l->t('Start backing up your data manually or on regular basis')); ?> </div> <form action="<?php print_unescaped($_['backupUrl']); ?> "> <button id="easybackup_goToBackup" type="submit" <?php
<?php \OCP\App::registerAdmin('files', 'admin'); \OC::$server->getNavigationManager()->add(function () { $l = \OC::$server->getL10N('files'); return ['id' => 'files_index', 'order' => 0, 'href' => \OCP\Util::linkTo('files', 'index.php'), 'icon' => \OCP\Util::imagePath('core', 'places/files.svg'), 'name' => $l->t('Files')]; }); \OC::$server->getSearch()->registerProvider('OC\\Search\\Provider\\File', array('apps' => array('files'))); $templateManager = \OC_Helper::getFileTemplateManager(); $templateManager->registerTemplate('text/html', 'core/templates/filetemplates/template.html'); $templateManager->registerTemplate('application/vnd.oasis.opendocument.presentation', 'core/templates/filetemplates/template.odp'); $templateManager->registerTemplate('application/vnd.oasis.opendocument.text', 'core/templates/filetemplates/template.odt'); $templateManager->registerTemplate('application/vnd.oasis.opendocument.spreadsheet', 'core/templates/filetemplates/template.ods'); \OCA\Files\App::getNavigationManager()->add(function () { $l = \OC::$server->getL10N('files'); return ['id' => 'files', 'appname' => 'files', 'script' => 'list.php', 'order' => 0, 'name' => $l->t('All files')]; }); \OC::$server->getActivityManager()->registerExtension(function () { return new \OCA\Files\Activity(\OC::$server->query('L10NFactory'), \OC::$server->getURLGenerator(), \OC::$server->getActivityManager(), new \OCA\Files\ActivityHelper(\OC::$server->getTagManager()), \OC::$server->getConfig()); });
?> <script type="text/javascript" src="<?php p(\OCP\Util::linkToAbsolute('secure_container', 'js/3rdparty/jswrapper.php', array('app'=> 'sjcl'))); ?>"></script> <div id="app-navigation"> <ul class="level-0 path-childs" id="path-childs-0"> <?php foreach ($_['navigation'] as $k => $path): ?> <?php print_unescaped($this->inc('pathentry', array('path' => $path, 'level'=> 1))); ?> <?php endforeach; ?> </ul> </div> <main id="app-content"> <div id="controls"> <nav class="breadcrumb"> <div class="crumb home svg last" data-dir="0"> <a><img class="svg" src="<?php print(\OCP\Util::imagePath('core', 'places/home.svg')); ?>"></a> </div> </nav> <section class="actions creatable"> <div id="new" class="button"> <a>Neu</a> <ul> <li class="icon-filetype-folder svg" data-new-value="<?php p($l->t('New Folder')); ?>" data-type="folder"> <p><?php p($l->t('New Folder')); ?></p> </li> <li class="icon-filetype-text svg" data-new-value="<?php p($l->t('New Crypto-Entry')); ?>" data-type="container"> <p><?php p($l->t('New Crypto-Entry')); ?></p> </li> </ul> </div>
<?php /** * @file templates/tmpl_settings.php * Dialog to change app settings, to be included in the clouds settings page. * @access public * @author Christian Reiner */ ?> <!-- settings of app 'imprint' --> <div class="section" id="imprint"> <h2> <span id="title" class="title"> <img class="" src="<?php p(\OCP\Util::imagePath("imprint", "imprint-dusky.svg")); ?> "> <?php p($l->t("Imprint")); ?> </span> </h2> <div id="imprint-options" class="imprint-option"> <label for="imprint-option-position-user" class="imprint-option"><?php p($l->t("Reference") . ": "); ?> </label> <select id="imprint-option-position-user" class="imprint-option" type="select" name="position-user"> <option value=""></option> <option value="header-left"><?php
private function getMiddlePart($data) { if (!isset($data['weatherData']['list'])) { return '<td></td>'; } $html = ''; $html .= '<td>'; $html .= '<div class="h1">' . $data['city'] . '</div>'; $html .= '<div class="align-center">'; $html .= '<img class="weatherIcon" src="' . Util::imagePath('dashboard', $this->getIconMapping($this->p($data['weatherData']['list'][0]['weather'][0]['icon']))) . '" alt="weather icon" />'; $html .= ' '; $html .= '<img class="weatherIcon" src="' . Util::imagePath('dashboard', $this->getIconMapping($this->p($data['weatherData']['list'][1]['weather'][0]['icon']))) . '" alt="weather icon" />'; $html .= '</div>'; $html .= '</td>'; return $html; }
\Sabre\VObject\Property::$classMap['FN'] = '\\OC\\VObject\\StringProperty'; \Sabre\VObject\Property::$classMap['TITLE'] = '\\OC\\VObject\\StringProperty'; \Sabre\VObject\Property::$classMap['ROLE'] = '\\OC\\VObject\\StringProperty'; \Sabre\VObject\Property::$classMap['NOTE'] = '\\OC\\VObject\\StringProperty'; \Sabre\VObject\Property::$classMap['NICKNAME'] = '\\OC\\VObject\\StringProperty'; \Sabre\VObject\Property::$classMap['EMAIL'] = '\\OC\\VObject\\StringProperty'; \Sabre\VObject\Property::$classMap['TEL'] = '\\OC\\VObject\\StringProperty'; \Sabre\VObject\Property::$classMap['IMPP'] = '\\OC\\VObject\\StringProperty'; \Sabre\VObject\Property::$classMap['URL'] = '\\OC\\VObject\\StringProperty'; \Sabre\VObject\Property::$classMap['LABEL'] = '\\OC\\VObject\\StringProperty'; \Sabre\VObject\Property::$classMap['X-EVOLUTION-FILE-AS'] = '\\OC\\VObject\\StringProperty'; \Sabre\VObject\Property::$classMap['N'] = '\\OC\\VObject\\CompoundProperty'; \Sabre\VObject\Property::$classMap['ADR'] = '\\OC\\VObject\\CompoundProperty'; \Sabre\VObject\Property::$classMap['GEO'] = '\\OC\\VObject\\CompoundProperty'; \Sabre\VObject\Property::$classMap['ORG'] = '\\OC\\VObject\\CompoundProperty'; \OC::$server->getNavigationManager()->add(array('id' => 'contacts', 'order' => 10, 'href' => \OCP\Util::linkToRoute('contacts_index'), 'icon' => \OCP\Util::imagePath('contacts', 'contacts.svg'), 'name' => \OCP\Util::getL10N('contacts')->t('Contacts'))); $api = new API('contacts'); $api->connectHook('OC_User', 'post_createUser', '\\OCA\\Contacts\\Hooks', 'userCreated'); $api->connectHook('OC_User', 'post_deleteUser', '\\OCA\\Contacts\\Hooks', 'userDeleted'); $api->connectHook('OCA\\Contacts', 'pre_deleteAddressBook', '\\OCA\\Contacts\\Hooks', 'addressBookDeletion'); $api->connectHook('OCA\\Contacts', 'pre_deleteContact', '\\OCA\\Contacts\\Hooks', 'contactDeletion'); $api->connectHook('OCA\\Contacts', 'post_createContact', 'OCA\\Contacts\\Hooks', 'contactAdded'); $api->connectHook('OCA\\Contacts', 'post_updateContact', '\\OCA\\Contacts\\Hooks', 'contactUpdated'); $api->connectHook('OCA\\Contacts', 'scanCategories', '\\OCA\\Contacts\\Hooks', 'scanCategories'); $api->connectHook('OCA\\Contacts', 'indexProperties', '\\OCA\\Contacts\\Hooks', 'indexProperties'); $api->connectHook('OC_Calendar', 'getEvents', 'OCA\\Contacts\\Hooks', 'getBirthdayEvents'); $api->connectHook('OC_Calendar', 'getSources', 'OCA\\Contacts\\Hooks', 'getCalenderSources'); \OCP\Util::addscript('contacts', 'loader'); \OCP\Util::addscript('contacts', 'admin'); \OC_Search::registerProvider('OCA\\Contacts\\Search\\Provider'); //\OCP\Share::registerBackend('contact', 'OCA\Contacts\Share_Backend_Contact');
</div> <?php endif; ?> <?php foreach($_['messages'] as $message): ?> <div class="warning"> <?php p($message); ?><br> </div> <?php endforeach; ?> <?php if (isset($_['internalexception']) && ($_['internalexception'])): ?> <div class="warning"> <?php p($l->t('An internal error occured.')); ?><br> <small><?php p($l->t('Please try again or contact your administrator.')); ?></small> </div> <?php endif; ?> <div id="message" class="hidden"> <img class="float-spinner" alt="" src="<?php p(\OCP\Util::imagePath('core', 'loading-dark.gif'));?>"> <span id="messageText"></span> <!-- the following div ensures that the spinner is always inside the #message div --> <div style="clear: both;"></div> </div> <p class="grouptop"> <input type="text" name="user" id="user" placeholder="<?php p($l->t('Username')); ?>" value="<?php p($_['username']); ?>" <?php p($_['user_autofocus'] ? 'autofocus' : ''); ?> autocomplete="on" autocapitalize="off" autocorrect="off" required> <label for="user" class="infield"><?php p($l->t('Username')); ?></label> <img class="svg" src="<?php print_unescaped(image_path('', 'actions/user.svg')); ?>" alt=""/> </p> <p class="groupbottom">
<?php /** * ownCloud - bookmarks * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * @author Marvin Thomas Rabe <*****@*****.**> * @author Arthur Schiwon <*****@*****.**> * @author Stefan Klemm <*****@*****.**> * @copyright (c) 2011, Marvin Thomas Rabe * @copyright (c) 2011, Arthur Schiwon * @copyright (c) 2014, Stefan Klemm */ namespace OCA\Bookmarks\AppInfo; \OCP\App::addNavigationEntry(array('id' => 'bookmarks', 'order' => 10, 'href' => \OCP\Util::linkToRoute('bookmarks.web_view.index'), 'icon' => \OCP\Util::imagePath('bookmarks', 'bookmarks.svg'), 'name' => \OC_L10N::get('bookmarks')->t('Bookmarks'))); \OC::$server->getSearch()->registerProvider('OCA\\Bookmarks\\Controller\\Lib\\Search', array('apps' => array('bookmarks')));
<?php /** * ownCloud - ownboard * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Loic Blot <*****@*****.**> * @copyright Loic Blot 2015 */ namespace OCA\OwnBoard\AppInfo; if (class_exists('\\OCP\\AppFramework\\App')) { \OCP\App::addNavigationEntry(array('id' => 'ownboard', 'order' => 10, 'href' => \OCP\Util::linkToRoute('ownboard.board.index'), 'icon' => \OCP\Util::imagePath('ownboard', 'app.svg'), 'name' => \OCP\Util::getL10N('ownboard')->t('ownBoard'))); } else { $msg = 'Can not enable the OwnBoard app because the App Framework App is disabled'; \OCP\Util::writeLog('ownboard', $msg, \OCP\Util::ERROR); }
<?php /** * This file is licensed under the Affero General Public License version 3 or * later. * See the COPYING-README file. */ $l = new OC_l10n('collaboration'); OC::$CLASSPATH['OC_Collaboration_Project'] = 'collaboration/lib/projects.php'; OC::$CLASSPATH['OC_Collaboration_Post'] = 'collaboration/lib/posts.php'; OC::$CLASSPATH['OC_Collaboration_Time'] = 'collaboration/lib/time.php'; OC::$CLASSPATH['OC_Collaboration_Comment'] = 'collaboration/lib/comments.php'; OC::$CLASSPATH['OC_Collaboration_Task'] = 'collaboration/lib/tasks.php'; OC::$CLASSPATH['OC_Collaboration_Mail'] = 'collaboration/lib/mail_templates.php'; OC::$CLASSPATH['OC_Collaboration_Hooks'] = 'collaboration/lib/hooks.php'; OC::$CLASSPATH['OC_Collaboration_Skillset'] = 'collaboration/lib/skillset.php'; OC::$CLASSPATH['OC_Collaboration_Report'] = 'collaboration/lib/reports.php'; OC::$CLASSPATH['OC_Collaboration_Calendar'] = 'collaboration/lib/calendar_support.php'; OC_Hook::connect('OC_User', 'post_deleteUser', 'OC_Collaboration_Hooks', 'notifyUserDeletion'); OC_Hook::connect('OCP\\Share', 'post_shared', 'OC_Collaboration_Hooks', 'notifyFileShare'); $gid = "Collaboration Admin"; if (!OC_Group::groupExists($gid)) { OC_Group::createGroup($gid); } \OCP\App::addNavigationEntry(array('id' => 'collaboration', 'order' => 0, 'href' => \OCP\Util::linkToRoute('collaboration_route', array('rel_path' => '')), 'icon' => \OCP\Util::imagePath('collaboration', 'collaboration.svg'), 'name' => $l->t('Collaboration')));
<?php /** * Copyright (c) 2014, Tobia De Koninck hey--at--ledfan.be * This file is licensed under the AGPL version 3 or later. * See the COPYING file. */ namespace OCA\Chat; use OCA\Chat\App\Chat; use OCA\Chat\App\Container; use OCP\Util; use OCP\App; $container = new Container(); $container->query('OCP\\INavigationManager')->add(function () { return array('id' => 'chat', 'order' => 10, 'href' => Util::linkToRoute('chat.app.index'), 'icon' => Util::imagePath('chat', 'chat.png'), 'name' => Util::getL10n('chat')->t('Chat')); }); $container->query('Chat')->registerBackend($container->query('OCH')); $container->query('Chat')->registerBackend($container->query('XMPP')); App::registerAdmin('chat', 'lib/admin'); // When the "Integrated View" is loaded, include the CSS and JS code: if ($container->query('Chat')->viewType === Chat::INTEGRATED) { if (\OCP\User::isLoggedIn()) { Util::addStyle('chat', '../vendor/emojione/assets/sprites/emojione.sprites'); Util::addStyle('chat', '../vendor/emojione/assets/css/emojione.min'); Util::addScript('chat', '../vendor/all.min'); Util::addScript('chat', 'integrated.min'); Util::addStyle('chat', 'integrated.min'); if (defined('DEBUG') && DEBUG) { Util::addScript('chat', '../vendor/angular-mocks/angular-mocks'); }
/** * * return the html of the head * included * - name (title) * - reload icon * - settings icon * - icon * * @param $data array with basic values from widgetController super class * @return string */ private function getHeadHtml($data) { $html = '<h1 class="hoverInfo" data-opacitynormal="0.5">'; if (isset($data['link']) != null && $data['link'] != '') { $html .= '<a href="' . $data['link'] . '">' . $data['name'] . '</a>'; } else { $html .= $data['name']; } if (isset($data['refresh']) && $data['refresh'] != 0) { $html .= '<span class="hoverInfo icon-play iconReload" data-wiid="' . $data['wIId'] . '"> </span>'; } $html .= '<span class="hoverInfo icon-settings iconSettings"> </span>'; $html .= '</h1>'; if (isset($data['icon']) && $data['icon'] != '') { $html .= '<div class="icon"><img src="' . Util::imagePath('dashboard', $data['icon']) . '" alt="' . $data['wIId'] . ' icon" /></div>'; } return $html; }
?> <?php print_unescaped($this->inc('pathentry', array('path' => $path, 'level' => 1))); ?> <?php } ?> </ul> </div> <main id="app-content"> <div id="controls"> <nav class="breadcrumb"> <div class="crumb home svg last" data-dir="0"> <a><img class="svg" src="<?php print \OCP\Util::imagePath('core', 'places/home.svg'); ?> "></a> </div> </nav> <section class="actions creatable"> <div id="new" class="button"> <a>Neu</a> <ul> <li class="icon-filetype-folder svg" data-new-value="<?php p($l->t('New Folder')); ?> " data-type="folder"> <p><?php p($l->t('New Folder'));
// ownCloud calls appinfo/app.php every time it runs. This is the place to // Register navigation entries, and connect signals and slots define(__NAMESPACE__.'\K_APP_NAME', 'oc_apps2_games'); \OCP\App::register(Array( 'id' => K_APP_NAME, 'order' => 60, 'name' => 'Games2 +' )); \OCP\App::addNavigationEntry(Array( 'id' => namespace\K_APP_NAME, 'order' => 60, 'href' => \OCP\Util::linkTo(K_APP_NAME, 'main.php'), 'icon' => \OCP\Util::imagePath(K_APP_NAME, 'games-card_game.png'), 'name' => 'Games2 +' )); //\OC_Hook::connect('OC_DB','install', 'installer'); //\OC_Hook::connect('OC_DB','update', 'updater'); /* $myFile = \OC_App::getAppPath('oc_apps2_games').'/appinfo/apps2_game_map.csv'; if ( @is_readable($myFile) ) { $myHandle = @fopen($myFile,'r'); if ( $myHandle ) { \OCP\DB::beginTransaction(); $mySQL = <<<EOR INSERT INTO *PREFIX*apps2_games_map(game_id,author,map_id,json,jsol) VALUES (?,?,?,?,?) EOR; $myQuery = \OCP\DB::prepare($mySQL);
<?php /** * ownCloud - Secure Container * * @author Lukas Zurschmiede * @copyright 2014 Lukas Zurschmiede <*****@*****.**> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU AFFERO GENERAL PUBLIC LICENSE for more details. * * You should have received a copy of the GNU Affero General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ namespace OCA\secure_container\AppInfo; \OCP\App::addNavigationEntry(array('id' => 'secure_container', 'order' => 10, 'href' => \OCP\Util::linkToRoute('secure_container.page.index'), 'icon' => \OCP\Util::imagePath('secure_container', 'app.svg'), 'name' => \OC_L10N::get('secure_container')->t('Secure Container')));
<?php /** * ownCloud - App Template plugin * * @author Bernhard Posselt * @copyright 2012 Bernhard Posselt nukeawhale@gmail.com * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU AFFERO GENERAL PUBLIC LICENSE for more details. * * You should have received a copy of the GNU Affero General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ require_once \OC_App::getAppPath('apptemplate_advanced') . '/appinfo/bootstrap.php'; \OCP\App::registerAdmin('apptemplate_advanced', 'admin/settings'); \OCP\App::addNavigationEntry(array('id' => 'apptemplate_advanced', 'order' => 74, 'href' => \OC_Helper::linkToRoute('apptemplate_advanced_index'), 'icon' => \OCP\Util::imagePath('apptemplate_advanced', 'example.png'), 'name' => \OC_L10N::get('apptemplate_advanced')->t('Advanced App Template')));
} //OCP\Util::addScript('user_otp', 'top_right_menu'); //var_dump('toto'); ?> <!-- <script type="text/javascript"> $(document).ready(function(){ //$('#expanddiv li:last-child').append('toto'); var items = document.querySelectorAll("#expanddiv li"); var users = items[items.length-4]; //alert(users); //users.append('toto'); var elm = users; //document.getElementById("name"); var newElm = document.createElement("li"); newElm.innerHTML = "<a href='"+<?php echo \OCP\Util::linkToRoute('user_otp_list_users'); ?> +"'>OTP Users</a>"; //alert(document.location.href); elm.parentNode.insertBefore(newElm, elm.nextSibling); }); </script> --> <?php $isadmin = OC_User::isAdminUser(OC_User::getUser()); if ($isadmin) { \OCP\App::addNavigationEntry(array('id' => 'user_otp', 'order' => 74, 'href' => \OCP\Util::linkToRoute('user_otp_list_users'), 'icon' => \OCP\Util::imagePath('settings', 'admin.svg'), 'name' => 'OTP Users')); }
* License as published by the Free Software Foundation; either * version 3 of the license, or any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU AFFERO GENERAL PUBLIC LICENSE for more details. * * You should have received a copy of the GNU Affero General Public * License along with this library. * If not, see <http://www.gnu.org/licenses/>. * */ /** * @file appinfo/app.php * @brief Basic registration of app inside ownCloud * @author Christian Reiner */ \OCP\App::registerAdmin('imprint', 'settings'); \OCP\Util::addStyle('imprint', 'reference'); \OCP\Util::addScript('imprint', 'reference'); // add imprint positioning options as meta tags to the html head to avoid additional ajax requests \OCP\Util::addHeader('meta', array('data-imprint-position-user' => \OCP\Config::getAppValue('imprint', 'position-user', ''))); \OCP\Util::addHeader('meta', array('data-imprint-position-guest' => \OCP\Config::getAppValue('imprint', 'position-guest', ''))); \OCP\Util::addHeader('meta', array('data-imprint-position-login' => \OCP\Config::getAppValue('imprint', 'position-login', ''))); // offer application as standalone entry in the menu? if ('true' === \OCP\Config::getAppValue('imprint', 'standalone', 'false')) { // no js required, we add the imprint as a normal app to the navigation \OCP\App::addNavigationEntry(array('id' => 'imprint', 'order' => 99999, 'href' => \OCP\Util::linkTo('imprint', 'index.php'), 'icon' => \OCP\Util::imagePath('imprint', 'imprint-light.svg'), 'name' => \OCP\Util::getL10N('imprint')->t("Legal notice"))); } // if
//namespace OCA\GpsTracks\AppInfo; //use OCP\AppFramework\App; // //$app = new App('gpstracks'); //$container = $app->getContainer(); // //$container->query('OCP\INavigationManager')->add(function () use ($container) { // $urlGenerator = $container->query('OCP\IURLGenerator'); // $l10n = $container->query('OCP\IL10N'); // return [ // // the string under which your app will be referenced in owncloud // 'id' => 'gpstracks', // // // sorting weight for the navigation. The higher the number, the higher // // will it be listed in the navigation // 'order' => 10, // // // the route that will be shown on startup // 'href' => $urlGenerator->linkToRoute('gpstracks.page.index'), // // // the icon that will be shown in the navigation // // this file needs to exist in img/ // 'icon' => $urlGenerator->imagePath('gpstracks', 'app.svg'), // // // the title of your application. This will be used in the // // navigation or on the settings page of your app // 'name' => $l10n->t('Gps Tracks'), // ]; //}); \OCP\App::addNavigationEntry(['id' => 'gpstracks', 'order' => 10, 'href' => \OCP\Util::linkToRoute('gpstracks.page.index'), 'icon' => \OCP\Util::imagePath('gpstracks', 'app.svg'), 'name' => \OC_L10N::get('gpstracks')->t('Gps Tracks')]);
<?php /** * owncloud - talk * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Vincent Petry <*****@*****.**> * @copyright Vincent Petry 2014 */ namespace OCA\Talk\AppInfo; $app = new Application(); $c = $app->getContainer(); \OCP\App::registerAdmin($c->query('AppName'), 'settings/admin'); \OCP\App::addNavigationEntry(array('id' => 'talk', 'order' => 10, 'href' => \OCP\Util::linkToRoute('talk.page.index'), 'icon' => \OCP\Util::imagePath('talk', 'app.svg'), 'name' => \OC_L10N::get('talk')->t('Talk')));
<?php /** * ownCloud - dashboard * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Florian Steffens <*****@*****.**> * @copyright Florian Steffens 2014 */ namespace OCA\Dashboard\AppInfo; use OC_L10N; use OCP\App; use OCP\Util; App::addNavigationEntry(array('id' => 'dashboard', 'order' => 10, 'href' => Util::linkToRoute('dashboard.route_page.index'), 'icon' => Util::imagePath('dashboard', 'dashboard.svg'), 'name' => OC_L10N::get('dashboard')->t('Dashboard')));
* it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License, version 3, * along with this program. If not, see <http://www.gnu.org/licenses/> * */ \OCP\App::registerAdmin('files', 'admin'); \OC::$server->getNavigationManager()->add(function () { $urlGenerator = \OC::$server->getURLGenerator(); $l = \OC::$server->getL10N('files'); return ['id' => 'files_index', 'order' => 0, 'href' => $urlGenerator->linkToRoute('files.view.index'), 'icon' => \OCP\Util::imagePath('core', 'places/files.svg'), 'name' => $l->t('Files')]; }); \OC::$server->getSearch()->registerProvider('OC\\Search\\Provider\\File', array('apps' => array('files'))); $templateManager = \OC_Helper::getFileTemplateManager(); $templateManager->registerTemplate('text/html', 'core/templates/filetemplates/template.html'); $templateManager->registerTemplate('application/vnd.oasis.opendocument.presentation', 'core/templates/filetemplates/template.odp'); $templateManager->registerTemplate('application/vnd.oasis.opendocument.text', 'core/templates/filetemplates/template.odt'); $templateManager->registerTemplate('application/vnd.oasis.opendocument.spreadsheet', 'core/templates/filetemplates/template.ods'); \OCA\Files\App::getNavigationManager()->add(function () { $l = \OC::$server->getL10N('files'); return ['id' => 'files', 'appname' => 'files', 'script' => 'list.php', 'order' => 0, 'name' => $l->t('All files')]; }); \OC::$server->getActivityManager()->registerExtension(function () { return new \OCA\Files\Activity(\OC::$server->query('L10NFactory'), \OC::$server->getURLGenerator(), \OC::$server->getActivityManager(), new \OCA\Files\ActivityHelper(\OC::$server->getTagManager()), \OC::$server->getDatabaseConnection(), \OC::$server->getConfig()); });
<?php /** * ownCloud - User Files Restore * * @author Patrick Paysant <*****@*****.**> * @copyright 2015 CNRS DSI * @license This file is licensed under the Affero General Public License version 3 or later. See the COPYING file. */ namespace OCA\User_Files_Restore; use OCA\User_Files_Restore\App\User_Files_Restore; $app = new User_Files_Restore(); $c = $app->getContainer(); /** * add navigation */ \OCP\App::addNavigationEntry(array('id' => 'user_files_restore', 'order' => 10, 'href' => \OCP\Util::linkToRoute('user_files_restore.page.index'), 'icon' => \OCP\Util::imagePath($c->query('AppName'), 'restoreApp.svg'), 'name' => $c->query('L10N')->t('Restore'))); /** * Load js and overlay icon */ $eventDispatcher = \OC::$server->getEventDispatcher(); $eventDispatcher->addListener('OCA\\Files::loadAdditionalScripts', function () use($c) { \OCP\Util::addscript($c->query('AppName'), 'app'); \OCP\Util::addscript($c->query('AppName'), 'userfilesrestoretabview'); \OCP\Util::addscript($c->query('AppName'), 'filesplugin'); \OCP\Util::addStyle($c->query('AppName'), 'restore'); });
* This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Ben Curtis <*****@*****.**> * @copyright Ben Curtis 2015 */ namespace OCA\OwnNote\AppInfo; \OCP\App::addNavigationEntry(array( // the string under which your app will be referenced in owncloud 'id' => 'ownnote', // sorting weight for the navigation. The higher the number, the higher // will it be listed in the navigation 'order' => 10, // the route that will be shown on startup 'href' => \OCP\Util::linkToRoute('ownnote.page.index'), // the icon that will be shown in the navigation // this file needs to exist in img/ 'icon' => \OCP\Util::imagePath('ownnote', 'app.svg'), // the title of your application. This will be used in the // navigation or on the settings page of your app //'name' => \OC_L10N::get('ownnote')->t('Own Note') 'name' => \OC_L10N::get('ownnote')->t('Notes') ));
public static function getBasicConf($L10N) { return array('icon' => Util::imagePath('dashboard', 'icons/9.png'), 'refresh' => 0, 'wId' => 'dummy', 'name' => $L10N->t('Dummy')->__toString()); }
<div class="warning"> <?php p($l->t('An internal error occured.')); ?> <br> <small><?php p($l->t('Please try again or contact your administrator.')); ?> </small> </div> <?php } ?> <p id="message" class="hidden"> <img class="float-spinner" src="<?php p(\OCP\Util::imagePath('core', 'loading-dark.gif')); ?> "/> <span id="messageText"></span> <!-- the following div ensures that the spinner is always inside the #message div --> <div style="clear: both;"></div> </p> <p class="grouptop"> <input type="text" name="user" id="user" placeholder="<?php p($l->t('Username')); ?> " value="<?php p($_['username']); ?>
<?php /** * ownCloud - EasyBackup * * @author Sebastian Kanzow * @copyright 2014 System k2 GmbH info@systemk2.de * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU AFFERO GENERAL PUBLIC LICENSE for more details. * * You should have received a copy of the GNU Affero General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ \OCP\Util::addScript('easybackup', 'easybackup'); // add js/easybackup.js \OCP\Util::addScript('easybackup', 'logfiletailer'); // add js/logfiletailer.js \OCP\Util::addStyle('easybackup', 'easybackup'); // add css/easybackup.css \OCP\App::addNavigationEntry(array('id' => 'easybackup', 'order' => 10, 'href' => \OCP\Util::linkToRoute('easybackup.page.index'), 'icon' => \OCP\Util::imagePath('easybackup', 'easybackup_logo.png'), 'name' => 'EasyBackup'));