当前位置: 首页>>代码示例>>PHP>>正文


PHP OC_Helper::linkToRemoteBase方法代码示例

本文整理汇总了PHP中OC_Helper::linkToRemoteBase方法的典型用法代码示例。如果您正苦于以下问题:PHP OC_Helper::linkToRemoteBase方法的具体用法?PHP OC_Helper::linkToRemoteBase怎么用?PHP OC_Helper::linkToRemoteBase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OC_Helper的用法示例。


在下文中一共展示了OC_Helper::linkToRemoteBase方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($renderas)
 {
     // Decide which page we show
     if ($renderas == 'user') {
         parent::__construct('core', 'layout.user');
         if (in_array(OC_APP::getCurrentApp(), array('settings', 'admin', 'help')) !== false) {
             $this->assign('bodyid', 'body-settings', false);
         } else {
             $this->assign('bodyid', 'body-user', false);
         }
         // Add navigation entry
         $navigation = OC_App::getNavigation();
         $this->assign('navigation', $navigation, false);
         $this->assign('settingsnavigation', OC_App::getSettingsNavigation(), false);
         foreach ($navigation as $entry) {
             if ($entry['active']) {
                 $this->assign('application', $entry['name'], false);
                 break;
             }
         }
     } else {
         if ($renderas == 'guest') {
             parent::__construct('core', 'layout.guest');
         } else {
             parent::__construct('core', 'layout.base');
         }
     }
     $apps_paths = array();
     foreach (OC_App::getEnabledApps() as $app) {
         $apps_paths[$app] = OC_App::getAppWebPath($app);
     }
     $this->assign('apps_paths', str_replace('\\/', '/', json_encode($apps_paths)), false);
     // Ugly unescape slashes waiting for better solution
     if (OC_Config::getValue('installed', false) && !OC_AppConfig::getValue('core', 'remote_core.css', false)) {
         OC_AppConfig::setValue('core', 'remote_core.css', '/core/minimizer.php');
         OC_AppConfig::setValue('core', 'remote_core.js', '/core/minimizer.php');
     }
     // Add the js files
     $jsfiles = self::findJavascriptFiles(OC_Util::$scripts);
     $this->assign('jsfiles', array(), false);
     if (!empty(OC_Util::$core_scripts)) {
         $this->append('jsfiles', OC_Helper::linkToRemoteBase('core.js', false));
     }
     foreach ($jsfiles as $info) {
         $root = $info[0];
         $web = $info[1];
         $file = $info[2];
         $this->append('jsfiles', $web . '/' . $file);
     }
     // Add the css files
     $cssfiles = self::findStylesheetFiles(OC_Util::$styles);
     $this->assign('cssfiles', array());
     if (!empty(OC_Util::$core_styles)) {
         $this->append('cssfiles', OC_Helper::linkToRemoteBase('core.css', false));
     }
     foreach ($cssfiles as $info) {
         $root = $info[0];
         $web = $info[1];
         $file = $info[2];
         $paths = explode('/', $file);
         $in_root = false;
         foreach (OC::$APPSROOTS as $app_root) {
             if ($root == $app_root['path']) {
                 $in_root = true;
                 break;
             }
         }
         if ($in_root) {
             $app = $paths[0];
             unset($paths[0]);
             $path = implode('/', $paths);
             $this->append('cssfiles', OC_Helper::linkTo($app, $path));
         } else {
             $this->append('cssfiles', $web . '/' . $file);
         }
     }
 }
开发者ID:ryanshoover,项目名称:core,代码行数:77,代码来源:templatelayout.php

示例2: testLinkToRemoteBase

 /**
  * @small
  * test linkToRemoteBase URL construction
  */
 public function testLinkToRemoteBase()
 {
     \OC::$WEBROOT = '';
     $result = \OC_Helper::linkToRemoteBase('webdav');
     $this->assertEquals('/remote.php/webdav', $result);
     \OC::$WEBROOT = '/owncloud';
     $result = \OC_Helper::linkToRemoteBase('webdav');
     $this->assertEquals('/owncloud/remote.php/webdav', $result);
 }
开发者ID:reverserob,项目名称:core,代码行数:13,代码来源:helper.php

