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


PHP Util::linkToAbsolute方法代码示例

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


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

示例1: showFooter

    public static function showFooter()
    {
        echo '
                    <script src="' . \OCP\Util::linkToAbsolute('revealjs', 'js/reveal.js') . '"></script>
                    <script src="' . \OCP\Util::linkToAbsolute('revealjs', 'js/head.min.js') . '"></script>
                        <script>

                            Reveal.initialize({
                                // Display controls in the bottom right corner
                                controls: true,

                                // Display a presentation progress bar
                                progress: true,

                                // Push each slide change to the browser history
                                history: false,

                                // Enable keyboard shortcuts for navigation
                                keyboard: true,

                                // Enable the slide overview mode
                                overview: true,

                                // Loop the presentation
                                loop: false,

                                // Number of milliseconds between automatically proceeding to the 
                                // next slide, disabled when set to 0
                                autoSlide: 0,

                                // Enable slide navigation via mouse wheel
                                mouseWheel: true,

                                // Apply a 3D roll to links on hover
                                rollingLinks: true,

                                // Transition style
                                // default/cube/page/concave/linear(2d)
                                transition: "default"
                            });
                        </script>

                        </body>
                    </html>
		';
    }
开发者ID:diogosantos89,项目名称:owncloud,代码行数:46,代码来源:reveal.php

示例2: addNotificationsForUser

 protected function addNotificationsForUser($user, $subject, $subjectParams, $path, $isFile, $streamSetting, $emailSetting, $type = Files_Sharing::TYPE_SHARED, $priority = IExtension::PRIORITY_MEDIUM)
 {
     if (!$streamSetting && !$emailSetting) {
         return;
     }
     $selfAction = $user === $this->currentUser;
     $app = $type === Files_Sharing::TYPE_SHARED ? 'sharing_group' : 'files';
     $link = Util::linkToAbsolute('files', 'index.php', array('dir' => $isFile ? dirname($path) : $path));
     // Add activity to stream
     if ($streamSetting && (!$selfAction || $this->userSettings->getUserSetting($this->currentUser, 'setting', 'self'))) {
         $this->activityData->send($app, $subject, $subjectParams, '', array(), $path, $link, $user, $type, $priority);
     }
     // Add activity to mail queue
     if ($emailSetting && (!$selfAction || $this->userSettings->getUserSetting($this->currentUser, 'setting', 'selfemail'))) {
         $latestSend = time() + $emailSetting;
         $this->activityData->storeMail($app, $subject, $subjectParams, $user, $type, $latestSend);
     }
 }
开发者ID:inwinstack,项目名称:owncloud-sharing_group,代码行数:18,代码来源:fileshooks.php

示例3: index

	/**
	 * @NoAdminRequired
	 * @NoCSRFRequired
	 */
	public function index () {
		$mboxes = array(
			'PNLConversations' => array(
				'label' => 'Conversations',
				'phoneNumbers' => $this->smsMapper->getAllPeersPhoneNumbers($this->userId),
				'url' => \OCP\Util::linkToAbsolute('index.php', 'apps/ocsms/', array('feed' => 'conversations'))
			),
			'PNLDrafts' => array(
				'label' => 'Drafts',
				'phoneNumbers' => array(),
				'url' => \OCP\Util::linkToAbsolute('index.php', 'apps/ocsms/', array('feed' => 'drafts'))
			)
		);

		$params = array('user' => $this->userId,
			'mailboxes' => $mboxes
		);
		return new TemplateResponse($this->appName, 'main', $params);
	}
开发者ID:ArcherSys,项目名称:ArcherSysOSCloud7,代码行数:23,代码来源:smscontroller.php

示例4: showFooter

    public static function showFooter()
    {
        echo '
		
                            <div class="hint">
                                <p>Make full screen and use a space bar or arrow keys to navigate</p>
                            </div>
                            <script>
                                if ("ontouchstart" in document.documentElement) { 
                                        document.querySelector(".hint").innerHTML = "<p>Tap on the left or right to navigate</p>";
                                }
                            </script>
                            <script src="' . \OCP\Util::linkToAbsolute('impressionist', 'js/impress.js') . '"></script>
                            <script>impress().init();</script>		
                            <script>
                            </script>
		
		</body></html>
		';
    }
开发者ID:netcon-source,项目名称:apps,代码行数:20,代码来源:impressionist.php

示例5: intval

 */
