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


PHP Format::tag_and_list方法代码示例

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


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

示例1: add_template_vars

 public function add_template_vars()
 {
     if (!$this->template_engine->assigned('pages')) {
         $this->assign('pages', Posts::get('page_list'));
     }
     //For Asides loop in sidebar.php
     $this->assign('asides', Posts::get('asides'));
     if ($this->request->display_entries_by_tag) {
         if (count($this->include_tag) && count($this->exclude_tag) == 0) {
             $this->tags_msg = _t('Posts tagged with %s', array(Format::tag_and_list($this->include_tag)));
         } else {
             if (count($this->exclude_tag) && count($this->include_tag) == 0) {
                 $this->tags_msg = _t('Posts not tagged with %s', array(Format::tag_and_list($this->exclude_tag)));
             } else {
                 $this->tags_msg = _t('Posts tagged with %s and not with %s', array(Format::tag_and_list($this->include_tag), Format::tag_and_list($this->exclude_tag)));
             }
         }
     }
     parent::add_template_vars();
 }
开发者ID:ringmaster,项目名称:NSTheme,代码行数:20,代码来源:theme.php

示例2: add_template_vars

 /**
  * Add additional template variables to the template output.
  *
  *  You can assign additional output values in the template here, instead of
  *  having the PHP execute directly in the template.  The advantage is that
  *  you would easily be able to switch between template types (RawPHP/Smarty)
  *  without having to port code from one to the other.
  *
  *  You could use this area to provide "recent comments" data to the template,
  *  for instance.
  *
  *  Note that the variables added here should possibly *always* be added,
  *  especially 'user'.
  *
  *  Also, this function gets executed *after* regular data is assigned to the
  *  template.  So the values here, unless checked, will overwrite any existing
  *  values.
  */
 public function add_template_vars()
 {
     if (!$this->template_engine->assigned('pages')) {
         $this->assign('pages', Posts::get(array('content_type' => 'page', 'status' => Post::status('published'))));
     }
     //For Asides loop in sidebar.php
     $this->assign('asides', Posts::get(array('vocabulary' => array('tags:term' => 'aside'), 'limit' => 5)));
     if ($this->request->display_entries_by_tag) {
         if (count($this->include_tag) && count($this->exclude_tag) == 0) {
             $this->tags_msg = _t('Posts tagged with %s', array(Format::tag_and_list($this->include_tag)));
         } else {
             if (count($this->exclude_tag) && count($this->include_tag) == 0) {
                 $this->tags_msg = _t('Posts not tagged with %s', array(Format::tag_and_list($this->exclude_tag)));
             } else {
                 $this->tags_msg = _t('Posts tagged with %s and not with %s', array(Format::tag_and_list($this->include_tag), Format::tag_and_list($this->exclude_tag)));
             }
         }
     }
     parent::add_template_vars();
 }
开发者ID:ringmaster,项目名称:system,代码行数:38,代码来源:theme.php

示例3: _e

		<h1 itemprop="name"><a href="<?php 
echo $content->permalink;
?>
" itemprop="url"><?php 
echo $content->title_out;
?>
</a></h1>
		<div class="metadata">
			<p class="pubdata">
				<?php 
_e('Created on %1$s by %2$s.', array('<time datetime="' . $content->pubdate->format('Y-m-d\\TH:i:s\\Z') . '" pubdate itemprop="datePublished">' . $content->pubdate->format(Options::get('dateformat') . ' ' . Options::get('timeformat')) . '</time>', '<span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">' . $content->author->username . '</span></span>'));
?>
			</p>
			<p itemprop="keywords" class="tags">
				<?php 
_e('Categorised under: %1$s', array(Format::tag_and_list($content->tags, ', ', ', and ')));
?>
			</p>
		</div>
	</header>

	<section class="content" itemprop="articleBody">
		<?php 
echo $content->content_out;
?>
	</section>

	<?php 
if ($request->display_entry) {
    ?>
	<section class="comments" itemprop="comment">
开发者ID:ringmaster,项目名称:criticalhit_theme,代码行数:31,代码来源:post.php

示例4:

		<div class="pubdata">
			<span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name"><?php 
echo $content->author->username;
?>
</span></span>
			<time datetime="<?php 
echo $content->pubdate->format('Y-m-d\\TH:i:s\\Z');
?>
" itemprop="datePublished"><?php 
echo $content->pubdate->format(Options::get('dateformat') . ' ' . Options::get('timeformat'));
?>
</time>
		</div>
		<div itemprop="keywords" class="tags">
			<?php 
echo Format::tag_and_list($content->tags, ', ', ', and ');
?>
		</div>
	</header>

	<?php 
echo $theme->content($content->author);
?>

	<div class="content" itemprop="articleBody">
		<?php 
echo $content->excerpt;
?>
	</div>

	<?php 
开发者ID:ringmaster,项目名称:izaw,代码行数:31,代码来源:post.php

示例5: filter_post_tags_out

 /**
  * filters display of tags for posts to hide any that begin with "@" from display
  **/
 public function filter_post_tags_out($tags)
 {
     $tags = array_filter($tags, create_function('$a', 'return $a{0} != "@";'));
     $tags = Format::tag_and_list($tags);
     return $tags;
 }
开发者ID:habari-extras,项目名称:magictags,代码行数:9,代码来源:magictags.plugin.php

示例6: _t

">s</i>
								<i class="icon-rating top"><span class="amount <?php 
        echo $class2;
        ?>
">s</span></i>
							</div>
						<?php 
    }
    ?>
					</div>
				</div>
				<div class="body columns eight">
					<p>
					<?php 
    if (count($addon->tags) > 0) {
        echo _t('Tagged %s', array(Format::tag_and_list($addon->tags, ', ', ', ')));
    }
    ?>
					</p>
					<p><?php 
    echo $addon->content_excerpt;
    ?>