示例3: url

<script id="addGroupTemplate" type="text/template">
	<div id="dialog-form" title="<?php 
echo $l->t('Add group');
?>
">
		<fieldset>
			<input type="text" name="name" id="name" />
		</fieldset>
	</div>
</script>

<script id="contactListItemTemplate" type="text/template">
	<tr class="contact" data-id="{id}">
		<td class="name"
			style="background: url('<?php 
echo OC_Helper::linkToRemoteBase('contactthumbnail');
?>
?id={id}')">
			<input type="checkbox" name="id" value="{id}" /><span class="nametext">{name}</span>
		</td>
		<td class="email">
			<a href="mailto:{email}">{email}</a>
			<a class="mailto hidden" title="<?php 
echo $l->t('Compose mail');
?>
"></a>
		</td>
		<td class="tel">{tel}</td>
		<td class="adr">{adr}</td>
		<td class="categories">{categories}</td>
	</tr>
开发者ID:noldmess,项目名称:apps,代码行数:31,代码来源:contacts.php

示例4: __construct

 public function __construct($renderas)
 {
     // Decide which page we show
     if ($renderas == 'user') {
         parent::__construct('core', 'layout.user');
         if (in_array(OC_APP::getCurrentApp(), array('settings', 'admin', 'help')) !== false) {
             $this->assign('bodyid', 'body-settings');
         } else {
             $this->assign('bodyid', 'body-user');
         }
         // Update notification
         if (OC_Config::getValue('updatechecker', true) === true) {
             $data = OC_Updater::check();
             if (isset($data['version']) && $data['version'] != '' and $data['version'] !== array() && OC_User::isAdminUser(OC_User::getUser())) {
                 $this->assign('updateAvailable', true);
                 $this->assign('updateVersion', $data['versionstring']);
                 $this->assign('updateLink', $data['web']);
             } else {
                 $this->assign('updateAvailable', false);
                 // No update available or not an admin user
             }
         } else {
             $this->assign('updateAvailable', false);
             // Update check is disabled
         }
         // Add navigation entry
         $this->assign('application', '', false);
         $navigation = OC_App::getNavigation();
         $this->assign('navigation', $navigation);
         $this->assign('settingsnavigation', OC_App::getSettingsNavigation());
         foreach ($navigation as $entry) {
             if ($entry['active']) {
                 $this->assign('application', $entry['name']);
                 break;
             }
         }
         $user_displayname = OC_User::getDisplayName();
         $this->assign('user_displayname', $user_displayname);
         $this->assign('user_uid', OC_User::getUser());
         $this->assign('enableAvatars', \OC_Config::getValue('enable_avatars', true));
     } else {
         if ($renderas == 'guest' || $renderas == 'error') {
             parent::__construct('core', 'layout.guest');
         } else {
             parent::__construct('core', 'layout.base');
         }
     }
     $versionParameter = '?v=' . md5(implode(OC_Util::getVersion()));
     // Add the js files
     $jsfiles = self::findJavascriptFiles(OC_Util::$scripts);
     $this->assign('jsfiles', array(), false);
     if (OC_Config::getValue('installed', false) && $renderas != 'error') {
         $this->append('jsfiles', OC_Helper::linkToRoute('js_config') . $versionParameter);
     }
     if (!empty(OC_Util::$coreScripts)) {
         $this->append('jsfiles', OC_Helper::linkToRemoteBase('core.js', false) . $versionParameter);
     }
     foreach ($jsfiles as $info) {
         $root = $info[0];
         $web = $info[1];
         $file = $info[2];
         $this->append('jsfiles', $web . '/' . $file . $versionParameter);
     }
     // Add the css files
     $cssfiles = self::findStylesheetFiles(OC_Util::$styles);
     $this->assign('cssfiles', array());
     if (!empty(OC_Util::$coreStyles)) {
         $this->append('cssfiles', OC_Helper::linkToRemoteBase('core.css', false) . $versionParameter);
     }
     foreach ($cssfiles as $info) {
         $root = $info[0];
         $web = $info[1];
         $file = $info[2];
         $this->append('cssfiles', $web . '/' . $file . $versionParameter);
     }
 }