// check if the user has the right permissions to access the activities
OCP\User::checkLoggedIn();
OCP\App::checkAppEnabled('activity');
// activate the right navigation entry
OCP\App::setActiveNavigationEntry('activity');
// load the needed js scripts and css
OCP\Util::addScript('activity', 'jquery.masonry.min');
OCP\Util::addScript('activity', 'jquery.infinitescroll.min');
OCP\Util::addScript('activity', 'script');
OCP\Util::addStyle('activity', 'style');
// get the page that is requested. Needed for endless scrolling
if (isset($_GET['page'])) {
    $page = intval($_GET['page']) - 1;
} else {
    $page = 0;
}
// get rss url
$rsslink = \OCP\Util::linkToAbsolute('activity', 'rss.php');
$nextpage = \OCP\Util::linkToAbsolute('activity', 'index.php', array('page' => $page + 2));
// read activities data
$count = 30;
$activity = OCA\Activity\Data::read($page * $count, 30);
// show activity template
$tmpl = new \OCP\Template('activity', 'list', 'user');
$tmpl->assign('rsslink', $rsslink);
$tmpl->assign('activity', $activity);
if ($page == 0) {
    $tmpl->assign('nextpage', $nextpage);
}
$tmpl->printPage();
开发者ID:omusico,项目名称:isle-web-framework,代码行数:31,代码来源:index.php

示例6: p

 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 */

// This script we have to wrap in a class to pretend it to override t()
// and possibly other functions or variables. See below.
//\OCP\Util::addScript('secure_container', '3rdparty/sjcl/sjcl');

\OCP\Util::addScript('secure_container', 'container');
\OCP\Util::addScript('secure_container', 'navigation');
\OCP\Util::addScript('secure_container', 'app');

\OCP\Util::addStyle('secure_container', 'style');
$l = \OC_L10N::get('secure_container');
?>

<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>
开发者ID:ArcherSys,项目名称:ArcherSysOSCloud7,代码行数:31,代码来源:main.php

示例7: header

    if (sizeof($users) !== 1) {
        // User not found
        header('HTTP/1.0 404 Not Found');
        exit;
    }
    // Token found login as that user
    \OC_User::setUserId(array_shift($users));
    $forceUserLogout = true;
}
// check if the user has the right permissions.
\OCP\User::checkLoggedIn();
// rss is of content type text/xml
if (isset($_SERVER['HTTP_ACCEPT']) && stristr($_SERVER['HTTP_ACCEPT'], 'application/rss+xml')) {
    header('Content-Type: application/rss+xml');
} else {
    header('Content-Type: text/xml; charset=UTF-8');
}
// generate and show the rss feed
$l = \OCP\Util::getL10N('activity');
$data = new \OCA\Activity\Data(\OC::$server->getActivityManager());
$groupHelper = new \OCA\Activity\GroupHelper(\OC::$server->getActivityManager(), new \OCA\Activity\DataHelper(\OC::$server->getActivityManager(), new \OCA\Activity\ParameterHelper(new \OC\Files\View(''), $l), $l), false);
$tmpl = new \OCP\Template('activity', 'rss');
$tmpl->assign('rssLang', \OC_Preferences::getValue(\OCP\User::getUser(), 'core', 'lang'));
$tmpl->assign('rssLink', \OCP\Util::linkToAbsolute('activity', 'rss.php'));
$tmpl->assign('rssPubDate', date('r'));
$tmpl->assign('user', \OCP\User::getUser());
$tmpl->assign('activities', $data->read($groupHelper, 0, 30, 'all'));
$tmpl->printPage();
if ($forceUserLogout) {
    \OC_User::logout();
}
开发者ID:CDN-Sparks,项目名称:owncloud,代码行数:31,代码来源:rss.php

示例8: foreach

<?php

// show toolbar
echo '<div id="controls">	
	<a href="' . \OCP\Util::linkToAbsolute('impress', 'documentation.php') . '" class="button docu">' . $l->t('Documentation') . '</a>
	</div>
	';
