コード例 #1
0
ファイル: move.php プロジェクト: mpf-soft/social-modules
<?php

/* @var $this \mpf\modules\forum\components\Controller */
/* @var $model \mpf\modules\forum\models\ForumThread */
echo \app\components\htmltools\Page::get()->title(\mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['home', 'index']), $this->forumTitle) . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " " . \mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['category', 'index', ['category' => $model->subcategory->category->url_friendly_name, 'id' => $model->subcategory->category_id]]), $model->subcategory->category->name) . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " " . \mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['subcategory', 'index', ['category' => $model->subcategory->category->url_friendly_name, 'subcategory' => $model->subcategory->url_friendly_title, 'id' => $model->subcategory->category_id]]), $model->subcategory->title) . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " " . \mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['thread', 'index', ['category' => $model->subcategory->category->url_friendly_name, 'subcategory' => $model->subcategory->url_friendly_title, 'id' => $model->id]]), $model->title) . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " " . \mpf\modules\forum\components\Translator::get()->translate("Move post"));
?>

<div class="forum-page <?php 
echo $this->forumPageTheme;
?>
">
    <?php 
$this->displayComponent('searchbar');
?>
    <?php 
$this->displayComponent('topuserpanel');
?>
    <?php 
echo \mpf\widgets\form\Form::get(['name' => 'move', 'model' => $model, 'theme' => 'default-wide', 'fields' => [['name' => 'subcategory_id', 'type' => 'select', 'options' => \mpf\modules\forum\models\ForumSubcategory::getAllForSelectTree($this->sectionId)]]])->display();
?>
</div>
コード例 #2
0
<?php

/* @var $this \mpf\modules\forum\controllers\Home */
/* @var $model \mpf\modules\forum\models\ForumUser2Section */
$menu = [];
if (\mpf\modules\forum\components\UserAccess::get()->isSectionAdmin($this->sectionId)) {
    ?>
    <?php 
    $menu = [['url' => $this->updateURLWithSection(['manage', 'groups']), 'label' => 'Manage Groups'], ['url' => $this->updateURLWithSection(['manage', 'categories']), 'label' => 'Manage Categories'], ['url' => $this->updateURLWithSection(['manage', 'users']), 'label' => 'Manage Users'], ['url' => $this->updateURLWithSection(['manage', 'titles']), 'label' => 'Manage Titles']];
}
echo \app\components\htmltools\Page::get()->title(\mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['home', 'index']), $this->forumTitle) . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " Control Panel", $menu);
?>

<div class="forum-page <?php 
echo $this->forumPageTheme;
?>
">
    <?php 
$this->displayComponent('topuserpanel');
?>
    <?php 
if ((!\mpf\modules\forum\components\UserAccess::get()->isMember($this->sectionId) || \mpf\modules\forum\components\UserAccess::get()->isBanned($this->sectionId)) && !\mpf\modules\forum\components\UserAccess::get()->isSiteModerator() && !\mpf\modules\forum\components\UserAccess::get()->isSiteAdmin()) {
    ?>
        <?php 
    $this->displayComponent('accessdenied', ['location' => 'members']);
    ?>
        <?php 
    return;
    ?>
    <?php 
}
コード例 #3
0
ファイル: titles.php プロジェクト: mpf-soft/social-modules
<?php

/* @var $this \mpf\modules\forum\controllers\Manage */
/* @var $model \mpf\modules\forum\models\ForumTitle */
echo \app\components\htmltools\Page::get()->title(\mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['home', 'index']), $this->forumTitle) . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " Users", \mpf\modules\forum\components\UserAccess::get()->isSectionAdmin($this->sectionId) ? [['url' => $this->updateURLWithSection(['manage', 'groups']), 'label' => 'Manage Groups'], ['url' => $this->updateURLWithSection(['manage', 'categories']), 'label' => 'Manage Categories'], ['url' => $this->updateURLWithSection(['manage', 'users']), 'label' => 'Manage Users'], ['url' => $this->updateURLWithSection(['manage', 'titles']), 'label' => 'Manage Titles', 'htmlOptions' => ['class' => 'selected']], ['url' => $this->updateURLWithSection(['manage', 'newTitle']), 'label' => 'New Title']] : [['url' => $this->updateURLWithSection(['manage', 'users']), 'label' => 'Manage Users'], ['url' => $this->updateURLWithSection(['manage', 'titles']), 'label' => 'Manage Titles', 'htmlOptions' => ['class' => 'selected']]]);
\mpf\widgets\datatable\Table::get(['dataProvider' => $model->getDataProvider($this->sectionId), 'columns' => ['id', 'title', ['class' => 'Actions', 'buttons' => ['delete' => ['class' => 'Delete', 'url' => $this->getUrlForDatatableAction('delete')], 'edit' => ['class' => 'Edit', 'url' => $this->getUrlForDatatableAction('editTitle')]]]]])->display();
コード例 #4
0
ファイル: index.php プロジェクト: mpf-soft/social-modules
<?php

