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


PHP Forum::private_messages_url方法代码示例

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


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

示例1: before

 /**
  * Construct controller
  */
 public function before()
 {
     parent::before();
     $this->page_title = __('Forum');
     // Generic page actions
     $this->page_actions['new-posts'] = array('link' => Route::url('forum'), 'text' => '<i class="icon-comment icon-white"></i> ' . __('New posts'));
     // Forum areas dropdown
     $groups = Model_Forum_Group::factory()->find_all();
     $areas = array();
     foreach ($groups as $group) {
         $divider = false;
         foreach ($group->areas() as $area) {
             if (Permission::has($area, Model_Forum_Area::PERMISSION_READ, self::$user)) {
                 $divider = true;
                 $areas[] = array('link' => Route::model($area), 'text' => HTML::entities($area->name));
             }
         }
         if ($divider) {
             $areas[] = array('divider' => true);
         }
     }
     array_pop($areas);
     $this->page_actions['areas'] = array('link' => Route::url('forum_group'), 'text' => '<i class="icon-folder-open icon-white"></i> ' . __('Areas'));
     $this->page_actions['area'] = array('link' => Route::url('forum_group'), 'text' => '', 'dropdown' => $areas);
     if (self::$user) {
         $this->page_actions['private-messages'] = array('link' => Forum::private_messages_url(), 'text' => '<i class="icon-envelope icon-white"></i> ' . __('Private messages'));
     }
 }
开发者ID:anqh,项目名称:forum,代码行数:31,代码来源:forum.php

示例2: defined

<?php

defined('SYSPATH') or die('No direct access allowed.');
/**
 * Site config
 *
 * @package    Anqh
 * @author     Antti Qvickström
 * @copyright  (c) 2010-2014 Antti Qvickström
 * @license    http://www.opensource.org/licenses/mit-license.php MIT license
 */
return array('site_name' => 'Anqh', 'image_server' => 'images.domain.tld', 'inviteonly' => false, 'email_contact' => 'noreply@domain.tld', 'email_invitation' => 'noreply@domain.tld', 'google_api_key' => false, 'google_analytics' => false, 'google_analytics_domain' => false, 'facebook' => false, 'og' => array('image' => null), 'foursquare_client_id' => null, 'foursquare_client_secret' => null, 'twitter_username' => null, 'share' => false, 'menu' => array('home' => array('url' => URL::site(), 'text' => __('Home'), 'icon' => 'fa fa-home', 'footer' => true), 'events' => array('url' => Route::url('events'), 'text' => __('Events'), 'icon' => 'fa fa-calendar'), 'forum' => array('url' => Route::url('forum'), 'text' => __('Forum'), 'icon' => 'fa fa-comments-o'), 'galleries' => array('url' => Route::url('galleries'), 'text' => __('Galleries'), 'icon' => 'fa fa-camera-retro'), 'music' => array('url' => Route::url('charts'), 'text' => __('Music'), 'icon' => 'fa fa-music'), 'blogs' => array('url' => Route::url('blogs'), 'text' => __('Blogs'), 'icon' => 'fa fa-book'), 'venues' => array('url' => Route::url('venues'), 'text' => __('Venues'), 'icon' => 'fa fa-map-marker'), 'members' => array('url' => Route::url('users'), 'text' => __('Members'), 'icon' => 'fa fa-group'), 'developers' => array('url' => Route::url('developers'), 'text' => __('Developers'), 'icon' => 'fa fa-gift', 'footer' => true), 'contact' => array('url' => Route::url('contact'), 'text' => __('Contact'), 'icon' => 'fa fa-envelope-o', 'footer' => true)), 'menu_visitor' => array('profile' => array('url' => URL::user(true), 'text' => __('Profile'), 'icon' => 'fa fa-fw fa-user'), 'messages' => array('url' => Forum::private_messages_url(), 'text' => __('Private messages'), 'icon' => 'fa fa-fw fa-envelope'), 'favorites' => array('url' => URL::user(true, 'favorites'), 'text' => __('Favorites'), 'icon' => 'fa fa-fw fa-heart'), 'friends' => array('url' => URL::user(true, 'friends'), 'text' => __('Friends'), 'icon' => 'fa fa-fw fa-group'), 'ignores' => array('url' => URL::user(true, 'ignores'), 'text' => __('Ignores'), 'icon' => 'fa fa-fw fa-ban'), 'settings' => array('url' => URL::user(true, 'settings'), 'text' => __('Settings'), 'icon' => 'fa fa-fw fa-cog'), 'signout' => array('url' => Route::url('sign', array('action' => 'out')), 'text' => __('Logout'), 'icon' => 'fa fa-fw fa-sign-out')), 'menu_admin' => array('roles' => array('url' => Route::url('roles'), 'text' => __('Roles'), 'icon' => 'fa fa-fw fa-asterisk'), 'tags' => array('url' => Route::url('tags'), 'text' => __('Tags'), 'icon' => 'fa fa-fw fa-tags'), 'profiler' => array('url' => '#debug', 'text' => __('Profiler'), 'icon' => 'fa fa-fw fa-signal', 'attributes' => array('onclick' => "\$('.kohana').toggle();"))), 'news' => array('forum_area_id' => 1, 'author_id' => 1), 'themes' => array('light' => array('name' => __('Light'), 'icon' => 'fa fa-fw fa-circle-o'), 'mixed' => array('name' => 'Mixed', 'icon' => 'fa fa-fw fa-adjust'), 'dark' => array('name' => __('Dark'), 'icon' => 'fa fa-fw fa-circle')), 'theme' => 'dark', 'ads' => array('enabled' => false, 'slots' => array('header' => 'head', 'side' => 'side_ads')), 'smiley' => array('dir' => 'smiley', 'smileys' => array()));
开发者ID:anqh,项目名称:anqh,代码行数:12,代码来源:site.php

