本文整理汇总了PHP中zmf::t方法的典型用法代码示例。如果您正苦于以下问题:PHP zmf::t方法的具体用法?PHP zmf::t怎么用?PHP zmf::t使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类zmf
的用法示例。
在下文中一共展示了zmf::t方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: limitUsername
/**
* 限制的用户名
* @param type $attribute
* @param type $params
*/
public function limitUsername($attribute, $params)
{
$truename = $this->truename;
if ($truename) {
if (!$this->chkName($truename)) {
$this->addError('truename', zmf::t('notAllowName'));
}
}
}
示例2: navbar
/**
* 根据当前选择地区生产导航条
* @param type $areaId 地区ID
* @param type $areaTitle 地区标题
* @param type $likeAreas 用户关注的地区
* @return string
*/
public static function navbar($areaId = '', $areaTitle = '', $likeAreas = '')
{
$arr = $attr = array();
if ($areaId) {
$attr['areaid'] = $areaId;
}
$arr[] = array('title' => zmf::t('travelStory'), 'url' => Yii::app()->createUrl('posts/story', $attr), 'active' => Yii::app()->getController()->id == 'posts' && Yii::app()->getController()->getAction()->id != 'create');
$arr[] = array('title' => zmf::t('question'), 'url' => Yii::app()->createUrl('question/index', $attr), 'active' => Yii::app()->getController()->id == 'question' && Yii::app()->getController()->getAction()->id != 'create');
$arr[] = array('title' => zmf::t('positions'), 'url' => Yii::app()->createUrl('position/index', $attr), 'active' => Yii::app()->getController()->id == 'position');
// $arr[] = array(
// 'title' => zmf::t('travelJournal'),
// 'url' => Yii::app()->createUrl('travel/index', $attr),
// 'active' => (Yii::app()->getController()->id == 'travel' && in_array(Yii::app()->getController()->getAction()->id, array('index', 'view')))
// );
$arr[] = array('title' => '约伴', 'url' => Yii::app()->createUrl('yueban/index', $attr), 'active' => Yii::app()->getController()->id == 'yueban');
$arr[] = array('title' => '什么值得买', 'url' => Yii::app()->createUrl('goods/index', $attr), 'active' => Yii::app()->getController()->id == 'goods');
$arr[] = array('title' => '<span class="icon-plus"></span> 写游记', 'url' => zmf::uid() ? Yii::app()->createUrl('posts/create') : Yii::app()->createUrl('site/login'), 'active' => Yii::app()->getController()->id == 'posts' && Yii::app()->getController()->getAction()->id == 'create');
$arr[] = array('title' => '<span class="icon-plus"></span> 提问题', 'url' => zmf::uid() ? Yii::app()->createUrl('question/create') : Yii::app()->createUrl('site/login'), 'active' => Yii::app()->getController()->id == 'question' && Yii::app()->getController()->getAction()->id == 'create');
return $arr;
}
示例3: array
<?php
}
?>
<div class="checkbox"><label><?php
echo $form->checkBox($model, 'rememberMe', array('class' => 'remember'));
?>
<?php
echo zmf::t('remember_me');
?>
</label></div>
<div class="form-group">
<?php
echo CHtml::submitButton('登录', array('class' => 'btn btn-success'));
?>
<?php
echo CHtml::link(zmf::t('register_link'), array('site/reg'));
?>
</div>
<?php
$this->endWidget();
?>
</div>
<div class="aside-page">
<div class="aside-mod">
使用提示
</div>
<div class="aside-mod">
<?php
$this->renderPartial('/site/aside');
?>
</div>
示例4: array
<?php
if ($pages->pageCount > 1) {
?>
<div class="pagination">
<?php
$this->widget('CLinkPager', array('header' => '', 'firstPageLabel' => zmf::t('firstPage'), 'lastPageLabel' => zmf::t('lastPage'), 'prevPageLabel' => zmf::t('prevPage'), 'nextPageLabel' => zmf::t('nextPage'), 'pages' => $pages, 'maxButtonCount' => 4));
?>
</div>
<?php
}
示例5: array
<?php
$favorited = false;
if (Favorites::checkFavored($keyid, $type)) {
$css = "favorited";
$title = zmf::t('cancelFavorite');
$favorited = true;
} else {
$css = "";
$title = zmf::t('favorite');
}
echo CHtml::link('<span class="icon-thumbs-up"></span> 赞', 'javascript:;', array('class' => 'btn btn-xs btn-' . ($_favored ? 'success' : 'default'), 'action' => 'favor', 'action-data' => $keyid, 'action-type' => 'posts', 'id' => 'favor-posts-' . $keyid));
echo CHtml::link('<span class="icon-heart"></span> 收藏', 'javascript:;', array('class' => 'btn btn-xs btn-' . ($favorited ? 'danger' : 'default'), 'action' => 'favorite', 'action-data' => $keyid, 'action-type' => 'posts'));
示例6: array
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><?php
echo CHtml::link(zmf::t('homepage'), array('users/index', 'id' => Yii::app()->user->id), array('role' => 'menuitem'));
?>
</li>
<li><?php
echo CHtml::link(zmf::t('favorite'), array('users/favorites'), array('role' => 'menuitem'));
?>
</li>
<li><?php
echo CHtml::link(zmf::t('setting'), array('users/config'), array('role' => 'menuitem'));
?>
</li>
<li><?php
echo CHtml::link(zmf::t('logout'), array('site/logout'), array('role' => 'menuitem'));
?>
</li>
</ul>
</li>
<?php
}
?>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#">客服电话:400-820-8820</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
<div class="wrapper">
示例7: array
<?php
echo '<span class="show_comment_c_foot_r">' . CHtml::link(zmf::t('report'), 'javascript:', array('onclick' => "alert_report('" . $keyid . "')")) . '<div id="reportholder' . $keyid . '" class="reportholder" style="display:none">' . '<div class="reportTitle"><span style="float:left;">选择举报原因:</span><span style="float:right">' . CHtml::link('×', 'javascript:', array('onclick' => "closeReport('" . $keyid . "');")) . '</span></div>' . '<ul><li><label><input type="radio" name="reason" value="色情或低俗信息" onclick="$(\'#reportdesc' . $keyid . '\').hide();" />1、色情或低俗信息</label></li>' . '<li><label><input type="radio" name="reason" value="广告或垃圾信息" onclick="$(\'#reportdesc' . $keyid . '\').hide();" />2、广告或垃圾信息</label></li>' . '<li><label><input type="radio" name="reason" value="激进时政或意识形态" onclick="$(\'#reportdesc' . $keyid . '\').hide();" />3、激进时政或意识形态</label></li>' . '<li><label><input type="radio" name="reason" value="0" onclick="$(\'#reportdesc' . $keyid . '\').show();"/>4、其他原因</label></li><div class="clear"></div></ul>' . '<textarea id="reportdesc' . $keyid . '" placeHolder="请输入举报原因" style="display:none;clear:both"></textarea>' . '<div class="reportbutton">' . CHtml::link(zmf::t('report'), 'javascript:', array('onclick' => "report('" . $keyid . "','" . $type . "','" . Yii::app()->request->url . "');")) . '</div></div></span>';
示例8: array
<div class="form-group">
<?php
echo $form->labelEx($model, 'password');
?>
<?php
echo $form->passwordField($model, 'password', array('class' => 'form-control'));
?>
<?php
echo $form->error($model, 'password');
?>
</div>
<div class="form-group">
<?php
echo CHtml::submitButton($this->regTitle, array('class' => 'btn btn-success'));
?>
<?php
echo CHtml::link(zmf::t('login_link'), 'javascript:;', array('onclick' => "collPanel('reg')"));
?>
</div>
<?php
$this->endWidget();
?>
<div class="more-awesome"><span>快捷注册</span></div>
<div class="quick-login-bar">
<?php
echo Users::quickLoginBar('reg');
?>
</div>
</div>
</div>
</div>
示例9: foreach
<div class="clearfix"></div>
<footer class="footer">
<div class="container">
<div class="row footer-top">
<?php
$links = Link::allLinks();
if (!empty($links)) {
?>
<p><h4><?php
echo zmf::t('friendlyLink');
?>
</h4><?php
foreach ($links as $link) {
?>
<a href="<?php
echo $link['url'];
?>
" target="_blank"><?php
echo $link['title'];
?>
</a><?php
}
?>
</p><?php
}
?>
<p class="text-center"><a href="<?php
echo zmf::config('domain');
?>
" target="_blank"><?php
echo zmf::config('sitename');
示例10: array
echo $form->hiddenField($model, 'logid', array('value' => $keyid));
echo $form->hiddenField($model, 'classify', array('value' => $type));
echo $form->hiddenField($model, 'tocommentid', array('value' => '0'));
?>
<style>
#replyoneHolder a{color:red}
</style>
<h3><?php
echo zmf::t('leaveAComment');
?>
</h3>
<div id="replyoneHolder"></div>
<?php
echo $form->textArea($model, 'content', array('rows' => 4, 'class' => 'form-control'));
echo $form->error($model, 'content');
echo CHtml::ajaxSubmitButton(zmf::t('submit'), $this->createUrl('index/comment', array('type' => $type)), array('success' => "function(data){data = eval('('+data+')');if(data['status']=='0'){dialog({msg:data['msg'],time:3});}else{ \$('#Comments_content').val('');\$('#comments').append(data['msg']);}}"), array('class' => 'btn btn-success', 'data-loading-text' => '发布中...', 'id' => 'min-comment-btn'));
$this->endWidget();
?>
</div>
<script>
$(document).ready(function(){
$('#min-comment-btn').on('click', function () {
var $btn = $(this).button('loading');
var timeout = setTimeout(function() {
$btn.button('reset');
}, 3000);
})
});
</script>
示例11: array
<div class="text-center"><?php
echo zmf::t('login_reg', CHtml::link('会员登录', zmf::config('domain') . Yii::app()->createUrl('site/login'), array('class' => '')) . ' | ' . CHtml::link('立即注册', zmf::config('domain') . Yii::app()->createUrl('site/reg'), array('class' => '')));
?>
</div>
示例12: array
?>
<?php
if (Yii::app()->user->isGuest) {
?>
<li class="ui-border-t" data-href="<?php
echo Yii::app()->createUrl('site/login');
?>
"><h4 class="ui-nowrap"><?php
echo zmf::t('login');
?>
</h4></li>
<li class="ui-border-t" data-href="<?php
echo Yii::app()->createUrl('site/reg');
?>
"><h4 class="ui-nowrap"><?php
echo zmf::t('register');
?>
</h4></li>
<?php
} else {
?>
<li class="ui-border-t" data-href="<?php
echo Yii::app()->createUrl('users/index', array('id' => Yii::app()->user->id));
?>
"><h4 class="ui-nowrap">欢迎,<?php
echo $this->truename;
?>
</h4></li>
<?php
}
?>
示例13: array
<ol class="breadcrumb">
<?php
if (in_array(Yii::app()->getController()->id, array('posts', 'map'))) {
?>
<?php
echo ' <li>' . CHtml::link(zmf::t('indexPage'), Yii::app()->baseUrl) . '</li>';
if (!empty($colinfo)) {
echo ' <li>' . CHtml::link($colinfo['title'], array('posts/all', 'colid' => $colinfo['id'])) . '</li>';
}
echo ' <li>' . CHtml::link(zmf::t('allTags'), array('tags/all')) . ' </li>';
?>
<?php
if (!empty($taginfo)) {
echo ' <li> ' . CHtml::link($taginfo['title'], array('posts/all', 'tagid' => $taginfo['id'])) . '</li>';
}
?>
<?php
if (!empty($postInfo)) {
echo ' <li> ' . CHtml::link($postInfo['title'], array('posts/index', 'id' => $postInfo['id'])) . '</li>';
}
?>
<?php
}
?>
</ol>
示例14: array
" alt="<?php
echo $title;
?>
的封面" class="media-object" width="124"/></a><div class="media-body"><h4 class="media-heading"><a href="<?php
echo Yii::app()->createUrl('position/view', array('id' => $info['id']));
?>
"><?php
echo $title;
?>
</a></h4><p class="color-grey"><?php
echo $content;
?>
</p><p class="color-grey"><?php
echo $info['scorer'];
?>
点评 <?php
echo $info['attach'];
?>
图片</p></div></div></div>';
</script>
<div id="mapHolder"><div id="map-canvas"></div></div>
<?php
} else {
?>
<div class="error"><?php
echo zmf::t('noMapInfo');
?>
</div>
<?php
}
示例15: array
?>
对任何人都开放且免费,但是<?php
echo CHtml::link(zmf::config('sitename'), zmf::config('baseurl'));
?>
的注册用户享有更多额外的特权,比如<?php
echo $_example;
?>
。</p><!--p><?php
echo CHtml::link('如何获取声望值?', array('site/help', 'type' => 'reputation'), array('target' => '_blank'));
?>
</p--></div>
<div class="col-xs-4 col-sm-4">
<?php
if (Yii::app()->user->isGuest) {
echo CHtml::link(zmf::t('login'), array('site/login'), array('class' => 'btn btn-success btn-block', 'target' => '_blank'));
echo CHtml::link(zmf::t('register'), array('site/reg'), array('class' => 'btn btn-success btn-block', 'target' => '_blank'));
?>
<div class="quick-login-bar">
<span class="pull-left">快捷登录:</span>
<?php
echo Users::quickLoginBar('login');
?>
</div>
<?php
} else {
?>
<p><b>如何获取声望值?</b></p>
<ol>
<li>验证你的注册邮箱</li>
<li>发布优质内容所获得的赞</li>
<li>给予网友积极的反馈</li>