Exemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function attributeLabels()
 {
     return ['id' => YBoard::t('yboard', 'ID'), 'title' => YBoard::t('yboard', 'Title'), 'min_posts' => YBoard::t('yboard', 'Min Posts'), 'stars' => YBoard::t('yboard', 'Stars')];
 }
Exemplo n.º 2
0
use app\components\ckeditor\CKEditor;
use kartik\widgets\Select2;
use yii\helpers\ArrayHelper;
use hosanna\profile\models\User;
use app\modules\yboard\YBoard;
$model = new YBoardMessage(['sendfrom' => Yii::$app->user->identity->id]);
$data = User::find()->select(['username'])->where('id<>' . Yii::$app->user->id)->asArray()->all();
//format them for Input Widget
$data = ArrayHelper::getColumn($data, 'username');
Dialog::begin(['id' => 'dlgPrivateMsg', 'clientOptions' => ['modal' => true, 'title' => YBoard::t('yboard', 'Send Private Message'), 'autoOpen' => false, 'height' => '400', 'width' => '400', 'buttons' => [['text' => YBoard::t('yboard', 'Send'), 'class' => 'btn btn-sm btn-success', 'click' => new \yii\web\JsExpression('function(){ 
                    for(instance in CKEDITOR.instances)
                    {
                        CKEDITOR.instances[instance].updateElement();
                    }
                    sendPMForm(); 
                }')], ['text' => YBoard::t('yboard', 'Cancel'), 'class' => 'btn btn-sm btn-danger', 'click' => new \yii\web\JsExpression(' function() { $( this ).dialog( "close" ); }')]]]]);
?>

    <div class="yboard-message-form">

    <?php 
$form = ActiveForm::begin(['id' => 'pm-form']);
?>
          
    <?php 
echo $form->field($model, 'usernames')->widget(Select2::classname(), ['name' => 'usernames', 'options' => ['placeholder' => 'Select User', 'id' => 'YBoardMessage_pm_usernames'], 'pluginOptions' => ['tags' => $data, 'maximumInputLength' => 10]]);
?>
       
    <?php 
echo $form->field($model, 'subject')->textInput(['maxlength' => 255]);
?>
 /**
  * @inheritdoc
  */
 public function attributeLabels()
 {
     return ['id' => YBoard::t('yboard', 'ID'), 'name' => YBoard::t('yboard', 'Name'), 'description' => YBoard::t('yboard', 'Description'), 'color' => YBoard::t('yboard', 'Color'), 'image' => YBoard::t('yboard', 'Image'), 'group_role' => YBoard::t('yboard', 'Group Role')];
 }
Exemplo n.º 4
0
 /**
  * @inheritdoc
  */
 public function attributeLabels()
 {
     return ['id' => YBoard::t('yboard', 'Forum'), 'cat_id' => YBoard::t('yboard', 'Category'), 'name' => YBoard::t('yboard', 'Name'), 'subtitle' => YBoard::t('yboard', 'Descriptions'), 'type' => YBoard::t('yboard', 'Type'), 'public' => YBoard::t('yboard', 'Public'), 'locked' => YBoard::t('yboard', 'Locked'), 'moderated' => YBoard::t('yboard', 'Moderated'), 'sort' => YBoard::t('yboard', 'Sort'), 'num_posts' => YBoard::t('yboard', 'Posts'), 'num_topics' => YBoard::t('yboard', 'Topics'), 'last_post_id' => YBoard::t('yboard', 'Last Post'), 'poll' => YBoard::t('yboard', 'Poll'), 'membergroup_id' => YBoard::t('yboard', 'Member Group')];
 }
Exemplo n.º 5
0
 /**
  * @return YBoardMembergroup
  */
 public function getStatus()
 {
     $isOnline = YBoardSession::find()->where(['user_id' => $this->id])->count();
     if ($this->show_online > 0) {
         if ($isOnline > 0) {
             return YBoard::t('yboard', 'Online');
         } else {
             return YBoard::t('yboard', 'Offline');
         }
     } else {
         return YBoard::t('yboard', 'Hidden');
     }
 }
Exemplo n.º 6
0
$this->params['breadcrumbs'] = [['label' => YBoard::t('yboard', 'Forums'), 'url' => ['forum/index']], ['label' => YBoard::t('yboard', 'Outbox') . ' (' . $count['outbox'] . ')', 'url' => ['message/outbox', 'id' => Yii::$app->user->id]], YBoard::t('yboard', 'Inbox')];
$this->title = YBoard::t('yboard', 'Messages - Inbox');
?>
<div id="yboard-wrapper" class="container">
	<?php 
echo $this->render('_pmDialog');
?>
    
	<div class="progress"><div class="progressbar" style="width:<?php 
echo $count['inbox'] < 100 ? $count['inbox'] : 100;
?>
%"> </div></div>

	<div id="yboard-message"></div><br>
    <p class="pull-right pad5-right"><?php 
echo Html::button(YBoard::t('yboard', 'New message'), ['class' => 'btn btn-default btn-md', 'style' => 'cursor:pointer;', 'onclick' => 'sendPm(' . Yii::$app->user->id . '); return false;']);
?>
</p>
 
    <?php 
\yii\widgets\Pjax::begin();
?>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => null, 'id' => 'inbox-grid-box', 'rowOptions' => function ($model, $index, $widget, $grid) {
    return ['class' => $model->read_indicator ? '' : 'unread', 'id' => 'msg_id_' . $model->id];
}, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'sendfrom', 'value' => function ($model, $key, $index, $column) {
    return $model->sender->profile->username;
}], 'subject', ['attribute' => 'create_time', 'value' => function ($model, $key, $index, $column) {
    return DateTimeCalculation::short($model->create_time);
}], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{view}{reply}{delete}', 'buttons' => ['view' => function ($url, $model) {
    // return the button HTML code
Exemplo n.º 7
0
            <div class="row">
                <div class="col-md-2"><?php 
echo YBoard::t('yboard', 'Newest member');
?>
</div> 
                <div class="col-md-1"><?php 
$member = YBoardMember::find()->newestScope()->one();
echo $member == null ? YBoard::t('yboard', 'None') : Html::a($member->profile->username, ['member/view', 'id' => $member->id]);
?>
</div> 
                <div class="col-md-9"></div> 
            </div>
            
            <div class="row">
                <div class="col-md-2"><?php 
echo YBoard::t('yboard', 'Visitors today');
?>
</div> 
                <div class="col-md-1"><?php 
echo YBoardSession::find()->count();
?>
</div> 
                <div class="col-md-9"></div> 
            </div>
        </div> 
</div> 
<?php 
echo $this->render('_changeForum');
?>
 
Exemplo n.º 8
0
use yii\web\View;
use yii\helpers\Html;
use kartik\widgets\Select2;
use app\modules\yboard\YBoard;
$authMgr = Yii::$app->authManager;
$roles = $authMgr->getRoles();
//format roles title to be capitalized one
$data = [];
foreach ($roles as $role) {
    $data[$role->name] = ucfirst($role->name);
}
$form = \yii\widgets\ActiveForm::begin(['id' => 'edit-membergroup-form', 'enableAjaxValidation' => true]);
?>

<p class="note"><?php 
echo YBoard::t('yboard', 'Fields with <span class="required">*</span> are required.');
?>
</p>

<?php 
echo $form->errorSummary($model);
?>

<?php 
echo $form->field($model, 'name')->textInput(['id' => 'YBoardMembergroup_name']);
?>

<?php 
echo $form->field($model, 'group_role')->dropDownList($data, ['id' => 'YBoardMembergroup_group_role']);
?>
Exemplo n.º 9
0
}
?>
 
    <div class="row category"> 
        <div class="col-md-10">
            <span  class="header2"><?php 
echo Html::encode($data->name);
?>
</span>
            <p><?php 
echo Html::encode($data->subtitle);
?>
</p>
        </div>
        
        <div class="col-md-2 pad5-top">
            <?php 
echo Html::button(YBoard::t('yboard', 'Edit Category'), ['class' => 'btn btn-warning btn-xs', 'onclick' => 'editCategory(' . $data->id . ',"' . YBoard::t('yboard', 'Edit category') . '", "' . \Yii::$app->urlmanager->createAbsoluteUrl(Yii::$app->controller->module->id . '/setting/get-forum') . '")']);
?>
        </div>   
    </div>

    <div class="row">  
        <div class="col-md-12">
            <?php 
echo \yii\jui\Sortable::widget(['id' => 'sortfrm' . $data->id, 'items' => $forumitems, 'options' => ['style' => 'list-style:none; margin-top:1px', 'class' => 'forum-item'], 'clientOptions' => ['delay' => '100', 'update' => new JsExpression('function(){Sort(this,"' . \Yii::$app->urlmanager->createAbsoluteUrl(Yii::$app->controller->module->id . '/setting/ajax-sort') . '");}')]]);
?>
 
        </div> 
    </div> 
Exemplo n.º 10
0
use app\modules\yboard\YBoard;
/**
 * @var yii\web\View $this
 * @var app\modules\yboard\models\YBoardMemberSearch $model
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="yboard-member-search">
    <div class="row">
        <div class="col-md-8" >  
        </div>
        
        <div class="col-md-4">        
            <?php 
$form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']);
?>
            
                
                <?php 
echo $form->field($model, 'username')->label("")->hint(YBoard::t('yboard', 'search username'));
?>
     
            
            <?php 
ActiveForm::end();
?>
        </div>
    </div> 
</div>
Exemplo n.º 11
0
        <div class="error col-md-12">
            <div class=" alert alert-warning panel " style="display:inline-block;">
                <p><?php 
echo YBoard::t('yboard', ' Dear customer, we are sorry that you got this message. Please try to check URL to see if you have typed Correctly');
?>
</p>
                <p><?php 
echo YBoard::t('yboard', 'If the error persists Please send us full error below with error code and URL. Your subject should be RE: Site Error.');
?>
</p>
                <p><?php 
echo YBoard::t('yboard', 'Thank you!');
?>
</p>
            </div><br>
             
             <div class="alert alert-danger" style="display:inline-block;">
                <span class="header3"><?php 
echo YBoard::t('yboard', 'Message');
?>
</span><br>
                <?php 
echo Html::encode($exception->getMessage());
?>
             </div>

        </div>
    </div>
	
</div>
Exemplo n.º 12
0
 /**
  * @inheritdoc
  */
 public function attributeLabels()
 {
     return ['member_id' => YBoard::t('yboard', 'Member ID'), 'topic_id' => YBoard::t('yboard', 'Topic ID'), 'forum_id' => YBoard::t('yboard', 'Forum ID'), 'last_post_id' => YBoard::t('yboard', 'Last Post ID')];
 }
Exemplo n.º 13
0
?>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-12"> 
             <?php 
echo ListView::widget(['summary' => false, 'itemView' => '_topic', 'id' => 'yboardTopic', 'dataProvider' => $dataProvider]);
?>
        </div>
       
    </div>
    
    <div>
        <?php 
echo $this->render('_forumfooter');
?>
    </div>
</div>

<div style="display:none;">
<?php 
if (Yii::$app->user->can('moderator')) {
    Dialog::begin(['id' => 'dlgTopicForm', 'clientOptions' => ['modal' => true, 'title' => YBoard::t('yboard', 'Update topic'), 'autoOpen' => false, 'modal' => true, 'height' => 400, 'width' => 300, 'buttons' => [['text' => YBoard::t('yboard', 'Change'), 'class' => 'btn btn-sm btn-success', 'click' => new JsExpression(' function() { YBoard.changeTopic("' . \Yii::$app->urlmanager->createAbsoluteUrl($this->context->module->id . '/moderator/change-topic') . '"); }')], ['text' => YBoard::t('yboard', 'Cancel'), 'class' => 'btn btn-sm btn-danger', 'click' => new JsExpression(' function() { $( this ).dialog( "close" ); }')]]]]);
    echo $this->render('_topicForm', array('model' => new YBoardTopic()));
    Dialog::end();
}
?>
</div>
Exemplo n.º 14
0
?>
		
        <?php 
echo isset($hide_title) ? Html::activeHiddenInput($post, 'subject') : $form->field($post, 'subject')->textInput();
?>

		<?php 
echo CKEditor::widget(['model' => $post, 'attribute' => 'content']);
?>
 

        <?php 
echo $post->isNewRecord ? "" : $form->field($post, 'change_reason')->textInput();
?>
		
        <?php 
echo Html::activeHiddenInput($post, 'forum_id');
?>
        <?php 
echo Html::activeHiddenInput($post, 'topic_id');
?>
        
        <br><?php 
echo Html::submitButton($post->isNewRecord ? YBoard::t('yboard', 'Post') : YBoard::t('yboard', 'Save'), ['class' => 'btn btn-primary btn-md']);
?>
	
    <?php 
ActiveForm::end();
?>
</div><!-- form -->	
Exemplo n.º 15
0
echo YBoard::t('yboard', 'Recent Replies');
?>
</div>
                <div class="contents">
                    <?php 
$idx = 0;
?>
                    <?php 
foreach ($recentReplies as $post) {
    ?>
                        <div class="<?php 
    echo $idx % 2 == 0 ? 'even' : 'odd';
    ?>
">
                            <?php 
    echo YBoard::t('yboard', '{user} replied to {topic} on {time}', ['topic' => Html::a($post->topic->title, ['topic', 'id' => $post->topic->id]), 'user' => Html::a($post->poster->profile->username, ['member/view', 'id' => $topic->starter->id]), 'time' => DateTimeCalculation::medium($post->create_time)]);
    ?>
<br>
                            <?php 
    $idx = $idx + 1;
    ?>
                        </div>
                    <?php 
}
?>
                </div>
            </div>
        </div>
    </div>     
       
    <div class="hidden-xs">
Exemplo n.º 16
0
echo Html::encode($this->title);
?>
</p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'user_id', 'value' => function ($model, $index, $dataColumn) {
    return $model->member->profile->username;
}], ['attribute' => 'banned_by', 'value' => function ($model, $index, $dataColumn) {
    return $model->banner->profile->username;
}], ['attribute' => 'expires', 'format' => 'raw', 'value' => function ($model, $index, $dataColumn) {
    return Editable::widget(['value' => DateTimeCalculation::short($model->expires), 'name' => 'expires', 'options' => ['name' => 'expires'], 'format' => Editable::FORMAT_BUTTON, 'inputType' => Editable::INPUT_DATETIME, 'formOptions' => ['action' => url::to(['moderator/change-ban-period', 'id' => $model->id])]]);
}], 'ip', 'email:email', ['class' => 'yii\\grid\\ActionColumn', 'template' => '{lift} {reason}', 'buttons' => ['lift' => function ($url, $model, $key) {
    return Html::a('<span class="glyphicon glyphicon-tint"></span>', '#', ['title' => YBoard::t('yboard', 'Lift Ban'), 'onclick' => 'if(confirm("' . YBoard::t('yboard', 'Do you really Lift this Ban') . '")) { banLift("' . Yii::$app->urlManager->createAbsoluteUrl([$this->context->module->id . '/moderator/ban-lift', 'id' => $model->id]) . '"); }return false; ']);
}, 'reason' => function ($url, $model, $key) {
    return Html::a('<span class="glyphicon glyphicon-envelope"></span>', '#', ['title' => YBoard::t('yboard', 'Ban Reason'), 'onclick' => 'banMessage(\'' . $model->message . '\')']);
}]]]]);
?>

