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


PHP HabariDateTime::get_default_date_format方法代码示例

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


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

示例1: _e

        ?>
"><?php 
        echo $post->author->displayname;
        ?>
</a></span>
		<span class="date pct15"><span class="dim"><?php 
        _e('on');
        ?>
</span> <a href="<?php 
        URL::out('admin', array('page' => 'posts', 'type' => $post->content_type, 'year_month' => $post->pubdate->get('Y-m')));
        ?>
" title="<?php 
        _e('Search for other items from %s', array($post->pubdate->get('M, Y')));
        ?>
"><?php 
        $post->pubdate->out(HabariDateTime::get_default_date_format());
        ?>
</a></span>
		<span class="time pct10"><span class="dim"><?php 
        _e('at');
        ?>
 <?php 
        $post->pubdate->out(HabariDateTime::get_default_time_format());
        ?>
</span></span>

		<ul class="dropbutton">
			<?php 
        $actions = array('edit' => array('url' => URL::get('admin', 'page=publish&id=' . $post->id), 'title' => _t('Edit \'%s\'', array($post->title)), 'label' => _t('Edit'), 'permission' => 'edit'), 'view' => array('url' => $post->permalink . '?preview=1', 'title' => _t('View \'%s\'', array($post->title)), 'label' => _t('View')), 'remove' => array('url' => 'javascript:itemManage.remove(' . $post->id . ', \'post\');', 'title' => _t('Delete this item'), 'label' => _t('Delete'), 'permission' => 'delete'));
        $actions = Plugins::filter('post_actions', $actions, $post);
        foreach ($actions as $action) {
开发者ID:wwxgitcat,项目名称:habari,代码行数:31,代码来源:posts_items.php

示例2: _e

        ?>
"><?php 
        echo $comment->post->title;
        ?>
</a><span class="dim">'</span></span>
		<span class="date pct15"><span class="dim"><?php 
        _e('on');
        ?>
</span> <a href="<?php 
        URL::out('admin', array('page' => 'comments', 'status' => $comment->status, 'year' => $comment->date->year, 'month' => $comment->date->mon));
        ?>
" title="<?php 
        _e('Search for other comments from %s', array($comment->date->format('M, Y')));
        ?>
"><?php 
        $comment->date->out(HabariDateTime::get_default_date_format());
        ?>
</a></span>
		<span class="time pct10 dim"><?php 
        _e('at');
        ?>
 <span><?php 
        $comment->date->out(HabariDateTime::get_default_time_format());
        ?>
</span></span>

		<ul class="dropbutton">
			<?php 
        foreach ($comment->menu as $act_id => $action) {
            $url = str_replace('__commentid__', $comment->id, $action['url']);
            ?>
开发者ID:wwxgitcat,项目名称:habari,代码行数:31,代码来源:comments_items.php

示例3: if

	<div class="head clear">
		<?php if ( ACL::access_check( $post_permissions, 'delete' ) ) { ?>
		<span class="checkbox title pct5">
			<input type="checkbox" class="checkbox" name="checkbox_ids[<?php echo $post->id; ?>]" id="checkbox_ids[<?php echo $post->id; ?>]">
		</span>
		<?php } ?>
		<span class="checkbox title pct30">
			<?php if ( ACL::access_check( $post_permissions, 'edit' ) ) { ?>
				<a href="<?php echo URL::out('admin', 'page=publish&id=' . $post->id); ?>" class="title" title="<?php _e('Edit \'%s\'', array( Utils::htmlspecialchars( $post->title ) ) ) ?>"><?php echo ($post->title == '') ? '&nbsp;' : Utils::htmlspecialchars( $post->title ); ?></a>
			<?php } else { ?>
				<?php echo ($post->title == '') ? '&nbsp;' : Utils::htmlspecialchars( $post->title ); ?>
			<?php } ?>
		</span>
		<span class="state pct10"><a href="<?php URL::out('admin', array('page' => 'posts', 'type' => $post->content_type, 'status' => $post->status ) ); ?>" title="<?php _e('Search for other %s items', array( MultiByte::ucfirst( Plugins::filter( "post_status_display", $post->statusname ) ) ) ); ?>"><?php echo MultiByte::ucfirst( Plugins::filter( "post_status_display", $post->statusname ) ); ?></a></span>
		<span class="author pct20"><span class="dim"><?php _e('by'); ?></span> <a href="<?php URL::out('admin', array('page' => 'posts', 'user_id' => $post->user_id, 'type' => $post->content_type, 'status' => 'any') ); ?>" title="<?php _e('Search for other items by %s', array( $post->author->displayname ) ) ?>"><?php echo $post->author->displayname; ?></a></span>
		<span class="date pct15"><span class="dim"><?php _e('on'); ?></span> <a href="<?php URL::out('admin', array('page' => 'posts', 'type' => $post->content_type, 'year_month' => $post->pubdate->get('Y-m') ) ); ?>" title="<?php _e('Search for other items from %s', array( $post->pubdate->get( 'M, Y' ) ) ); ?>"><?php $post->pubdate->out( HabariDateTime::get_default_date_format() ); ?></a></span>
		<span class="time pct10"><span class="dim"><?php _e('at'); ?> <?php $post->pubdate->out( HabariDateTime::get_default_time_format()); ?></span></span>

		<ul class="dropbutton">
			<?php $actions = array(
				'edit' => array('url' => URL::get('admin', 'page=publish&id=' . $post->id), 'title' => sprintf( _t('Edit \'%s\''), $post->title ), 'label' => _t('Edit'), 'permission' => 'edit' ),
				'view' => array('url' => $post->permalink . '?preview=1', 'title' => sprintf( _t('View \'%s\''), $post->title ), 'label' => _t('View') ),
				'remove' => array('url' => 'javascript:itemManage.remove('. $post->id . ', \'post\');', 'title' => _t('Delete this item'), 'label' => _t('Delete'), 'permission' => 'delete' )
			);
			$actions = Plugins::filter('post_actions', $actions, $post);
			foreach( $actions as $action ) :
			?>
				<?php if ( !isset( $action['permission'] ) || ACL::access_check( $post_permissions, $action['permission'] ) ) { ?>
				<li><a href="<?php echo $action['url']; ?>" title="<?php echo $action['title']; ?>"><?php echo $action['label']; ?></a></li>
				<?php } ?>
			<?php endforeach; ?>
开发者ID:rynodivino,项目名称:system,代码行数:31,代码来源:posts_items.php

示例4: die

<?php

if (!defined('HABARI_PATH')) {
    die('No direct access');
}
?>
<div class="textual item"><?php 
$view_url = $comment->post->permalink . '#comment-' . $comment->id;
if ($comment->url != '') {
    printf(_t('<a href="%1$s">Comment</a> by ' . '<a href="%2$s" title="Visit %3$s">%3$s</a> ' . 'posted on <a href="%4$s" title="View post">%5$s</a> ' . 'at <strong>%6$s</strong> ' . 'on <strong>%7$s</strong>'), $view_url, $comment->url, $comment->name, $comment->post->permalink, $comment->post->title, $comment->date->get(HabariDateTime::get_default_time_format()), $comment->date->get(HabariDateTime::get_default_date_format()));
} else {
    printf(_t('<a href="%1$s">Comment</a> by ' . '<strong>%2$s</strong> ' . 'posted on <a href="%3$s" title="View post">%4$s</a> ' . 'at <strong>%5$s</strong> ' . 'on <strong>%6$s</strong>'), $view_url, $comment->name, $comment->post->permalink, $comment->post->title, $comment->date->get(HabariDateTime::get_default_time_format()), $comment->date->get(HabariDateTime::get_default_date_format()));
}
?>
</div>
开发者ID:wwxgitcat,项目名称:habari,代码行数:15,代码来源:comment.overview.php

示例5: _t

"><?php 
    echo $user->displayname;
    ?>
</a></span>
		</div>

		<div class="clear">
			<span class="nothing pct5">&nbsp;</span>
			<span class="aka pct90">

			<?php 
    if (!$user->info->authenticate_time) {
        $last_login_message = _t('has not logged in yet');
    } else {
        $last_login_message = _t('was last seen %1$s at %2$s');
        $last_login_message = sprintf($last_login_message, '<strong>' . date(HabariDateTime::get_default_date_format(), strtotime($user->info->authenticate_time)) . '</strong>', '<strong>' . date(HabariDateTime::get_default_time_format(), strtotime($user->info->authenticate_time)) . '</strong>');
    }
    $message_bits = array();
    $post_statuses = Post::list_post_statuses();
    unset($post_statuses[array_search('any', $post_statuses)]);
    foreach ($post_statuses as $status_name => $status_id) {
        $status_name = Plugins::filter('post_status_display', $status_name);
        $count = Posts::count_by_author($user->id, $status_id);
        if ($count > 0) {
            $message = '<strong><a href="' . Utils::htmlspecialchars(URL::get('admin', array('page' => 'posts', 'user_id' => $user->id, 'type' => Post::type('any'), 'status' => $status_id))) . '">';
            $message .= _n(_t('%1$d %2$s post', array($count, $status_name)), _t('%1$d %2$s posts', array($count, $status_name)), $count);
            $message .= '</a></strong>';
            $message_bits[] = $message;
        }
    }
    if (!empty($message_bits)) {
开发者ID:wwxgitcat,项目名称:habari,代码行数:31,代码来源:users_items.php

示例6: die

if (!defined('HABARI_PATH')) {
    die('No direct access');
}
foreach ($logs as $log) {
    ?>
	<div class="item clear">
		<span class="checkbox pct5"><span><input type="checkbox" class="checkbox" name="checkbox_ids[<?php 
    echo $log->id;
    ?>
]" id="checkbox_ids[<?php 
    echo $log->id;
    ?>
]"></span></span>
		<span class="time pct15 minor"><span><?php 
    $log->timestamp->out(HabariDateTime::get_default_date_format());
    ?>
 &middot; <?php 
    $log->timestamp->out(HabariDateTime::get_default_time_format());
    ?>
</span></span>
		<span class="user pct15 minor"><span>
			<?php 
    if ($log->user_id) {
        if ($user = User::get_by_id($log->user_id)) {
            echo $user->displayname;
        } else {
            echo $log->user_id;
        }
    }
    ?>
开发者ID:wwxgitcat,项目名称:habari,代码行数:30,代码来源:logs_items.php

示例7: _t

		</div>

		<div class="clear">
			<span class="nothing pct5">&nbsp;</span>
			<span class="aka pct90">

			<?php

				if ( !$user->info->authenticate_time ) {
					$last_login_message = _t( 'has not logged in yet' );
				}
				else {

					$last_login_message = _t( 'was last seen %1$s at %2$s' );
					$last_login_message = sprintf( $last_login_message,
						'<strong>' . date( HabariDateTime::get_default_date_format(), strtotime( $user->info->authenticate_time ) ) . '</strong>',
						'<strong>' . date( HabariDateTime::get_default_time_format(), strtotime( $user->info->authenticate_time ) ) . '</strong>'
					);

				}

				$message_bits = array();

				$post_statuses = Post::list_post_statuses();
				unset( $post_statuses[ array_search( 'any', $post_statuses ) ] );

				foreach( $post_statuses as $status_name => $status_id ) {
					$status_name = Plugins::filter( 'post_status_display', $status_name );
					$count = Posts::count_by_author( $user->id, $status_id );

					if ( $count > 0 ) {
开发者ID:rynodivino,项目名称:system,代码行数:31,代码来源:users_items.php


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