if (empty($_['list'])) {
    echo '<div id="emptyfolder">' . $l->t('No Impress files are found in your ownCloud. Please upload a .impress file.') . '</div>';
} else {
    echo '<table class="impresslist" >';
    foreach ($_['list'] as $entry) {
        echo '<tr><td width="1"><a target="_blank" href="' . \OCP\Util::linkToAbsolute('impress', 'player.php') . '&file=' . urlencode($entry['url']) . '&name=' . urlencode($entry['name']) . '"><img align="left" src="' . \OCP\Util::linkToAbsolute('impress', 'img/impressbig.png') . '"></a></td><td><a target="_blank" href="' . \OCP\Util::linkToAbsolute('impress', 'player.php') . '&file=' . urlencode($entry['url']) . '&name=' . urlencode($entry['name']) . '">' . $entry['name'] . '</a></td><td>' . \OCP\Util::formatDate($entry['mtime']) . '</td><td>' . \OCP\Util::humanFileSize($entry['size']) . '</td></tr>';
    }
    echo '</table>';
}
开发者ID:blablubli,项目名称:owncloudapps,代码行数:16,代码来源:presentations.php

示例9: addNotificationsForUser

 /**
  * Adds the activity and email for a user when the settings require it
  *
  * @param string $user
  * @param string $subject
  * @param array $subjectParams
  * @param int $fileId
  * @param string $path
  * @param bool $isFile If the item is a file, we link to the parent directory
  * @param bool $streamSetting
  * @param int $emailSetting
  * @param string $type
  */
 protected function addNotificationsForUser($user, $subject, $subjectParams, $fileId, $path, $isFile, $streamSetting, $emailSetting, $type = Files_Sharing::TYPE_SHARED)
 {
     if (!$streamSetting && !$emailSetting) {
         return;
     }
     $selfAction = $user === $this->currentUser;
     $app = $type === Files_Sharing::TYPE_SHARED ? 'files_sharing' : 'files';
     $link = Util::linkToAbsolute('files', 'index.php', array('dir' => $isFile ? dirname($path) : $path));
     $objectType = $fileId ? 'files' : '';
     $event = $this->manager->generateEvent();
     $event->setApp($app)->setType($type)->setAffectedUser($user)->setAuthor($this->currentUser)->setTimestamp(time())->setSubject($subject, $subjectParams)->setObject($objectType, $fileId, $path)->setLink($link);
     // Add activity to stream
     if ($streamSetting && (!$selfAction || $this->userSettings->getUserSetting($this->currentUser, 'setting', 'self'))) {
         $this->activityData->send($event);
     }
     // Add activity to mail queue
     if ($emailSetting && (!$selfAction || $this->userSettings->getUserSetting($this->currentUser, 'setting', 'selfemail'))) {
         $latestSend = time() + $emailSetting;
         $this->activityData->storeMail($event, $latestSend);
     }
 }
开发者ID:arietimmerman,项目名称:activity,代码行数:34,代码来源:fileshooks.php

示例10:

 * 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/>
 *
 */
OC_Util::checkLoggedIn();
// Load the files we need
OC_Util::addStyle("settings", "settings");
\OC::$server->getNavigationManager()->setActiveEntry('help');
if (isset($_GET['mode']) and $_GET['mode'] === 'admin') {
    $url = \OCP\Util::linkToAbsolute('core', 'doc/admin/index.html');
    $style1 = '';
    $style2 = ' active';
} else {
    $url = \OCP\Util::linkToAbsolute('core', 'doc/user/index.html');
    $style1 = ' active';
    $style2 = '';
}
$url1 = \OC::$server->getURLGenerator()->linkToRoute('settings_help') . '?mode=user';
$url2 = \OC::$server->getURLGenerator()->linkToRoute('settings_help') . '?mode=admin';
$tmpl = new OC_Template("settings", "help", "user");
$tmpl->assign("admin", OC_User::isAdminUser(OC_User::getUser()));
$tmpl->assign("url", $url);
$tmpl->assign("url1", $url1);
$tmpl->assign("url2", $url2);
$tmpl->assign("style1", $style1);
$tmpl->assign("style2", $style2);
$tmpl->printPage();
开发者ID:rchicoli,项目名称:owncloud-core,代码行数:31,代码来源:help.php

示例11: getRedirectUri

 public static function getRedirectUri()
 {
     return \OCP\Util::linkToAbsolute(self::APP_ID, 'index.php');
 }
开发者ID:seanbradley28,项目名称:gsync,代码行数:4,代码来源:app.php