</div>

<?php 
Dialog::begin(['id' => 'dlgBanMsg', 'clientOptions' => ['modal' => true, 'title' => YBoard::t('yboard', 'Ban Reason'), 'autoOpen' => false, 'modal' => true, 'height' => 'auto', 'min-height' => 100, 'width' => 200, 'buttons' => [['text' => YBoard::t('yboard', 'close'), 'class' => 'btn btn-sm btn-danger', 'click' => new \yii\web\JsExpression(' function() { $( this ).dialog( "close" ); }')]]]]);
?>
    
    <div id="dlgBanMsgText" class="alert alert-warning panel"></div>
    
<?php 
Dialog::end();
?>
 
Exemplo n.º 17
0
 /**
  * @inheritdoc
  */
 public function attributeLabels()
 {
     return ['id' => YBoard::t('yboard', 'ID'), 'user_id' => YBoard::t('yboard', 'Member'), 'ip' => YBoard::t('yboard', 'IP'), 'email' => YBoard::t('yboard', 'Email'), 'message' => YBoard::t('yboard', 'Reason'), 'expires' => YBoard::t('yboard', 'Expires'), 'banned_by' => YBoard::t('yboard', 'Banned By')];
 }
Exemplo n.º 18
0
    Dialog::begin(['id' => 'dlgReportForm', 'clientOptions' => ['modal' => true, 'title' => YBoard::t('yboard', 'Report post'), 'autoOpen' => false, 'modal' => true, 'height' => 'auto', 'width' => 'auto', 'buttons' => [['text' => YBoard::t('yboard', 'Send'), 'class' => 'btn btn-sm btn-success', 'click' => new \yii\web\JsExpression('function(){ 
                        for(instance in CKEDITOR.instances)
                        {
                            CKEDITOR.instances[instance].updateElement();
                        }
                        sendReport(); 
                    }')], ['text' => YBoard::t('yboard', 'Cancel'), 'class' => 'btn btn-sm btn-danger', 'click' => new \yii\web\JsExpression(' function() { $( this ).dialog( "close" ); }')]]]]);
    echo $this->render('_reportForm', ['model' => new YBoardMessage()]);
    Dialog::end();
    Dialog::begin(['id' => 'dlgPrivateMsg', 'clientOptions' => ['modal' => true, 'title' => YBoard::t('yboard', 'Send Private Message'), 'autoOpen' => false, 'modal' => true, 'height' => 'auto', 'width' => 'auto', 'buttons' => [['text' => YBoard::t('yboard', 'Send'), 'class' => 'btn btn-sm btn-success', 'click' => new \yii\web\JsExpression('function(){ 
                        for(instance in CKEDITOR.instances)
                        {
                            CKEDITOR.instances[instance].updateElement();
                        }
                        sendPMForm(); 
                    }')], ['text' => YBoard::t('yboard', 'Cancel'), 'class' => 'btn btn-sm btn-danger', 'click' => new \yii\web\JsExpression(' function() { $( this ).dialog( "close" ); }')]]]]);
    echo $this->render('_PrivateMsgForm', ['model' => new YBoardMessage(['sendfrom' => Yii::$app->user->identity->id, 'sendto' => 0])]);
    Dialog::end();
}
//for viewing who appreciated post
Dialog::begin(['id' => 'dlg-appreciated', 'clientOptions' => ['modal' => true, 'title' => YBoard::t('yboard', 'Member Appreciated'), 'autoOpen' => false, 'modal' => true, 'height' => 'auto', 'width' => '300', 'buttons' => [['text' => YBoard::t('yboard', 'close'), 'class' => 'btn btn-sm btn-default', 'click' => new \yii\web\JsExpression(' function() { $( this ).dialog( "close" ); }')]]]]);
echo '<div id="appreciated-content" ></div>';
Dialog::end();
?>
</div>

<?php 
//for banning Users
Dialog::begin(['id' => 'dlg-ban', 'clientOptions' => ['modal' => true, 'title' => YBoard::t('yboard', 'Ban User'), 'autoOpen' => false, 'modal' => true, 'height' => 'auto', 'width' => '300']]);
echo $this->render('_banForm', ['model' => new YBoardMessage(['sendfrom' => Yii::$app->user->id, 'sendto' => 0])]);
Dialog::end();
Exemplo n.º 19
0
 
<?php 
$webInfo = DetailView::widget(['model' => $model, 'options' => ['class' => 'table table-striped detail-view'], 'attributes' => [['attribute' => 'blogger', 'visible' => trim($model->blogger) != ""], ['attribute' => 'contact_email', 'value' => $model->contact_email == 0 ? YBoard::t('yboard', 'Forbidden') : YBoard::t('yboard', 'Allowed')], ['attribute' => 'contact_pm', 'value' => $model->contact_pm == 0 ? YBoard::t('yboard', 'Forbidden') : YBoard::t('yboard', 'Allowed')], ['attribute' => 'facebook', 'visible' => trim($model->facebook) != ""], ['attribute' => 'skype', 'visible' => trim($model->skype) != ""], ['attribute' => 'google', 'visible' => trim($model->google) != ""], ['attribute' => 'linkedin', 'visible' => trim($model->linkedin) != ""], ['attribute' => 'metacafe', 'visible' => trim($model->metacafe) != ""], ['attribute' => 'github', 'visible' => trim($model->github) != ""], ['attribute' => 'orkut', 'visible' => trim($model->github) != ""], ['attribute' => 'orkut', 'visible' => trim($model->orkut) != ""], ['attribute' => 'tumblr', 'visible' => trim($model->tumblr) != ""], ['attribute' => 'twitter', 'visible' => trim($model->twitter) != ""], ['attribute' => 'website', 'visible' => trim($model->website) != ""], ['attribute' => 'wordpress', 'visible' => trim($model->wordpress) != ""], ['attribute' => 'yahoo', 'visible' => trim($model->yahoo) != ""], ['attribute' => 'youtube', 'visible' => trim($model->youtube) != ""]]]);
?>
  


<div class="yboard-member-view container">         
    <div class="row">
        <div class="col-md-2">
           <div class="center">
               <?php 
echo Html::img(isset($model->profile->image) ? $model->profile->image : $this->context->module->getRegisteredImage("empty.jpeg"), ['id' => 'user-avatar']);
?>
               <p class="pad5-top"><?php 
echo ucfirst($model->profile->{$this->context->module->userNameColumn});
?>
</p>
                <?php 
echo Html::a(YBoard::t('yboard', 'View Basic Profile'), [$this->context->module->profile['view'], 'id' => $model->id], ['class' => 'btn btn-default btn-md']);
?>
            </div>
        </div>
        
        <div class="col-md-10">
            <?php 
echo Tabs::widget(['items' => [['label' => YBoard::t('yboard', 'Basic Information'), 'content' => $basicInfo, 'active' => true], ['label' => YBoard::t('yboard', 'Forum Statistics'), 'content' => $foroStatistics], ['label' => YBoard::t('yboard', 'Web Information'), 'content' => $webInfo]]]);
?>
        </div>
</div>
Exemplo n.º 20
0
echo $form->field($model, 'moderated')->dropDownList(['0' => YBoard::t('yboard', 'No'), '1' => YBoard::t('yboard', 'Yes')], ['id' => 'YBoardForum_moderated']);
?>
    </span>

    <?php 
echo $form->field($model, 'membergroup_id')->dropDownList(array_merge([0 => 'All Members'], ArrayHelper::map(YBoardMembergroup::find()->specificScope()->all(), 'id', 'name')), ['id' => 'YBoardForum_membergroup']);
?>


    <span class="YBoardForum_polls">
        <?php 
echo $form->field($model, 'poll')->dropDownList(['0' => YBoard::t('yboard', 'No polls'), '1' => YBoard::t('yboard', 'Moderator polls'), '2' => YBoard::t('yboard', 'User polls')], ['id' => 'YBoardForum_polls']);
?>
    </span>
    
    <span class="YBoardForum_type">
        <?php 
echo $form->field($model, 'type')->dropDownList(['0' => YBoard::t('yboard', 'Category'), '1' => YBoard::t('yboard', 'Forum')], ['id' => 'YBoardForum_type']);
?>
    </span>

    <?php 
echo Html::activeHiddenInput($model, 'id', ['id' => 'YBoardForum_id']);
?>

<?php 
\yii\widgets\ActiveForm::end();
?>

</div><!-- form -->
Exemplo n.º 21
0
 /**
  * @inheritdoc
  */
 public function attributeLabels()
 {
     return ['id' => YBoard::t('yboard', 'ID'), 'last_visit' => YBoard::t('yboard', 'Last Visit')];
 }
Exemplo n.º 22
0
    
    <div class="forum-cell center col-md-2 ">
        <?php 
echo Html::encode($model->num_replies);
?>
<br>
        <?php 
echo Html::encode($model->getAttributeLabel('num_replies'));
?>
    </div>
    
    <div class="forum-cell center col-md-2 ">
        <?php 
echo Html::encode($model->num_views);
?>
<br>
        <?php 
echo Html::encode($model->getAttributeLabel('num_views'));
?>
    </div>
    
    <div class="forum-cell last-cell col-md-3">
        <?php 
echo Html::encode($model->lastPost->poster->profile->username);
echo Html::a(Html::img($this->context->module->getRegisteredImage('next.png'), ['alt' => 'next', 'style' => 'margin-left:5px;']), ['topic', 'id' => $model->id, 'nav' => 'last'], ['title' => YBoard::t('yboard', 'Last Reply')]);
echo '<br>';
echo DateTimeCalculation::longDate($model->lastPost->create_time);
?>
    </div>
</div>
Exemplo n.º 23
0
 /**
  * @inheritdoc
  */
 public function attributeLabels()
 {
     return ['member_id' => YBoard::t('yboard', 'Member ID'), 'post_id' => YBoard::t('yboard', 'Post ID')];
 }
Exemplo n.º 24
0
        </div>
	</div> 
    
    <div class="row">  
        <div class="col-md-12"> 
            <ul class="list-group">
                <li class="header2 header2-style"><?php 
echo YBoard::t('yboard', 'Bans Ending Soon');
?>
</li>
                <li class="list-group-item header4">
                    <?php 
echo YBoard::t('yboard', '{number} Banned Members', ['number' => $bannedUsers > 0 ? $bannedUsers : YBoard::t('yboard', 'No')]);
?>
                </li> 
                <li class="list-group-item header4">
                    <?php 
echo YBoard::t('yboard', '{number} Banned Emails', ['number' => $bannedEmails > 0 ? $bannedEmails : YBoard::t('yboard', 'No')]);
?>
                </li> 
                <li class="list-group-item header4">
                    <?php 
echo YBoard::t('yboard', '{number} Banned IPs', ['number' => $bannedIps > 0 ? $bannedIps : YBoard::t('yboard', 'No')]);
?>
                </li> 
            </ul>
        </div>
	</div> 
</div> 

Exemplo n.º 25
0
<?php

/* @var $this ForumController */
/* @var $forum YBoardForum */
/* @var $topic YBoardTopic */
/* @var $post YBoardPost */
use app\modules\yboard\YBoard;
$this->params['breadcrumbs'] = [['label' => YBoard::t('yboard', 'Forums'), 'url' => ['forum/index']], ['label' => $forum->name, 'url' => ['/forum/forum/forum', 'id' => $forum->id]], ['label' => $topic->title, 'url' => ['/forum/forum/forum', 'id' => $forum->id]], YBoard::t('yboard', 'Change')];
$items = [['label' => YBoard::t('yboard', 'Forums'), 'url' => ['/forum/forum/index']], ['label' => YBoard::t('yboard', 'Members'), 'url' => ['/forum/member/index']]];
$this->title = YBoard::t('yboard', 'Updating {post}', ['post' => $topic->title]);
?>
<div id="yboard-wrapper"> 
	
	<?php 
echo $this->render('_form', ['post' => $post]);
?>
</div>
Exemplo n.º 26
0
                <div class="forum-cell col-md-3 last-cell">
                    <div class="hidden-xs"> 
                        <?php 
    if ($forum->last_post_id && $forum->lastPost) {
        echo Html::a(Html::encode($forum->lastPost->topic->title), ['topic', 'id' => $forum->lastPost->topic_id]);
        echo '<br>' . YBoard::t('yboard', 'Last post by') . ' ' . Html::encode($forum->lastPost->poster->profile->username);
        echo Html::a(Html::img($this->context->module->getRegisteredImage('next.png'), ['style' => 'margin-left:5px;', 'title' => YBoard::t('yboard', 'view last post')]), ['topic', 'id' => $forum->lastPost->topic_id, 'nav' => 'last']);
        echo '<br>';
        echo ' ' . YBoard::t('yboard', 'on') . ' ' . DateTimeCalculation::medium($forum->lastPost->create_time);
    } else {
        echo YBoard::t('yboard', 'No posts');
    }
    ?>
                    </div>
                    
                    <div class="visible-xs">
                        <?php 
    echo YBoard::t('yboard', '{topics, plural, =0{No Topic} =1{One Topic} other{# Topics}}. Last Post {time}', ['topics' => $forum->num_topics == null ? 0 : $forum->num_topics, 'time' => DateTimeCalculation::short($forum->lastPost == null ? 0 : $forum->lastPost->create_time)]);
    ?>
                    </div>
                </div>
            </div>
        <?php 
}
?>
        <!-- /do render forums here-->
    </div>
    
</div> 

Exemplo n.º 27
0
<?php

/* @var $this MessageController */
/* @var $model YBoardMessage */
/* @var $count Array */
use yii\helpers\Html;
use yii\grid\GridView;
use yii\data\ActiveDataProvider;
use yii\web\JsExpression;
use app\modules\yboard\YBoard;
use app\modules\yboard\components\DateTimeCalculation;
$this->title = YBoard::t('yboard', 'Reported Posts');
$this->params['breadcrumbs'] = [['label' => YBoard::t('yboard', 'Forums'), 'url' => ['forum/index']], ['label' => YBoard::t('yboard', 'Mod CP'), 'url' => ['moderator/index']], $this->title];
?>
<div id="yboard-wrapper" class="container">
    
	<div id="yboard-message"></div><br>
 
    <?php 
\yii\widgets\Pjax::begin();
?>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => null, 'id' => 'inbox-grid-box', 'rowOptions' => function ($model, $index, $widget, $grid) {
    return ['class' => $model->read_indicator ? '' : 'unread', 'id' => 'msg_id_' . $model->id];
}, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'sendfrom', 'value' => function ($model, $key, $index, $column) {
    return $model->sender->profile->username;
}], 'subject', ['attribute' => 'create_time', 'value' => function ($model, $key, $index, $column) {
    return DateTimeCalculation::short($model->create_time);
}], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{view} {delete}', 'buttons' => ['view' => function ($url, $model) {
    // return the button HTML code
    $src = $this->context->module->getRegisteredImage('view.png');
Exemplo n.º 28
0
 public function actionOutbox($id = null)
 {
     if (!Yii::$app->user->can('app.forum.message.outbox')) {
         throw new ForbiddenHttpException(YBoard::t('yboard', 'You have no enough permission to access this page! If you think its a mistake, please consider reporting to us.'));
     }
     if ($id == null) {
         $id = Yii::$app->user->id;
     }
     $count['inbox'] = YBoardMessage::find()->inboxScope()->andWhere(['sendto' => Yii::$app->user->id])->count();
     $query = YBoardMessage::find()->outboxScope()->andWhere(['sendfrom' => Yii::$app->user->id]);
     $count['outbox'] = $query->count();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     //print_r(Yii::$app->request->queryParams); die();
     //$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('outbox', ['dataProvider' => $dataProvider, 'count' => $count]);
 }
Exemplo n.º 29
0
 /**
  * @inheritdoc
  */
 public function attributeLabels()
 {
     return ['id' => YBoard::t('yboard', 'ID'), 'key' => YBoard::t('yboard', 'Key'), 'value' => YBoard::t('yboard', 'Value')];
 }
Exemplo n.º 30
-1
$this->params['breadcrumbs'] = [['label' => YBoard::t('yboard', 'Forums'), 'url' => ['forum/index']], ['label' => YBoard::t('yboard', 'settings'), 'url' => ['index']], YBoard::t('yboard', 'Member groups')];
$this->params['adminMenu'] = [['label' => YBoard::t('yboard', 'Settings'), 'url' => ['setting/index']], ['label' => YBoard::t('yboard', 'Manage forums'), 'url' => ['setting/forum']], ['label' => YBoard::t('yboard', 'Ranks'), 'url' => ['setting/rank']], ['label' => YBoard::t('yboard', 'Moderators'), 'url' => ['setting/moderator']], ['label' => YBoard::t('yboard', 'Webspiders'), 'url' => ['setting/spider']]];
$this->registerJs("\nvar confirmation = '" . YBoard::t('yboard', 'Are you sure that you want to delete this member group?') . "'\n", \yii\web\View::POS_BEGIN, 'confirmation');
?>

<div id="yboard-wrapper">
	<div class="pad5-bottom">
        <?php 
echo Html::button(YBoard::t('yboard', 'New Group') . ' <span class="glyphicon glyphicon-user"></span>', ['onclick' => 'editMembergroup()', 'class' => 'btn btn-primary btn-sm']);
?>
    </div>
	
	<?php 
echo \yii\grid\GridView::widget(['id' => 'membergroup-grid', 'layout' => '{items} {summary} {pager}', 'dataProvider' => $model->search(), 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'name', 'description', ['attribute' => 'color', 'format' => 'html', 'value' => function ($data) {
    return Html::tag('p', $data->color);
}, 'contentOptions' => function ($model, $key, $index, $column) {
    return ['style' => "font-weight:bold;color:" . $model->color . ";"];
}], ['attribute' => 'image', 'format' => 'html', 'value' => function ($data) {
    return Html::img($this->context->module->getRegisteredImage('groups/' . $data->image), ['alt' => $data->image]);
}, 'contentOptions' => function ($model, $key, $index, $column) {
    return ['style' => "color:" . $model->color . ";"];
}], 'group_role', ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update}', 'buttons' => ['update' => function ($url, $model) {
    return Html::a('<span class="glyphicon glyphicon-pencil"></span>', '#', ['title' => Yii::t('yii', 'Update'), 'data-pjax' => '0', 'onclick' => 'editMembergroup(' . $model->id . ', "' . Yii::$app->urlManager->createAbsoluteUrl($this->context->module->id . '/setting/get-membergroup') . '"); return false;']);
}]]]]);
?>
</div>

<?php 
\yii\jui\Dialog::begin(['id' => 'dlgEditMembergroup', 'clientOptions' => ['title' => 'Member Group', 'autoOpen' => false, 'modal' => true, 'width' => 400, 'show' => 'fade', 'buttons' => [YBoard::t('yboard', 'Delete') => new JsExpression('function(){ deleteMembergroup("' . Yii::$app->urlManager->createAbsoluteUrl(Yii::$app->controller->module->id . '/setting/delete-membergroup') . '"); }'), YBoard::t('yboard', 'Save') => new JsExpression('function(){ saveMembergroup("' . Yii::$app->urlManager->createAbsoluteUrl(Yii::$app->controller->module->id . '/setting/save-membergroup') . '"); }'), YBoard::t('yboard', 'Cancel') => new JsExpression('function(){ $(this).dialog("close"); }')]]]);
echo $this->render('_editMembergroup', ['model' => $model]);
\yii\jui\Dialog::end();