开发者ID:omusico,项目名称:isle-web-framework,代码行数:76,代码来源:templatelayout.php

示例5: p

			<a href="mailto:{email}">{email}</a>
			<a class="svg mailto hidden" title="<?php 
p($l->t('Compose mail'));
?>
"></a>
		</td>
		<td class="tel">{tel}</td>
		<td class="adr">{adr}</td>
		<td class="categories">{categories}</td>
	</tr>
</script>

<script id="contactDragItemTemplate" type="text/template">
	<div class="dragContact" data-id="{id}"
		style="background: url('<?php 
print_unescaped(OC_Helper::linkToRemoteBase('contactthumbnail'));
?>
?id={id}')">
		{name}
	</div>
</script>

<script id="groupListItemTemplate" type="text/template">
	<h3 class="group" data-type="{type}" data-id="{id}">
		{name}
		<a class="action delete tooltipped rightwards" title="<?php 
p($l->t('Delete group'));
?>
"></a>
		<span class="action numcontacts">{num}</span>
	</h3>
开发者ID:CDN-Sparks,项目名称:owncloud,代码行数:31,代码来源:contacts.php

示例6: __construct

 public function __construct($renderas)
 {
     // Decide which page we show
     if ($renderas == 'user') {
         parent::__construct('core', 'layout.user');
         if (in_array(OC_APP::getCurrentApp(), array('settings', 'admin', 'help')) !== false) {
             $this->assign('bodyid', 'body-settings');
         } else {
             $this->assign('bodyid', 'body-user');
         }
         // Add navigation entry
         $this->assign('application', '', false);
         $navigation = OC_App::getNavigation();
         $this->assign('navigation', $navigation);
         $this->assign('settingsnavigation', OC_App::getSettingsNavigation());
         foreach ($navigation as $entry) {
             if ($entry['active']) {
                 $this->assign('application', $entry['name']);
                 break;
             }
         }
         $user_displayname = OC_User::getDisplayName();
         $this->assign('user_displayname', $user_displayname);
         $this->assign('user_uid', OC_User::getUser());
     } else {
         if ($renderas == 'guest' || $renderas == 'error') {
             parent::__construct('core', 'layout.guest');
         } else {
             parent::__construct('core', 'layout.base');
         }
     }
     $versionParameter = '?v=' . md5(implode(OC_Util::getVersion()));
     // Add the js files
     $jsfiles = self::findJavascriptFiles(OC_Util::$scripts);
     $this->assign('jsfiles', array(), false);
     if (OC_Config::getValue('installed', false) && $renderas != 'error') {
         $this->append('jsfiles', OC_Helper::linkToRoute('js_config') . $versionParameter);
     }
     if (!empty(OC_Util::$core_scripts)) {
         $this->append('jsfiles', OC_Helper::linkToRemoteBase('core.js', false) . $versionParameter);
     }
     foreach ($jsfiles as $info) {
         $root = $info[0];
         $web = $info[1];
         $file = $info[2];
         $this->append('jsfiles', $web . '/' . $file . $versionParameter);
     }
     // Add the css files
     $cssfiles = self::findStylesheetFiles(OC_Util::$styles);
     $this->assign('cssfiles', array());
     if (!empty(OC_Util::$core_styles)) {
         $this->append('cssfiles', OC_Helper::linkToRemoteBase('core.css', false) . $versionParameter);
     }
     foreach ($cssfiles as $info) {
         $root = $info[0];
         $web = $info[1];
         $file = $info[2];
         $paths = explode('/', $file);
         $in_root = false;
         foreach (OC::$APPSROOTS as $app_root) {
             if ($root == $app_root['path']) {
                 $in_root = true;
                 break;
             }
         }
         if ($in_root) {
             $app = $paths[0];
             unset($paths[0]);
             $path = implode('/', $paths);
             $this->append('cssfiles', OC_Helper::linkTo($app, $path) . $versionParameter);
         } else {
             $this->append('cssfiles', $web . '/' . $file . $versionParameter);
         }
     }
 }
开发者ID:CDN-Sparks,项目名称:owncloud,代码行数:75,代码来源:templatelayout.php


注:本文中的OC_Helper::linkToRemoteBase方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。