/* @var $this \mpf\modules\forum\controllers\Home */
/* @var $categories \mpf\modules\forum\models\ForumCategory[] */
$menu = [];
if (\mpf\modules\forum\components\UserAccess::get()->isSectionAdmin($this->sectionId)) {
    ?>
    <?php 
    $menu = [['url' => $this->updateURLWithSection(['manage', 'groups']), 'label' => 'Manage Groups'], ['url' => $this->updateURLWithSection(['manage', 'categories']), 'label' => 'Manage Categories'], ['url' => $this->updateURLWithSection(['manage', 'users']), 'label' => 'Manage Users'], ['url' => $this->updateURLWithSection(['manage', 'titles']), 'label' => 'Manage Titles']];
} elseif (\mpf\modules\forum\components\UserAccess::get()->isSectionModerator($this->sectionId)) {
    ?>
    <?php 
    $menu = [['url' => $this->updateURLWithSection(['manage', 'users']), 'label' => 'Manage Users'], ['url' => $this->updateURLWithSection(['manage', 'titles']), 'label' => 'Manage Titles']];
}
echo \app\components\htmltools\Page::get()->title($this->forumTitle, $menu);
?>
<div class="forum-page <?php 
echo $this->forumPageTheme;
?>
">
    <?php 
$this->displayComponent('searchbar');
?>
    <?php 
$this->displayComponent('topuserpanel');
?>

    <?php 
if (!\mpf\modules\forum\components\UserAccess::get()->canRead($this->sectionId)) {
    ?>
        <?php 
コード例 #5
0
ファイル: recent.php プロジェクト: mpf-soft/social-modules
<?php

/* @var $this \mpf\modules\forum\controllers\Home */
/* @var $categories \mpf\modules\forum\models\ForumCategory[] */
/* @var $threads \mpf\modules\forum\models\ForumThread[] */
$menu = [];
if (\mpf\modules\forum\components\UserAccess::get()->isSectionAdmin($this->sectionId)) {
    ?>
    <?php 
    $menu = [['url' => $this->updateURLWithSection(['manage', 'groups']), 'label' => 'Manage Groups'], ['url' => $this->updateURLWithSection(['manage', 'categories']), 'label' => 'Manage Categories'], ['url' => $this->updateURLWithSection(['manage', 'users']), 'label' => 'Manage Users'], ['url' => $this->updateURLWithSection(['manage', 'titles']), 'label' => 'Manage Titles']];
}
echo \app\components\htmltools\Page::get()->title(\mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['home']), \mpf\modules\forum\components\Translator::get()->translate($this->forumTitle)) . " " . \mpf\modules\forum\components\Config::value("FORUM_PAGE_TITLE_SEPARATOR") . " " . \mpf\modules\forum\components\Translator::get()->translate("Recent Threads"), $menu);
?>
<div class="forum-page <?php 
echo $this->forumPageTheme;
?>
">
    <?php 
$this->displayComponent('searchbar');
?>
    <?php 
$this->displayComponent('topuserpanel');
?>

    <?php 
if (!\mpf\modules\forum\components\UserAccess::get()->canRead($this->sectionId)) {
    ?>
        <?php 
    $this->displayComponent('accessdenied', ['location' => 'section']);
    ?>
        <?php 
コード例 #6
0
<?php

echo \app\components\htmltools\Page::get()->title("Access denied!");
コード例 #7
0
<?php

/* @var $this \mpf\modules\forum\controllers\Manage */
/* @var $model \mpf\modules\forum\models\ForumSubcategory */
/* @var $category \mpf\modules\forum\models\ForumCategory */
echo \app\components\htmltools\Page::get()->title(\mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['home', 'index']), $this->forumTitle) . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " " . $category->name . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " Subcategories", [['url' => $this->updateURLWithSection(['manage', 'groups']), 'label' => 'Manage Groups'], ['url' => $this->updateURLWithSection(['manage', 'categories']), 'label' => 'Manage Categories'], ['url' => $this->updateURLWithSection(['manage', 'users']), 'label' => 'Manage Users'], ['url' => $this->updateURLWithSection(['manage', 'titles']), 'label' => 'Manage Titles'], ['url' => $this->updateURLWithSection(['manage', 'newCategory']), 'label' => 'New Category'], ['url' => $this->updateURLWithSection(['manage', 'newSubcategory', ['category' => $category->id]]), 'label' => 'New Subcategory']]);
\mpf\widgets\datatable\Table::get(['dataProvider' => $model->getDataProvider($category->id), 'columns' => ['title', 'user_id' => ['value' => '$row->owner->name'], 'description', ['class' => 'Actions', 'buttons' => ['delete' => ['class' => 'Delete', 'iconSize' => 22, 'url' => $this->getUrlForDatatableAction('delete')], 'edit' => ['class' => 'Edit', 'iconSize' => 22, 'url' => $this->getUrlForDatatableAction('editSubcategory')]]]]])->display();
コード例 #8
0
ファイル: group.php プロジェクト: mpf-soft/social-modules
<?php