示例3: _visitor

    /**
     * Render visitor.
     *
     * @return  string
     */
    protected function _visitor()
    {
        ob_start();
        /*
        // Sunrise
        if (self::$_user && self::$_user->latitude && self::$_user->longitude) {
        	$latitude  = self::$_user->latitude;
        	$longitude = self::$_user->longitude;
        } else {
        	$latitude  = 60.1829;
        	$longitude = 24.9549;
        }
        $sun = date_sun_info(time(), $latitude, $longitude);
        $sunrise = __(':day, week :week | Sunrise: :sunrise | Sunset: :sunset', array(
        	':day'     => strftime('%A'),
        	':week'    => strftime('%V'),
        	':sunrise' => Date::format(Date::TIME, $sun['sunrise']),
        	':sunset'  => Date::format(Date::TIME, $sun['sunset'])
        ));
        */
        ?>

	<nav id="visitor" class="navbar-text">
		<ul class="nav" role="menubar">
			<li class="menuitem-notifications"><span><?php 
        echo implode(' ', Anqh::notifications(self::$_user));
        ?>
</span></li>
			<li role="menuitem" class="menuitem-profile"><?php 
        echo HTML::avatar(self::$_user->avatar, self::$_user->username, true);
        ?>
</li>

			<li class="dropdown menu-me" role="menuitem" aria-haspopup="true">
				<a class="dropdown-toggle" href="#" data-toggle="dropdown"><?php 
        echo HTML::chars(self::$_user->username);
        ?>
 <b class="caret"></b></a>
				<ul class="dropdown-menu pull-right" role="menu">
					<li role="menuitem"><?php 
        echo HTML::anchor(URL::user(self::$_user->username), '<i class="icon-user icon-white"></i> ' . __('Profile'));
        ?>
<li>
					<li role="menuitem"><?php 
        echo HTML::anchor(Forum::private_messages_url(), '<i class="icon-envelope icon-white"></i> ' . __('Private messages'));
        ?>
</li>
					<li role="menuitem"><?php 
        echo HTML::anchor(URL::user(self::$_user, 'favorites'), '<i class="icon-calendar icon-white"></i> ' . __('Favorites'));
        ?>
</li>
					<li role="menuitem"><?php 
        echo HTML::anchor(URL::user(self::$_user, 'friends'), '<i class="icon-heart icon-white"></i> ' . __('Friends'));
        ?>
</li>
					<li role="menuitem"><?php 
        echo HTML::anchor(URL::user(self::$_user, 'ignores'), '<i class="icon-ban-circle icon-white"></i> ' . __('Ignores'));
        ?>
</li>
					<li role="menuitem"><?php 
        echo HTML::anchor(URL::user(self::$_user, 'settings'), '<i class="icon-cog icon-white"></i> ' . __('Settings'));
        ?>
</li>
					<?php 
        if (self::$_user->has_role('admin')) {
            ?>
					<li class="divider"></li>
					<li class="nav-header"><?php 
            echo __('Admin functions');
            ?>
</li>
					<li role="menuitem" class="admin"><?php 
            echo HTML::anchor(Route::url('roles'), '<i class="icon-asterisk icon-white"></i> ' . __('Roles'));
            ?>
</li>
					<li role="menuitem" class="admin"><?php 
            echo HTML::anchor(Route::url('tags'), '<i class="icon-tags icon-white"></i> ' . __('Tags'));
            ?>
</li>
					<li role="menuitem" class="admin"><?php 
            echo HTML::anchor('#debug', '<i class="icon-signal icon-white"></i> ' . __('Profiler'), array('onclick' => "\$('div.kohana').toggle();"));
            ?>
</li>
					<?php 
        }
        ?>
					<li class="divider"></li>
					<li role="menuitem">
						<?php 
        echo HTML::anchor(Route::url('sign', array('action' => 'out')), '<i class="icon-off icon-white"></i> ' . __('Sign out'));
        ?>
					</li>
				</ul>
			</li>

//.........这里部分代码省略.........
开发者ID:anqh,项目名称:core,代码行数:101,代码来源:page.php

示例4: action_index

 /**
  * Action: index
  */
 public function action_index()
 {
     // Go to post?
     $topic_id = (int) $this->request->param('topic_id');
     if ($topic_id) {
         $post_id = (int) $this->request->param('id');
     } else {
         $topic_id = (int) $this->request->param('id');
     }
     // Load topic
     /** @var  Model_Forum_Private_Topic|Model_Forum_Topic  $topic */
     $topic = $this->private ? Model_Forum_Private_Topic::factory($topic_id) : Model_Forum_Topic::factory($topic_id);
     if (!$topic->loaded()) {
         throw new Model_Exception($topic, $topic_id);
     }
     Permission::required($topic, Model_Forum_Topic::PERMISSION_READ);
     // Did we request single post with ajax?
     if (($this->ajax || $this->internal) && isset($post_id)) {
         $this->history = false;
         $post = $this->private ? Model_Forum_Private_Post::factory($post_id) : Model_Forum_Post::factory($post_id);
         if (!$post->loaded()) {
             throw new Model_Exception($topic, $topic_id);
         }
         // Permission is already checked by the topic, no need to check for post
         $this->response->body($this->section_post($topic, $post));
         return;
     }
     // Update counts
     if ($this->private) {
         $topic->mark_as_read(Visitor::$user);
     }
     if (!Visitor::$user || $topic->author_id != Visitor::$user->id) {
         $topic->read_count++;
         $topic->save();
     }
     // Build page
     $this->view = new View_Page();
     $this->view->title = $topic->name;
     $this->view->title_html = Forum::topic($topic);
     $this->view->subtitle = __($topic->post_count == 1 ? ':posts post' : ':posts posts', array(':posts' => Num::format($topic->post_count, 0)));
     $this->view->tab = 'topic';
     $this->page_actions['topic'] = array('link' => Route::model($topic), 'text' => __('Topic'));
     // Breadcrumbs
     $this->page_breadcrumbs[] = HTML::anchor(Route::url('forum'), __('Forum'));
     // Public topic extras
     if (!$this->private) {
         $this->page_breadcrumbs[] = HTML::anchor(Route::model($topic->area()), $topic->area()->name);
         // Quotes are supported only in public forum as we get notifications anyway in private
         if (Visitor::$user) {
             $quotes = Model_Forum_Quote::factory()->find_by_user(Visitor::$user);
             if (count($quotes)) {
                 foreach ($quotes as $quote) {
                     if ($topic->id == $quote->forum_topic_id) {
                         $quote->delete();
                         break;
                     }
                 }
             }
         }
         // Facebook
         Anqh::page_meta('title', $topic->name);
         Anqh::page_meta('url', URL::site(Route::url('forum_topic', array('id' => $topic->id, 'action' => '')), true));
         Anqh::share(true);
         // Model binding
         $area = $topic->area();
         if ($topic->bind_id && ($bind_config = $area->bind_config())) {
             if ($bind_model = $topic->bind_model()) {
                 // Set actions
                 $this->page_actions[] = array('link' => Route::model($bind_model), 'text' => $bind_config['link']);
                 /*					// Set views
                 					foreach ((array)$bind['view'] as $view) {
                 						$this->view->add(View_Page::COLUMN_RIGHT, View_Module::factory($view, array(
                 							$bind['model'] => $model,
                 						)), Widget::TOP);
                 					}*/
             }
         }
     } else {
         $this->page_breadcrumbs[] = HTML::anchor(Forum::private_messages_url(), __('Private messages'));
     }
     // Set actions
     if (Permission::has($topic, Model_Forum_Topic::PERMISSION_UPDATE)) {
         $this->view->actions[] = array('link' => Route::model($topic, 'edit'), 'text' => __('Edit topic'));
     }
     if (Permission::has($topic, Model_Forum_Topic::PERMISSION_POST)) {
         $this->view->actions[] = array('link' => Request::current_uri() . '#reply', 'text' => __('Reply to topic'), 'class' => 'btn btn-primary topic-post');
     }
     // Pagination
     $this->view->add(View_Page::COLUMN_CENTER, $pagination = $this->section_pagination($topic));
     $this->view->subtitle .= ', ' . __($pagination->total_pages == 1 ? ':pages page' : ':pages pages', array(':pages' => Num::format($pagination->total_pages, 0)));
     $this->view->subtitle .= ', ' . __($topic->read_count == 1 ? ':views view' : ':views views', array(':views' => Num::format($topic->read_count, 0)));
     // Go to post?
     if (isset($post_id)) {
         $pagination->item($topic->get_post_number($post_id) + 1);
         // We need to set pagination urls manually if jumped to a post
         $pagination->base_url = Route::model($topic);
     }
//.........这里部分代码省略.........
开发者ID:anqh,项目名称:anqh,代码行数:101,代码来源:topic.php

示例5: __

    }
    ?>

	<li class="menu-profile">
		<?php 
    echo HTML::avatar($user->avatar, $user->username, true);
    ?>
		<?php 
    echo __(':user <var class="uid">[#:id]</var>', array(':id' => $user->id, ':user' => HTML::user($user)));
    ?>
		<?php 
    echo HTML::anchor('#', '&#9660;', array('class' => 'toggler', 'onclick' => '$("#visitor .submenu").toggleClass("toggled"); return false;'));
    ?>
		<ul class="submenu">
			<li class="menu-messages"><?php 
    echo HTML::anchor(Forum::private_messages_url(), __('Private messages'), array('class' => 'icon private-message'));
    ?>
</li>
			<li class="menu-friends"><?php 
    echo HTML::anchor(URL::user($user, 'friends'), __('Friends'), array('class' => 'icon friends'));
    ?>
</li>
			<li class="menu-ignores"><?php 
    echo HTML::anchor(URL::user($user, 'ignores'), __('Ignores'), array('class' => 'icon ignores'));
    ?>
</li>
			<li class="menu-settings"><?php 
    echo HTML::anchor(URL::user($user, 'settings'), __('Settings'), array('class' => 'icon settings'));
    ?>
</li>
			<?php 
开发者ID:anqh,项目名称:core,代码行数:31,代码来源:visitor.php


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