示例12: getLinkList

 /**
  * Get all items for the users we want to send an email to
  *
  * @return array Notification data (user => array of rows from the table)
  */
 protected function getLinkList()
 {
     $topEntries = array(array('id' => 'all', 'name' => (string) $this->l->t('All Activities'), 'url' => \OCP\Util::linkToAbsolute('activity', 'index.php')), array('id' => 'self', 'name' => (string) $this->l->t('Activities by you'), 'url' => \OCP\Util::linkToAbsolute('activity', 'index.php', array('filter' => 'self'))), array('id' => 'by', 'name' => (string) $this->l->t('Activities by others'), 'url' => \OCP\Util::linkToAbsolute('activity', 'index.php', array('filter' => 'by'))), array('id' => 'shares', 'name' => (string) $this->l->t('Shares'), 'url' => \OCP\Util::linkToAbsolute('activity', 'index.php', array('filter' => 'shares'))));
     $appFilterEntries = array(array('id' => 'files', 'name' => (string) $this->l->t('Files'), 'url' => \OCP\Util::linkToAbsolute('activity', 'index.php', array('filter' => 'files'))));
     return array('top' => $topEntries, 'apps' => $appFilterEntries);
 }
开发者ID:CDN-Sparks,项目名称:owncloud,代码行数:11,代码来源:navigation.php

示例13: linkToAbsolute

 /**
  * links to a file
  * @param string $file the name of the file
  * @param string $appName the name of the app, defaults to the current one
  * @deprecated replaced with linkToRoute()
  * @return string the url
  */
 public function linkToAbsolute($file, $appName = null)
 {
     if ($appName === null) {
         $appName = $this->appName;
     }
     return \OCP\Util::linkToAbsolute($appName, $file);
 }
开发者ID:hjimmy,项目名称:owncloud,代码行数:14,代码来源:api.php

示例14: p

<table cellspacing="0" cellpadding="0" border="0" width="100%">
	<tr><td>
		<table cellspacing="0" cellpadding="0" border="0" width="600px">
			<tr>
				<td bgcolor="<?php 
p($theme->getMailHeaderColor());
?>
" width="20px">&nbsp;</td>
				<td bgcolor="<?php 
p($theme->getMailHeaderColor());
?>
">
					<img src="<?php 
p(\OCP\Util::linkToAbsolute('', image_path('', 'logo-mail.gif')));
?>
" alt="<?php 
p($theme->getName());
?>
"/>
				</td>
			</tr>
			<tr><td colspan="2">&nbsp;</td></tr>
			<tr>
				<td width="20px">&nbsp;</td>
				<td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">
					<?php 
print_unescaped($l->t('Hello,<br><br>we would like to inform you that your ownCloud password for the client apps has been changed.<br><br>If you did not change your password, please contact us on du-support@cesnet.cz.<br><br>', array()));
// TRANSLATORS term at the end of a mail
p($l->t('Your CESNET Storage Department Team'));
?>
				</td>
开发者ID:mirekys,项目名称:user_shib,代码行数:31,代码来源:email.password_change.php

示例15: array_merge_recursive

OCP\Util::addScript('conversations', 'jquery.timeago');
OCP\Util::addstyle('conversations', 'style');
// add timeago translations
$lang = OC_L10N::findLanguage('conversations');
// TODO: may find a better solution than file_exists
if (in_array($lang, OC_L10N::findAvailableLanguages('conversations')) && file_exists('./apps/conversations/js/jquery.timeago.' . $lang . '.js')) {
    OCP\Util::addScript('conversations', 'jquery.timeago.' . $lang);
}
// rooms
$rooms = OC_Conversations::getRooms();
$updates = OC_Conversations::updateCheck();
$rooms = array_merge_recursive($rooms, $updates);
// get the page that is requested. Needed for endless scrolling
$count = 5;
if (isset($_GET['page'])) {
    $page = intval($_GET['page']) - 1;
} else {
    $page = 0;
}
$nextpage = \OCP\Util::linkToAbsolute('conversations', 'index.php', array('page' => $page + 2));
$tmpl = new OCP\Template('conversations', 'main', 'user');
if (!empty($rooms)) {
    $tmpl->assign('rooms', $rooms);
}
if ($page == 0) {
    $tmpl->assign('nextpage', $nextpage);
}
$room = OC_Conversations::getRoom();
$tmpl->assign('active_room', $room);
$tmpl->assign('conversation', OC_Conversations::getConversation($room, $page * $count, $count));
$tmpl->printPage();
开发者ID:efrainra,项目名称:OC-User-Conversations,代码行数:31,代码来源:index.php


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