/* @var $this \mpf\modules\forum\controllers\Manage */
/* @var $model \mpf\modules\forum\models\ForumUserGroup */
echo \app\components\htmltools\Page::get()->title(\mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['home', 'index']), $this->forumTitle) . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " User Groups " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " " . ($model->isNewRecord() ? 'New Group' : 'Edit ' . $model->full_name), [['url' => ['manage', 'groups'], 'label' => 'Manage Groups'], ['url' => ['manage', 'categories'], 'label' => 'Manage Categories'], ['url' => $this->updateURLWithSection(['manage', 'users']), 'label' => 'Manage Users'], ['url' => $this->updateURLWithSection(['manage', 'titles']), 'label' => 'Manage Titles'], ['url' => ['manage', 'newGroup'], 'label' => 'New Group', 'htmlOptions' => $model->isNewRecord() ? ['class' => 'selected'] : []]]);
echo \mpf\widgets\form\Form::get(['model' => $model, 'name' => 'save', 'theme' => 'default-wide', 'fields' => ['full_name', 'html_class', ['name' => 'admin', 'type' => 'radio', 'options' => ['No', 'Yes']], ['name' => 'moderator', 'type' => 'radio', 'options' => ['No', 'Yes']], ['name' => 'newthread', 'type' => 'radio', 'options' => ['No', 'Yes']], ['name' => 'threadreply', 'type' => 'radio', 'options' => ['No', 'Yes']], ['name' => 'canread', 'type' => 'radio', 'options' => ['No', 'Yes']]]])->display();
コード例 #9
0
<?php

require_once dirname(dirname(__DIR__)) . '/layout/header.php';
echo \app\components\htmltools\Page::get()->title('Blog');
require_once dirname(dirname(__DIR__)) . '/layout/footer.php';
コード例 #10
0
ファイル: notfound.php プロジェクト: mpf-soft/social-modules
<?php

echo \app\components\htmltools\Page::get()->title("Page not found!");
コード例 #11
0
ファイル: index.php プロジェクト: mpf-soft/social-modules
<?php

/* @var $this \mpf\modules\forum\controllers\Home */
/* @var $subcategory \mpf\modules\forum\models\ForumSubcategory */
/* @var $threads \mpf\modules\forum\models\ForumThread[] */
/* @var $currentPage int */
$menu = [];
if (\mpf\modules\forum\components\UserAccess::get()->isSectionAdmin($this->sectionId)) {
    ?>
    <?php 
    $menu = [['url' => $this->updateURLWithSection(['manage', 'groups']), 'label' => 'Manage Groups'], ['url' => $this->updateURLWithSection(['manage', 'categories']), 'label' => 'Manage Categories'], ['url' => $this->updateURLWithSection(['manage', 'users']), 'label' => 'Manage Users'], ['url' => $this->updateURLWithSection(['manage', 'titles']), 'label' => 'Manage Titles']];
}
echo \app\components\htmltools\Page::get()->title(\mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['home', 'index']), $this->forumTitle) . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " " . \mpf\web\helpers\Html::get()->link($this->updateURLWithSection(['category', 'index', ['category' => $subcategory->category->url_friendly_name, 'id' => $subcategory->category_id]]), $subcategory->category->name) . " " . \mpf\modules\forum\components\Config::value('FORUM_PAGE_TITLE_SEPARATOR') . " " . $subcategory->title, $menu);
?>

<div class="forum-page <?php 
echo $this->forumPageTheme;
?>
">
    <?php 
$this->displayComponent('searchbar');
?>
    <?php 
$this->displayComponent('topuserpanel');
?>

    <?php 
if (!\mpf\modules\forum\components\UserAccess::get()->canRead($this->sectionId)) {
    ?>
        <?php 
    $this->displayComponent('accessdenied', ['location' => 'subcategory']);
コード例 #12
0
ファイル: header.php プロジェクト: mpf-soft/social-modules
<?php

if (\mpf\modules\blog\components\BlogConfig::get()->customHeader) {
    ?>
    <?php 
    require_once \mpf\modules\blog\components\BlogConfig::get()->customHeader;
    ?>
    <?php 
    return;
}
echo \app\components\htmltools\Page::get()->title($this->blogTitle . ($this->subTitle ? ' - ' . $this->subTitle : ''));
?>
<div id="blog-page">
    <div id="main-blog-section">