本文整理汇总了PHP中OC_Helper::imagePath方法的典型用法代码示例。如果您正苦于以下问题:PHP OC_Helper::imagePath方法的具体用法?PHP OC_Helper::imagePath怎么用?PHP OC_Helper::imagePath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OC_Helper
的用法示例。
在下文中一共展示了OC_Helper::imagePath方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array_keys
// apps from external repo via OCS
$categoryNames = OC_OCSClient::getCategories();
if (is_array($categoryNames)) {
$categories = array_keys($categoryNames);
$page = 0;
$filter = 'approved';
$externalApps = OC_OCSClient::getApplications($categories, $page, $filter);
foreach ($externalApps as $app) {
// show only external apps that aren't enabled yet
$local = false;
foreach ($enabledApps as $a) {
if ($a == $app['name']) {
$local = true;
}
}
if (!$local) {
if ($app['preview'] == '') {
$pre = OC_Helper::imagePath('settings', 'trans.png');
} else {
$pre = $app['preview'];
}
if ($app['label'] == 'recommended') {
$label = '3rd Party';
} else {
$label = 'Recommended';
}
$apps[] = array('name' => $app['name'], 'id' => $app['id'], 'active' => false, 'description' => $app['description'], 'author' => $app['personid'], 'license' => $app['license'], 'preview' => $pre, 'internal' => false, 'internallabel' => $label, 'update' => false);
}
}
}
OCP\JSON::success(array('type' => 'external', 'data' => $apps));
示例2: foreach
/**
* ownCloud - Internal Bookmarks plugin
*
* @author Xavier Beurois
* @copyright 2012 Xavier Beurois www.djazz-lab.net
*
* 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 Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
OC::$CLASSPATH['OC_IntBks'] = 'apps/internal_bookmarks/lib/intbks.class.php';
OC_App::register(array('order' => 70, 'id' => 'internal_bookmarks', 'name' => 'Internal Bookmarks'));
OC_Util::addScript("internal_bookmarks", "actlink.min");
$i = 0;
foreach (OC_IntBks::getAllItemsByUser() as $item) {
OC_App::addNavigationEntry(array('id' => 'internal_bookmarks_index_' . $item['bkid'], 'order' => 70 + $item['bkorder'] / 100, 'href' => OC_Helper::linkTo('files', 'index.php?dir=' . $item['bktarget']), 'icon' => OC_Helper::imagePath('internal_bookmarks', 'star_on.png'), 'name' => $item['bktitle']));
$i++;
}
if ($i > 0) {
OC_App::registerPersonal('internal_bookmarks', 'settings');
}
示例3: image_path
/**
* make OC_Helper::imagePath available as a simple function
* @param string $app app
* @param string $image image
* @return string link to the image
*
* For further information have a look at OC_Helper::imagePath
*/
function image_path($app, $image)
{
return OC_Helper::imagePath($app, $image);
}
示例4:
<?php
/**
* Copyright (c) 2011 Marvin Thomas Rabe <m.rabe@echtzeitraum.de>
* Copyright (c) 2011 Arthur Schiwon <blizzz@arthur-schiwon.de>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
OC_App::register(array('order' => 70, 'id' => 'bookmark', 'name' => 'Bookmarks'));
OC_App::addNavigationEntry(array('id' => 'bookmarks_index', 'order' => 70, 'href' => OC_Helper::linkTo('bookmarks', 'index.php'), 'icon' => OC_Helper::imagePath('bookmarks', 'bookmarks.png'), 'name' => 'Bookmarks'));
OC_App::registerPersonal('bookmarks', 'settings');
开发者ID:Teino1978-Corp,项目名称:Teino1978-Corp-owncloud_.htaccess-,代码行数:12,代码来源:owncloud_apps_bookmarks_appinfo_app.php
示例5: foreach
continue;
}
if (OC_Appconfig::getValue($app, 'enabled', 'no') == 'yes') {
$active = true;
} else {
$active = false;
}
$info['active'] = $active;
if (isset($info['shipped']) and $info['shipped'] == 'true') {
$info['internal'] = true;
$info['internallabel'] = 'Internal App';
} else {
$info['internal'] = false;
$info['internallabel'] = '3rd Party App';
}
$info['preview'] = OC_Helper::imagePath('settings', 'trans.png');
$info['version'] = OC_App::getAppVersion($app);
$appList[] = $info;
}
}
$remoteApps = OC_App::getAppstoreApps();
if ($remoteApps) {
// Remove duplicates
foreach ($appList as $app) {
foreach ($remoteApps as $key => $remote) {
if ($app['name'] == $remote['name']) {
unset($remoteApps[$key]);
}
}
}
$combinedApps = array_merge($appList, $remoteApps);
示例6:
<?php
/**
* ownCloud - News app
*
* @author Alessandro Cosentino
* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com>
*
* This file is licensed under the Affero General Public License version 3 or later.
* See the COPYING-README file
*
*/
OC::$CLASSPATH['OCA\\News\\StatusFlag'] = 'apps/news/lib/item.php';
OC::$CLASSPATH['OCA\\News\\Item'] = 'apps/news/lib/item.php';
OC::$CLASSPATH['OCA\\News\\Collection'] = 'apps/news/lib/collection.php';
OC::$CLASSPATH['OCA\\News\\Feed'] = 'apps/news/lib/feed.php';
OC::$CLASSPATH['OCA\\News\\Folder'] = 'apps/news/lib/folder.php';
OC::$CLASSPATH['OCA\\News\\FeedType'] = 'apps/news/lib/feedtypes.php';
OC::$CLASSPATH['OCA\\News\\FeedMapper'] = 'apps/news/lib/feedmapper.php';
OC::$CLASSPATH['OCA\\News\\ItemMapper'] = 'apps/news/lib/itemmapper.php';
OC::$CLASSPATH['OCA\\News\\FolderMapper'] = 'apps/news/lib/foldermapper.php';
OC::$CLASSPATH['OCA\\News\\Utils'] = 'apps/news/lib/utils.php';
OC::$CLASSPATH['OC_Search_Provider_News'] = 'apps/news/lib/search.php';
OC::$CLASSPATH['OCA\\News\\Backgroundjob'] = 'apps/news/lib/backgroundjob.php';
OCP\Backgroundjob::addRegularTask('OCA\\News\\Backgroundjob', 'run');
OC::$CLASSPATH['OCA\\News\\Share_Backend_News_Item'] = 'apps/news/lib/share/item.php';
OCP\App::addNavigationEntry(array('id' => 'news', 'order' => 74, 'href' => OC_Helper::linkTo('news', 'index.php'), 'icon' => OC_Helper::imagePath('news', 'icon.svg'), 'name' => OC_L10N::get('news')->t('News')));
OC_Search::registerProvider('OC_Search_Provider_News');
OCP\Share::registerBackend('news_item', 'OCA\\News\\Share_Backend_News_Item');
示例7: print_unescaped
<img class="app-icon svg" alt="" src="<?php print_unescaped($entry['icon']); ?>">
<div class="icon-loading-dark" style="display:none;"></div>
<span>
<?php p($entry['name']); ?>
</span>
</a>
</li>
<?php endforeach; ?>
<?php
/* show "More apps" link to app administration directly in app navigation, as last entry */
if(OC_User::isAdminUser(OC_User::getUser())):
?>
<li id="apps-management">
<a href="<?php print_unescaped(\OC::$server->getURLGenerator()->linkToRoute('settings.AppSettings.viewApps')); ?>" tabindex="4"
<?php if( $_['appsmanagement_active'] ): ?> class="active"<?php endif; ?>>
<img class="app-icon svg" alt="" src="<?php print_unescaped(OC_Helper::imagePath('settings', 'apps.svg')); ?>">
<div class="icon-loading-dark" style="display:none;"></div>
<span>
<?php p($l->t('Apps')); ?>
</span>
</a>
</li>
<?php endif; ?>
</ul>
</div>
</div></nav>
<div id="content-wrapper">
<div id="content" class="app-<?php p($_['appid']) ?>" role="main">
<?php print_unescaped($_['content']); ?>
示例8: getAppstoreApps
/**
* @brief: get a list of all apps on apps.owncloud.com
* @return array, multi-dimensional array of apps.
* Keys: id, name, type, typename, personid, license, detailpage, preview, changed, description
*/
public static function getAppstoreApps($filter = 'approved')
{
$categoryNames = OC_OCSClient::getCategories(\OC_Util::getVersion());
if (is_array($categoryNames)) {
// Check that categories of apps were retrieved correctly
if (!($categories = array_keys($categoryNames))) {
return false;
}
$page = 0;
$remoteApps = OC_OCSClient::getApplications($categories, $page, $filter, \OC_Util::getVersion());
$app1 = array();
$i = 0;
foreach ($remoteApps as $app) {
$app1[$i] = $app;
$app1[$i]['author'] = $app['personid'];
$app1[$i]['ocs_id'] = $app['id'];
$app1[$i]['internal'] = $app1[$i]['active'] = 0;
$app1[$i]['update'] = false;
if ($app['label'] == 'recommended') {
$app1[$i]['internallabel'] = 'Recommended';
$app1[$i]['internalclass'] = 'recommendedapp';
} else {
$app1[$i]['internallabel'] = '3rd Party';
$app1[$i]['internalclass'] = 'externalapp';
}
// rating img
if ($app['score'] >= 0 and $app['score'] < 5) {
$img = OC_Helper::imagePath("core", "rating/s1.png");
} elseif ($app['score'] >= 5 and $app['score'] < 15) {
$img = OC_Helper::imagePath("core", "rating/s2.png");
} elseif ($app['score'] >= 15 and $app['score'] < 25) {
$img = OC_Helper::imagePath("core", "rating/s3.png");
} elseif ($app['score'] >= 25 and $app['score'] < 35) {
$img = OC_Helper::imagePath("core", "rating/s4.png");
} elseif ($app['score'] >= 35 and $app['score'] < 45) {
$img = OC_Helper::imagePath("core", "rating/s5.png");
} elseif ($app['score'] >= 45 and $app['score'] < 55) {
$img = OC_Helper::imagePath("core", "rating/s6.png");
} elseif ($app['score'] >= 55 and $app['score'] < 65) {
$img = OC_Helper::imagePath("core", "rating/s7.png");
} elseif ($app['score'] >= 65 and $app['score'] < 75) {
$img = OC_Helper::imagePath("core", "rating/s8.png");
} elseif ($app['score'] >= 75 and $app['score'] < 85) {
$img = OC_Helper::imagePath("core", "rating/s9.png");
} elseif ($app['score'] >= 85 and $app['score'] < 95) {
$img = OC_Helper::imagePath("core", "rating/s10.png");
} elseif ($app['score'] >= 95 and $app['score'] < 100) {
$img = OC_Helper::imagePath("core", "rating/s11.png");
}
$app1[$i]['score'] = '<img src="' . $img . '"> Score: ' . $app['score'] . '%';
$i++;
}
}
if (empty($app1)) {
return false;
} else {
return $app1;
}
}
示例9:
/**
* ownCloud - ocDownloader plugin
*
* @author Xavier Beurois
* @copyright 2012 Xavier Beurois www.djazz-lab.net
*
* 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 Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
$app_id = 'ocdownloader';
OC_Util::checkAppEnabled($app_id);
OC::$CLASSPATH['OC_ocDownloader'] = 'apps/' . $app_id . '/lib/ocDownloader.class.php';
OC::$CLASSPATH['OC_ocDownloaderFile'] = 'apps/' . $app_id . '/lib/ocDownloaderFile.class.php';
if (OC_ocDownloader::isUpToDate(OC_Appconfig::getValue($app_id, 'installed_version'))) {
OC_ocDownloader::initProviders(dirname(__FILE__) . '/providers.xml');
}
OC_App::register(array('order' => 30, 'id' => $app_id, 'name' => 'ocDownloader'));
OC_App::addNavigationEntry(array('id' => $app_id . '_index', 'order' => 30, 'href' => OC_Helper::linkTo($app_id, 'downloader.php'), 'icon' => OC_Helper::imagePath($app_id, 'dl.png'), 'name' => 'ocDownloader'));
OC_App::registerPersonal($app_id, 'personalsettings');
示例10: foreach
foreach ($_['sc_sort'] as $sc_sort) {
if (strcmp($sc_sort, 'cpie_rfsus') == 0) {
$sc_sort_title = 'Current ratio free space / used space';
} elseif (strcmp($sc_sort, 'clines_usse') == 0) {
$sc_sort_title = 'Daily Used Space Evolution';
} else {
$sc_sort_title = 'Monthly Used Space Evolution';
}
if ($_['c_disp'][$sc_sort]) {
?>
<div id="<?php
print $sc_sort;
?>
" class="personalblock">
<h3><img src="<?php
print OC_Helper::imagePath('storage_charts', 'move.png');
?>
" /><?php
print $l->t($sc_sort_title) . ' ' . $l->t('for');
?>
"<?php
print OC_Group::inGroup(OC_User::getUser(), 'admin') ? $l->t('all users') : OC_User::getUser();
?>
"</h3>
<div id="<?php
print substr($sc_sort, 1);
?>
" style="max-width:100%;height:400px;margin:0 auto"></div>
<script type="text/javascript">$(document).ready(function() {<?php
print OC_DLStChartsLoader::loadChart($sc_sort, $l);
?>
示例11: function
print $p['pr_id'];
?>
" value="<?php
print !is_null($p['us_id']) ? $p['us_username'] : '';
?>
" placeholder="Username" /><input type="password" name="ocdownloader_pr_pw_<?php
print $p['pr_id'];
?>
" id="ocdownloader_pr_pw_<?php
print $p['pr_id'];
?>
" value="<?php
print !is_null($p['us_id']) ? $p['us_password'] : '';
?>
" placeholder="Password" /><?php
print !is_null($p['us_id']) ? '<img class="ocdownloader-delete" src="' . OC_Helper::imagePath('ocdownloader', 'delete.png') . '" rel="' . $p['pr_id'] . '" style="margin-left:10px" />' : '';
?>
</div>
<?php
}
?>
<input type="submit" value="Save" />
</fieldset>
</form>
<script type="text/javascript">
$(document).ready(function() {
$('.ocdownloader-delete').bind('click', function() {
$('#ocdownloader_pr_un_' + $(this).attr('rel')).val('');
$('#ocdownloader_pr_pw_' + $(this).attr('rel')).val('');
});
});
示例12: OC_L10N
*
* @author Xavier Beurois
* @copyright 2012 Xavier Beurois www.djazz-lab.net
*
* 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 Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
OC_Util::checkAppEnabled('storage_charts');
OC::$CLASSPATH['OC_DLStCharts'] = "apps/storage_charts/lib/db.class.php";
OC::$CLASSPATH['OC_DLStChartsLoader'] = "apps/storage_charts/lib/loader.class.php";
$l = new OC_L10N('storage_charts', OC_L10N::findLanguage(array('en', 'fr')));
OC_App::register(array('order' => 60, 'id' => 'storage_charts', 'name' => 'Storage Charts'));
OC_App::addNavigationEntry(array('id' => 'storage_charts', 'order' => 60, 'href' => OC_Helper::linkTo('storage_charts', 'charts.php'), 'icon' => OC_Helper::imagePath('storage_charts', 'chart.png'), 'name' => 'DL Charts'));
OC_App::registerPersonal('storage_charts', 'settings');
$data_dir = OC_Config::getValue('datadirectory', '');
if (OC_User::getUser() && strlen($data_dir) != 0) {
$used = OC_DLStCharts::getTotalDataSize(OC::$CONFIG_DATADIRECTORY);
$total = OC_DLStCharts::getTotalDataSize($data_dir) + OC_Filesystem::free_space();
OC_DLStCharts::update($used, $total);
}
示例13: OC_L10N
<?php
/**
* ownCloud - media plugin
*
* @author Robin Appelman
* @copyright 2010 Robin Appelman icewind1991@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 Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/
*
*/
$l = new OC_L10N('media');
require_once 'apps/media/lib_media.php';
OC_Util::addScript('media', 'loader');
OC_APP::registerPersonal('media', 'settings');
OC_App::register(array('order' => 3, 'id' => 'media', 'name' => 'Media'));
OC_App::addNavigationEntry(array('id' => 'media_index', 'order' => 2, 'href' => OC_Helper::linkTo('media', 'index.php'), 'icon' => OC_Helper::imagePath('core', 'places/music.svg'), 'name' => $l->t('Music')));
开发者ID:Teino1978-Corp,项目名称:Teino1978-Corp-owncloud_.htaccess-,代码行数:28,代码来源:owncloud_apps_media_appinfo_app.php
示例14:
<?php
/**
* register the page of admin settings form
*/
OC_App::registerAdmin('neurocloud', 'settings');
/**
* register the navigation entry
*/
OC_App::addNavigationEntry(array('id' => 'neurocloud_index', 'order' => 74, 'href' => OC_Helper::linkTo('neurocloud', 'index.php'), 'icon' => OC_Helper::imagePath('neurocloud', 'neurocloud.png'), 'name' => 'Neurocloud'));
/**
* register the classpath
*/
OC::$CLASSPATH["OC_Neurocloud"] = "apps/neurocloud/lib/hooks.php";
/**
* register the hooks for file writing
*
* NOTE: to make sure that the hooks are called everytime that a file is written, the application
* must be registered with type "filesystem". Otherwise, those hooks will be called only when uploading from the web interface
*
* to register the application as a filesystem type, put in info.xml *
* <types><filesystem/></types>
*
*/
#OC_Hook::connect(OC\Files\Filesystem::CLASSNAME, OC\Files\Filesystem::signal_write, "OC_Neurocloud", "beforeFileWrite");
#OC_Hook::connect(OC\Files\Filesystem::CLASSNAME, OC\Files\Filesystem::signal_post_write, "OC_Neurocloud", "afterFileWrite");
OC_Hook::connect(OC\Files\Filesystem::CLASSNAME, 'post_delete', "OC_Neurocloud", "fileDeleted");
OC_Hook::connect(OC\Files\Filesystem::CLASSNAME, OC\Files\Filesystem::signal_post_rename, "OC_Neurocloud", "fileRenamed");
// hooks for delete/rename, do not allow deleting of directory if there is a running job
OC_Hook::connect(OC\Files\Filesystem::CLASSNAME, OC\Files\Filesystem::signal_delete, "OC_Neurocloud", "beforeFileRenameDelete");
OC_Hook::connect(OC\Files\Filesystem::CLASSNAME, OC\Files\Filesystem::signal_rename, "OC_Neurocloud", "beforeFileRenameDelete");
示例15:
echo $l->t('Add bookmark');
?>
"/>
</div>
<div class="bookmarks_add">
<input type="hidden" id="bookmark_add_id" value="0" />
<p><label class="bookmarks_label"><?php
echo $l->t('Address');
?>
</label><input type="text" id="bookmark_add_url" class="bookmarks_input" /></p>
<p><label class="bookmarks_label"><?php
echo $l->t('Title');
?>
</label><input type="text" id="bookmark_add_title" class="bookmarks_input" />
<img class="loading_meta" src="<?php
echo OC_Helper::imagePath('core', 'loading.gif');
?>
" /></p>
<p><label class="bookmarks_label"><?php
echo $l->t('Tags');
?>
</label><input type="text" id="bookmark_add_tags" class="bookmarks_input" /></p>
<p><label class="bookmarks_label"> </label><label class="bookmarks_hint"><?php
echo $l->t('Hint: Use space to separate tags.');
?>
</label></p>
<p><label class="bookmarks_label"></label><input type="submit" value="<?php
echo $l->t('Add bookmark');
?>
" id="bookmark_add_submit" /></p>
</div>
开发者ID:Teino1978-Corp,项目名称:Teino1978-Corp-owncloud_.htaccess-,代码行数:31,代码来源:owncloud_apps_bookmarks_templates_list.php