</p>
				</div>
			</div>
		<?php 
}
?>
		</div>
		<div id="page-selector" class="bottom sixteen columns">
			<?php 
开发者ID:habari-extras,项目名称:addon_catalog,代码行数:31,代码来源:addon.tag.php

示例7: theme_post_tags

 public function theme_post_tags($theme)
 {
     if (isset($theme->post)) {
         return Format::tag_and_list($theme->post->tags, ', ', ', and ');
     }
 }
开发者ID:habari-extras,项目名称:podcast,代码行数:6,代码来源:podcast.plugin.php

示例8: _e

			<?php 
echo $post->content_out;
?>
		</div><!-- end entry -->
	</div><!-- end id post-* -->

	<div class="entryMeta">	
		<p>
			<?php 
if (count($post->tags)) {
    ?>
				<?php 
    _e('This entry is filed under');
    ?>
 <?php 
    echo Format::tag_and_list($post->tags, ', ', ', and ');
    ?>
. 
			<?php 
}
?>
			<?php 
_e('You can follow any responses to this entry through the');
?>
			<a href="<?php 
echo $post->comment_feed_link;
?>
"> feed</a>
			<?php 
if (!$post->info->comments_disabled) {
    ?>
开发者ID:habari-extras,项目名称:podcast,代码行数:31,代码来源:podcast.single.php

示例9: add_template_vars

 /**
  * Add some variables to the template output
  */
 public function add_template_vars()
 {
     parent::add_template_vars();
     // Use theme options to set values that can be used directly in the templates
     $opts = Options::get_group(__CLASS__);
     $this->assign('show_title_image', $opts['show_title_image']);
     $this->assign('home_label', $opts['home_label']);
     $this->assign('show_powered', $opts['show_powered']);
     $this->assign('display_login', $opts['display_login']);
     $this->assign('tags_in_multiple', $opts['tags_in_multiple']);
     $this->assign('post_class', 'post' . (!$opts['show_entry_paperclip'] ? ' alt' : ''));
     $this->assign('page_class', 'post' . (!$opts['show_page_paperclip'] ? ' alt' : ''));
     $this->assign('show_post_nav', $opts['show_post_nav']);
     $this->assign('loggedin', User::identify()->loggedin);
     $locale = Options::get('locale');
     if ($this->get_url($locale . '.css')) {
         $this->assign('localized_css', $locale . '.css');
     } else {
         $this->assign('localized_css', false);
     }
     if ($opts['show_title_image']) {
         if ($this->get_url('images.' . $locale . '/title-image.png')) {
             $this->assign('title_image', 'images.' . $locale . '/title-image.png');
         } else {
             if ($this->get_url('images/title-image.png')) {
                 $this->assign('title_image', 'images/title-image.png');
             } else {
                 $this->assign('title_image', 'images/sample-title.png');
             }
         }
     }
     if (!$this->template_engine->assigned('pages')) {
         $this->assign('pages', Posts::get('page_list'));
     }
     $this->assign('post_id', isset($this->post) && $this->post->content_type == Post::type('page') ? $this->post->id : 0);
     if (is_object($this->request) && $this->request->display_entries_by_tag) {
         if (count($this->include_tag) && count($this->exclude_tag) == 0) {
             $this->tags_msg = _t('Displaying posts tagged: %s', array(Format::tag_and_list($this->include_tag)));
         } else {
             if (count($this->exclude_tag) && count($this->include_tag) == 0) {
                 $this->tags_msg = _t('Displaying posts not tagged: %s', array(Format::tag_and_list($this->exclude_tag)));
             } else {
                 $this->tags_msg = _t('Displaying posts tagged: %s and not %s', array(Format::tag_and_list($this->include_tag), Format::tag_and_list($this->exclude_tag)));
             }
         }
     }
 }
开发者ID:wwxgitcat,项目名称:habari,代码行数:50,代码来源:theme.php

示例10: _n

echo _n(" ", "", count($post->info->licenses));
?>
 <?php 
echo AddonCatalogPlugin::name_url_list($post->info->licenses);
?>
</div>
						</li>
						<?php 
if (count($post->tags) > 0) {
    ?>
						<li>
							<div style="float:left;margin-right: 5px;"><i class="icon-tags">t</i></div>
							<div style="float:left;width:185px;">
								<?php 
    if (count($post->tags) > 0) {
        echo _t('%s', array(Format::tag_and_list($post->tags, ', ', ', ')));
    }
    ?>
							</div>
						</li>
						<?php 
}
?>
						<li>
							<?php 
echo $theme->area('plugin_sidebar');
?>
						</li>
					</ul>
				</div>
			</div>
开发者ID:habari-extras,项目名称:addon_catalog,代码行数:31,代码来源:addon.single.php


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