本文整理汇总了PHP中Yum::register方法的典型用法代码示例。如果您正苦于以下问题:PHP Yum::register方法的具体用法?PHP Yum::register怎么用?PHP Yum::register使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Yum
的用法示例。
在下文中一共展示了Yum::register方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: beforeAction
public function beforeAction($action)
{
if (Yum::module()->enableOnlineStatus && !Yii::app()->user->isGuest) {
Yii::app()->user->data()->setLastAction();
}
if (Yum::module()->enableBootstrap) {
Yum::register('css/bootstrap.min.css');
}
return parent::beforeAction($action);
}
示例2: array
<?php
$template = '<p> %s: %s </p>';
if ($data->privacy && $data->privacy->show_online_status) {
if ($data->isOnline()) {
echo Yum::t('User is Online!');
echo CHtml::image(Yum::register('images/green_button.png'));
}
}
printf($template, Yum::t('Username'), $data->username);
echo CHtml::link(Yum::t('Write a message'), array('//message/message/compose', 'to_user_id' => $data->id)) . '<br />';
echo CHtml::link(Yum::t('Visit profile'), array('//profile/profile/view', 'id' => $data->id));
示例3: array
<?php
Yum::register('css/yum.css');
$this->breadcrumbs = array(Yum::t('Usergroups') => array('index'), $model->title);
?>
<h3> <?php
echo $model->title;
?>
</h3>
<p> <?php
echo $model->description;
?>
</p>
<?php
if ($model->owner) {
printf('%s: %s', Yum::t('Owner'), CHtml::link($model->owner->username, array('//profile/profile/view', 'id' => $model->owner_id)));
}
printf('<h4> %s </h4>', Yum::t('Participants'));
$this->widget('zii.widgets.CListView', array('dataProvider' => $model->getParticipantDataProvider(), 'itemView' => '_participant'));
?>
<div style="clear: both;"> </div>
<?php
printf('<h3> %s </h3>', Yum::t('Messages'));
$this->widget('zii.widgets.CListView', array('dataProvider' => $model->getMessageDataProvider(), 'itemView' => '_message'));
?>
<?php
示例4:
</ul>
</div>
</div>
<body class="container">
<div class="container">
<?php
echo $content;
?>
</div>
<div class="clearfix"></div>
<div id="footer">
<?php
echo Yum::powered();
?>
| <?php
echo Yii::powered();
?>
</div>
</div>
<?php
Yum::register('js/bootstrap.min.js');
?>
</body>
</html>
示例5: array
<?php
$this->title = Yum::t('Statistics');
$this->breadcrumbs = array(Yum::t('Users') => array('index'), Yum::t('Statistics'));
Yum::register('statistics.css');
echo '<table class="statistics" cellspacing=0 cellpadding=0>';
$f = '<tr><td>%s</td><td>%s</td></tr>';
printf($f, Yum::t('Total users'), $total_users);
printf($f, Yum::t('Active users'), $active_users);
//printf($f, Yum::t('Active first visit users'), $active_first_visit_users);
printf($f, Yum::t('New users registered today'), $todays_registered_users);
printf($f, Yum::t('Inactive users'), $inactive_users);
printf($f, Yum::t('Banned users'), $banned_users);
printf($f, Yum::t('Admin users'), $admin_users);
//if (Yum::hasModule('role'))
// printf($f, Yum::t('Roles'), $roles);
/* if (Yum::hasModule('profile')) {
printf($f, Yum::t('Profiles'), $profiles);
printf($f, Yum::t('Different viewn Profiles'), $profile_views);
printf($f, Yum::t('Profile fields'), $profile_fields);
printf($f, Yum::t('Profile field groups'), $profile_field_groups);
} */
//printf($f, Yum::t('Messages'), $messages);
printf($f, Yum::t('Different users logged in today'), $logins_today);
echo '</table>';
示例6: array
<?php
$this->renderPartial('_tooltip', array('data' => $data));
?>
</div>
<div class="view_user" id="user_<?php
echo $data->id;
?>
">
<?php
$online = '';
if (Yum::hasModule('profile') && Yum::module('profile')->enablePrivacySetting) {
if ($data->privacy && $data->privacy->show_online_status) {
if ($data->isOnline()) {
$online .= CHtml::image(Yum::register('images/green_button.png'));
}
}
}
?>
<?php
printf('<h3>%s %s</h3>', $data->username, $online);
?>
<?php
echo CHtml::link($data->getAvatar(true), array('//profile/profile/view', 'id' => $data->id));
?>
</div>
<?php
示例7: function
<?php
if (Yum::module()->enablepStrength) {
Yum::register('js/pStrength.jquery.js');
Yii::app()->clientScript->registerScript('', "\n\t\$('#YumUserChangePassword_password').pStrength({\n\t\t'onPasswordStrengthChanged' : function(passwordStrength, percentage) {\n\t\t\$('#password-strength').html('" . Yum::t('Password strength') . ":' + percentage + '%');\n\t\t},\n});\n");
}
?>
<?php
echo CHtml::activeLabelEx($form, 'password');
echo CHtml::activePasswordField($form, 'password');
?>
<?php
if (Yum::module()->displayPasswordStrength) {
?>
<div id="password-strength"></div>
<?php
}
?>
<?php
echo CHtml::activeLabelEx($form, 'verifyPassword');
echo CHtml::activePasswordField($form, 'verifyPassword');
?>