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


PHP _i函数代码示例

本文整理汇总了PHP中_i函数的典型用法代码示例。如果您正苦于以下问题:PHP _i函数的具体用法?PHP _i怎么用?PHP _i使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: action_information

 public function action_information()
 {
     $data = ['info' => S::getEnvironment($this->getContext())];
     $this->param_manager->setParam('method_title', _i('Information'));
     $this->builder->createPartial('body', 'system/information')->getParamManager()->setParams($data);
     return new Response($this->builder->build());
 }
开发者ID:KasaiDot,项目名称:FoolFrame,代码行数:7,代码来源:System.php

示例2: toString

    public function toString()
    {
        header('X-UA-Compatible: IE=edge,chrome=1');
        header('imagetoolbar: false');
        $url = $this->getParamManager()->getParam('url');
        ?>
<!DOCTYPE html>
<html>
    <head>
        <title><?php 
        echo htmlspecialchars($this->getBuilder()->getProps()->getTitle());
        ?>
</title>
        <meta http-equiv="Refresh" content="0; url=<?php 
        echo $url;
        ?>
">
    </head>
    <body>
        <?php 
        echo _i('You are being redirected to %s.', $url);
        ?>
    </body>
</html><?php 
    }
开发者ID:voh,项目名称:FoolFuuka,代码行数:25,代码来源:Redirect.php

示例3: toString

    public function toString()
    {
        $radix = $this->getBuilderParamManager()->getParam('radix');
        $search = $this->getBuilderParamManager()->getParam('search', []);
        $form = $this->getForm();
        if (is_null($radix) && $this->getPreferences()->get('foolslide.sphinx.global')) {
            // search can work also without a radix selected
            $search_radix = '_';
        } elseif (!is_null($radix)) {
            $search_radix = $radix->shortname;
        }
        if (isset($search_radix)) {
            ?>

        <ul class="nav pull-right">
        <?php 
            echo $form->open(['class' => 'navbar-search', 'method' => 'POST', 'action' => $this->getUri()->create($search_radix . '/search')]);
            ?>

        <li>
        <?php 
            echo $form->input(['name' => 'text', 'value' => isset($search["text"]) ? rawurldecode($search["text"]) : '', 'class' => 'search-query', 'placeholder' => $search_radix !== '_' ? _i('Search or insert post number') : _i('Search through all the boards')]);
            ?>
        </li>
        <?php 
            echo $form->close();
            ?>
        </ul>
        <?php 
        }
    }
开发者ID:KasaiDot,项目名称:FoolSlide2,代码行数:31,代码来源:ToolsSearch.php

示例4: toString

    public function toString()
    {
        $form = $this->getForm();
        echo $form->open(['class' => 'form-account', 'onsubmit' => 'fuel_set_csrf_token(this);']);
        ?>
    <?php 
        echo $form->hidden('csrf_token', $this->getSecurity()->getCsrfToken());
        ?>
    <h2 class="form-account-heading"><?php 
        echo _i('Forgot Password');
        ?>
</h2>

    <?php 
        echo $form->input(['class' => 'input-block-level', 'name' => 'email', 'type' => 'email', 'value' => $this->getPost('email'), 'placeholder' => _i('Email Address'), 'required' => true]);
        ?>

    <?php 
        echo $form->submit(['class' => 'btn btn-primary', 'name' => 'submit', 'value' => _i('Submit')]);
        ?>

    <input type="button" onClick="window.location.href='<?php 
        echo $this->getUri()->create('/admin/account/login/');
        ?>
'" class="btn" value="<?php 
        echo htmlspecialchars(_i('Back'));
        ?>
" />
<?php 
        echo $form->close();
    }
开发者ID:KasaiDot,项目名称:FoolFrame,代码行数:31,代码来源:ForgotPassword.php

示例5: toString

    public function toString()
    {
        /** @var SeriesBulk $series_bulk */
        $release_bulk = $this->getParamManager()->getParam('release_bulk');
        $form = $this->getForm();
        ?>

<div class="admin-container">
    <div class="admin-container-header">
        <?php 
        echo _i('Pages for series %s, chapter ID %s', $release_bulk->series->title, $release_bulk->release->id);
        ?>
    </div>

    <div class="pull-right">
        <?php 
        echo $form->open(['enctype' => 'multipart/form-data', 'onsubmit' => 'fuel_set_csrf_token(this);']);
        ?>
        <?php 
        echo $form->hidden('csrf_token', $this->getSecurity()->getCsrfToken());
        ?>
        <?php 
        echo $form->file(['name' => 'pages']);
        ?>
        <?php 
        echo $form->submit(['name' => 'Submit']);
        ?>
        <?php 
        echo $form->close();
        ?>
    </div>
</div>
<?php 
    }
开发者ID:KasaiDot,项目名称:FoolSlide2,代码行数:34,代码来源:ManagePages.php

示例6: toString

    public function toString()
    {
        $form = $this->getForm();
        ?>
<div class="admin-container">
    <div class="admin-container-header"><?php 
        echo _i('Change Password');
        ?>
</div>
    <p>
        <?php 
        echo _i('To change your password click the button below.<br>An email will be sent to your registered email account with further instructions.');
        ?>

        <hr/>

        <?php 
        echo $form->open(['onsubmit' => 'fuel_set_csrf_token(this);']);
        ?>
        <?php 
        echo $form->hidden('csrf_token', $this->getSecurity()->getCsrfToken());
        ?>
        <?php 
        echo $form->submit(['class' => 'btn btn-primary', 'name' => 'submit', 'value' => _i('Request Password Change')]);
        ?>
        <?php 
        echo $form->close();
        ?>
    </p>
</div>
<?php 
    }
开发者ID:KasaiDot,项目名称:FoolFrame,代码行数:32,代码来源:RequestChangePassword.php

示例7: toString

    public function toString()
    {
        ?>
        <div id="post_tools_modal" class="modal hide fade">
            <div class="modal-header">
                <a href="#" class="close">&times;</a>
                <h3 class="title"></h3>
            </div>
            <div class="modal-body" style="text-align: center">
                <div class="modal-error"></div>
                <div class="modal-loading loading"><img src="<?php 
        echo $this->getAssetManager()->getAssetLink('images/loader-18.gif');
        ?>
"/></div>
                <div class="modal-information"></div>
            </div>
            <div class="modal-footer">
                <input type="button" value="<?php 
        echo htmlspecialchars(_i('Submit'));
        ?>
" href="#" class="btn btn-primary submitModal" data-function="submitModal" data-report="0" data-delete="0">
                <input type="button" value="<?php 
        echo htmlspecialchars(_i('Cancel'));
        ?>
" href="#" class="btn secondary closeModal" data-function="closeModal">
            </div>
        </div>
        <?php 
    }
开发者ID:KasaiDot,项目名称:FoolSlide2,代码行数:29,代码来源:ToolsModal.php

示例8: before

 public function before()
 {
     $request = $this->getRequest();
     $this->uri = $this->getContext()->getService('uri');
     $this->mailer = $this->getContext()->getService('mailer');
     $this->notices = $this->getContext()->getService('notices');
     $this->preferences = $this->getContext()->getService('preferences');
     $this->config = $this->getContext()->getService('config');
     $this->security = $this->getContext()->getService('security');
     $theme_instance = \Foolz\Theme\Loader::forge('foolframe_admin');
     $theme_instance->addDir(VENDPATH . 'foolz/foolframe/assets/themes-admin/');
     $theme_instance->addDir(VAPPPATH . 'foolz/foolframe/themes-admin/');
     $theme_instance->setBaseUrl($this->uri->base() . 'foolframe/');
     $theme_instance->setPublicDir(DOCROOT . 'foolframe/');
     // make it possible to override the theme so other framework components can extend with their own
     $this->setupTheme($theme_instance);
     $this->builder = $this->theme->createBuilder();
     $this->param_manager = $this->builder->getParamManager();
     $this->builder->createLayout('base');
     $this->builder->getProps()->addTitle(_i('Control Panel') . ' - ' . $this->preferences->get('foolframe.gen.website_title'));
     $this->param_manager->setParams(['context' => $this->getContext(), 'notices' => $this->notices, 'uri' => $this->uri, 'request' => $request]);
     // returns the hardcoded sidebar array (can't use functions when declaring a class variable)
     $sidebar = $this->getSidebarValues();
     $sidebar_dynamic = Hook::forge('Foolz\\FoolFrame\\Controller\\Admin::before#var.sidebar')->setObject($this)->setParam('sidebar', [])->execute()->getParam('sidebar');
     // merge if there were sidebar elements added dynamically
     if (!empty($sidebar_dynamic)) {
         $sidebar = $this->mergeSidebars($sidebar, $sidebar_dynamic);
     }
     $this->builder->createPartial('navbar', 'navbar');
     $this->builder->createPartial('sidebar', 'sidebar')->getParamManager()->setParams(['sidebar' => $this->getSidebar($request, $sidebar)]);
 }
开发者ID:KasaiDot,项目名称:FoolFrame,代码行数:31,代码来源:Admin.php

示例9: toString

    public function toString()
    {
        $title = $this->getParamManager()->getParam('title');
        $form = $this->getForm();
        ?>
            <div class="alert alert-success" style="margin:15% 30%;">
                <h4 class="alert-heading"><?php 
        echo e($title);
        ?>
</h4>
                <br>
                <?php 
        echo $form->open();
        ?>
                <?php 
        echo $form->hidden('csrf_token', $this->getSecurity()->getCsrfToken());
        ?>
                <?php 
        echo _i('Explain in short (max. 500 chars) why your ban should be lifted.');
        ?>
                <br>
                <?php 
        echo $form->textarea(['name' => 'appeal', 'style' => 'width: 100%; height: 100px; margin: 10px 0']);
        ?>
                <?php 
        echo $form->submit(['name' => 'submit', 'value' => _i('Submit'), 'class' => 'btn btn-inverse']);
        ?>
                <?php 
        echo $form->close();
        ?>
            </div>
        <?php 
    }
开发者ID:procod3R,项目名称:FoolFuuka,代码行数:33,代码来源:Appeal.php

示例10: toString

    public function toString()
    {
        $form = $this->getForm();
        $modules = $this->getParamManager()->getParam('modules');
        ?>
        <p class="description">
            <?php 
        echo _i('Congratulations, you have completed the installation and setup of FoolFrame. Please choose the module(s) you wish to install below:');
        ?>
        </p>

        <?php 
        echo $form->open();
        ?>

            <?php 
        foreach ($modules as $module => $info) {
            ?>
                <label class="checkbox">
                    <?php 
            if ($info['disabled']) {
                ?>
                        <input type="checkbox" name="<?php 
                echo $module;
                ?>
" disabled="disabled" />
                    <?php 
            } else {
                ?>
                        <input type="checkbox" name="<?php 
                echo $module;
                ?>
" />
                    <?php 
            }
            ?>
                    <?php 
            echo $info['title'];
            ?>
                </label>
                <p style="font-size: 0.8em; padding-left: 20px"><?php 
            echo $info['description'];
            ?>
</p>
            <?php 
        }
        ?>

            <hr>

            <?php 
        echo $form->submit(array('name' => 'submit', 'value' => _i('Next'), 'class' => 'btn btn-success pull-right'));
        ?>
        <?php 
        echo $form->close();
        ?>
        <?php 
    }
开发者ID:KasaiDot,项目名称:FoolFrame,代码行数:58,代码来源:Modules.php

示例11: action_manage

 public function action_manage()
 {
     $this->param_manager->setParam('method_title', [_i('Foolslide'), _i("Board Statistics"), _i('Manage')]);
     $data['form'] = $this->structure();
     $this->preferences->submit_auto($this->getRequest(), $data['form'], $this->getPost());
     // create a form
     $this->builder->createPartial('body', 'form_creator')->getParamManager()->setParams($data);
     return new Response($this->builder->build());
 }
开发者ID:KasaiDot,项目名称:FoolSlide2,代码行数:9,代码来源:admin.php

示例12: toString

    public function toString()
    {
        $form = $this->getForm();
        ?>
<div class="admin-container">
        <div class="admin-container-header"><?php 
        echo _i('New Password');
        ?>
</div>
        <p>
            <?php 
        echo $form->open(['onsubmit' => 'fuel_set_csrf_token(this);']);
        ?>
            <?php 
        echo $form->hidden('csrf_token', $this->getSecurity()->getCsrfToken());
        ?>

            <div class="control-group">
                <label class="control-label" for="new-password"><?php 
        echo _i('Password');
        ?>
</label>
                <div class="controls">
                    <?php 
        echo $form->password(['id' => 'new-password', 'name' => 'password', 'placeholder' => _i('Password'), 'required' => true]);
        ?>
                </div>
            </div>

            <div class="control-group">
                <label class="control-label" for="new-password-confirm"><?php 
        echo _i('Confirm Password');
        ?>
</label>
                <div class="controls">
                    <?php 
        echo $form->password(['id' => 'new-password-confirm', 'name' => 'confirm_password', 'placeholder' => _i('Password'), 'required' => true]);
        ?>
                </div>
            </div>

            <div class="control-group">
                <div class="controls">
                    <?php 
        echo $form->submit(['class' => 'btn btn-primary', 'name' => 'submit', 'value' => _i('Submit')]);
        ?>
                </div>
            </div>

            <?php 
        echo $form->close();
        ?>
        </p>
    </div>
    <?php 
    }
开发者ID:KasaiDot,项目名称:FoolFrame,代码行数:56,代码来源:ChangePassword.php

示例13: toString

    public function toString()
    {
        $form = $this->getForm();
        ?>
<div class="admin-container">
    <div class="admin-container-header"><?php 
        echo _i('Change Email Address');
        ?>
</div>
    <p>
        <?php 
        echo $form->open(['onsubmit' => 'fuel_set_csrf_token(this);']);
        ?>
        <?php 
        echo $form->hidden('csrf_token', $this->getSecurity()->getCsrfToken());
        ?>

        <div class="control-group">
            <label class="control-label" for="new-email"><?php 
        echo _i('New Email Address');
        ?>
</label>
            <div class="controls">
                <?php 
        echo $form->input(['id' => 'new-email', 'name' => 'email', 'type' => 'email', 'value' => $this->getPost('email'), 'placeholder' => 'test@example.com', 'required' => true]);
        ?>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label" for="password"><?php 
        echo _i('Password');
        ?>
</label>
            <div class="controls">
                <?php 
        echo $form->password(['id' => 'password', 'name' => 'password', 'placeholder' => _i('Password'), 'required' => true]);
        ?>
            </div>
        </div>

        <div class="control-group">
            <div class="controls">
                <?php 
        echo $form->submit(['class' => 'btn btn-primary', 'name' => 'submit', 'value' => _i('Submit')]);
        ?>
            </div>
        </div>

        <?php 
        echo $form->close();
        ?>
    </p>
</div>
<?php 
    }
开发者ID:KasaiDot,项目名称:FoolFrame,代码行数:56,代码来源:RequestChangeEmail.php

示例14: toString

    public function toString()
    {
        ?>
        <nav class="index_nav clearfix">
        <h1><?php 
        echo $this->getPreferences()->get('foolfuuka.gen_index_title');
        ?>
</h1>
        <?php 
        $index_nav = array();
        if ($this->getRadixColl()->getArchives()) {
            $index_nav['archives'] = array('title' => _i('Archives'), 'elements' => array());
            foreach ($this->getRadixColl()->getArchives() as $key => $item) {
                $index_nav['archives']['elements'][] = array('href' => $this->getUri()->create($item->shortname), 'text' => '/' . $item->shortname . '/ <span class="help">' . $item->name . '</span>');
            }
        }
        if ($this->getRadixColl()->getBoards()) {
            $index_nav['boards'] = array('title' => _i('Boards'), 'elements' => array());
            foreach ($this->getRadixColl()->getBoards() as $key => $item) {
                $index_nav['boards']['elements'][] = array('href' => $this->getUri()->create($item->shortname), 'text' => '/' . $item->shortname . '/ <span class="help">' . $item->name . '</span>');
            }
        }
        $index_nav = Hook::forge('foolframe.themes.generic.index_nav_elements')->setObject($this)->setParam('nav', $index_nav)->execute()->get($index_nav);
        $index_nav = Hook::forge('foolfuuka.themes.default.index_nav_elements')->setObject($this)->setParam('nav', $index_nav)->execute()->get($index_nav);
        foreach ($index_nav as $item) {
            ?>
                <ul class="pull-left clearfix">
                    <li><h2><?php 
            echo $item['title'];
            ?>
</h2></li>
                    <li>
                        <ul>
                            <?php 
            foreach ($item['elements'] as $i) {
                ?>
                                <li><h3><a href="<?php 
                echo $i['href'];
                ?>
"><?php 
                echo $i['text'];
                ?>
</a></h3></li>
                            <?php 
            }
            ?>
                        </ul>
                    </li>
                </ul>
            <?php 
        }
        ?>
        </nav>
    <?php 
    }
开发者ID:procod3R,项目名称:FoolFuuka,代码行数:55,代码来源:Index.php

示例15: structure

 /**
  * The structure of the radix table to be used with validation and form creator
  *
  * @param  \Foolz\Foolfuuka\Model\Radix|null  $radix  If available insert to customize the structure
  *
  * @return  array  The structure
  */
 public function structure($radix = null)
 {
     $dc = $this->dc;
     $structure = ['open' => ['type' => 'open'], 'id' => ['type' => 'hidden', 'database' => true, 'validation_func' => function ($input, $form_internal) use($dc) {
         // check that the ID exists
         $row = $dc->qb()->select('COUNT(*) as count')->from($dc->p('boards'), 'b')->where('id = :id')->setParameter(':id', $input['id'])->execute()->fetch();
         if ($row['count'] != 1) {
             return ['error_code' => 'ID_NOT_FOUND', 'error' => _i('Couldn\'t find the board with the submitted ID.'), 'critical' => true];
         }
         return ['success' => true];
     }], 'name' => ['database' => true, 'type' => 'input', 'label' => _i('Name'), 'help' => _i('Insert the title of the board.'), 'placeholder' => _i('Required'), 'class' => 'span3', 'validation' => [new Assert\NotBlank(), new Assert\Length(['max' => 128])]], 'shortname' => ['database' => true, 'type' => 'input', 'label' => _i('Shortname'), 'help' => _i('Insert the shortname for the board. Reserved: "admin". '), 'placeholder' => _i('Req.'), 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\Length(['max' => 32])], 'validation_func' => function ($input, $form_internal) use($dc) {
         // if we're working on the same object
         if (isset($input['id'])) {
             // existence ensured by CRITICAL in the ID check
             $row = $dc->qb()->select('shortname')->from($dc->p('boards'), 'b')->where('id = :id')->setParameter(':id', $input['id'])->execute()->fetch();
             if ($row === false) {
                 return ['error_code' => 'ID_NOT_FOUND', 'error' => _i('Couldn\'t find the board with the submitted ID.')];
             }
             // no change?
             if ($input['shortname'] === $row['shortname']) {
                 // no change
                 return ['success' => true];
             }
         }
         if (!preg_match('/^\\w+$/', $input['shortname'], $matches)) {
             return ['error_code' => 'INVALID SHORTNAME', 'error' => _i('The shortname is must be composed of letters, numbers and underscores.')];
         }
         $row = $dc->qb()->select('shortname')->from($dc->p('boards'), 'r')->where('shortname = :s')->setParameter(':s', $input['shortname'])->execute()->fetch();
         // check that there isn't already a board with that name
         if ($row !== false) {
             return ['error_code' => 'ALREADY_EXISTS', 'error' => _i('The shortname is already used for another board.')];
         }
     }], 'rules' => ['database' => true, 'boards_preferences' => true, 'type' => 'textarea', 'label' => _i('General rules'), 'help' => _i('Full board rules displayed in a separate page, in <a href="http://daringfireball.net/projects/markdown/basics" target="_blank">MarkDown</a> syntax. Will not display if left empty.'), 'class' => 'span6', 'placeholder' => _i('MarkDown goes here')], 'separator-3' => ['type' => 'separator'], 'posting_rules' => ['database' => true, 'boards_preferences' => true, 'type' => 'textarea', 'label' => _i('Posting rules'), 'help' => _i('Posting rules displayed in the posting area, in <a href="http://daringfireball.net/projects/markdown/basics" target="_blank">MarkDown</a> syntax. Will not display if left empty.'), 'class' => 'span6', 'placeholder' => _i('MarkDown goes here')], 'separator-1' => ['type' => 'separator'], 'threads_per_page' => ['database' => true, 'boards_preferences' => true, 'label' => _i('Maximum number of threads to display in the index pages'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\Type('digit')]], 'archive' => ['database' => true, 'type' => 'checkbox', 'help' => _i('Is this a 4chan archiving board?'), 'sub' => ['paragraph' => ['type' => 'paragraph', 'help' => _i('Options for archive boards')], 'board_url' => ['database' => true, 'boards_preferences' => true, 'type' => 'input', 'label' => _i('URL to the 4chan board (facultative)'), 'placeholder' => 'http://boards.4chan.org/' . (is_object($radix) ? $radix->shortname : 'shortname') . '/', 'class' => 'span4', 'validation' => [new Assert\Length(['max' => 256])]], 'thumbs_url' => ['database' => true, 'boards_preferences' => true, 'type' => 'input', 'label' => _i('URL to the board thumbnails (facultative)'), 'placeholder' => 'http://0.thumbs.4chan.org/' . (is_object($radix) ? $radix->shortname : 'shortname') . '/', 'class' => 'span4', 'validation' => [new Assert\Length(['max' => 256])]], 'images_url' => ['database' => true, 'boards_preferences' => true, 'type' => 'input', 'label' => _i('URL to the board images (facultative)'), 'placeholder' => 'http://images.4chan.org/' . (is_object($radix) ? $radix->shortname : 'shortname') . '/', 'class' => 'span4', 'validation' => [new Assert\Length(['max' => 256])]], 'archive_full_images' => ['database' => true, 'boards_preferences' => true, 'help' => _i('Is the archive storing full images?'), 'type' => 'checkbox']], 'sub_inverse' => ['paragraph' => ['type' => 'paragraph', 'help' => _i('Options for normal boards')], 'op_image_upload_necessity' => ['database' => true, 'boards_preferences' => true, 'help' => _i('Select if users have to upload an image when starting a new thread?'), 'type' => 'select', 'default_value' => 'always', 'options' => ['always' => _i('Always'), 'optional' => _i('Optional'), 'never' => _i('Never')]], 'thumbnail_op_width' => ['database' => true, 'boards_preferences' => true, 'label' => _i('Opening post thumbnails maximum width in pixels.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\GreaterThan(['value' => 25])]], 'thumbnail_op_height' => ['database' => true, 'boards_preferences' => true, 'label' => _i('Opening post thumbnails maximum height in pixels.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\GreaterThan(['value' => 25])]], 'thumbnail_reply_width' => ['database' => true, 'boards_preferences' => true, 'label' => _i('Reply thumbnails maximum width in pixels.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\GreaterThan(['value' => 25])]], 'thumbnail_reply_height' => ['database' => true, 'boards_preferences' => true, 'label' => _i('Reply thumbnails maximum height in pixels.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\GreaterThan(['value' => 25])]], 'max_image_size_kilobytes' => ['database' => true, 'boards_preferences' => true, 'label' => _i('Full image maximum size in kilobytes.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\GreaterThan(['value' => 25])]], 'max_image_size_width' => ['database' => true, 'boards_preferences' => true, 'label' => _i('Full image maximum width in pixels.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\GreaterThan(['value' => 25])]], 'max_image_size_height' => ['database' => true, 'boards_preferences' => true, 'label' => _i('Full image maximum height in pixels.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\GreaterThan(['value' => 25])]], 'max_posts_count' => ['database' => true, 'boards_preferences' => true, 'label' => _i('The maximum replies for each thread.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\GreaterThan(['value' => 25])]], 'max_images_count' => ['database' => true, 'boards_preferences' => true, 'label' => _i('The maximum image replies for each thread.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\Type('digit')]], 'cooldown_new_thread' => ['database' => true, 'boards_preferences' => true, 'label' => _i('The minimum delay to start new threads for each user in seconds.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\Type('digit')]], 'thread_lifetime' => ['database' => true, 'boards_preferences' => true, 'label' => _i('The amount of time a thread will stay alive in seconds.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\Type('digit')]], 'min_image_repost_time' => ['database' => true, 'boards_preferences' => true, 'label' => _i('The minimum delay between posting the same image in seconds.<br>(0 means no limit, -1 means never allowing a repost)'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\GreaterThan(['value' => -2])]]]], 'anonymous_default_name' => ['database' => true, 'boards_preferences' => true, 'label' => _i('The default name if a user doesn\'t enter a name.'), 'type' => 'input', 'class' => 'span3', 'validation' => [new Assert\NotBlank()]], 'max_comment_characters_allowed' => ['database' => true, 'boards_preferences' => true, 'label' => _i('The maximum number of characters allowed in the post.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\Type('digit')]], 'max_comment_lines_allowed' => ['database' => true, 'boards_preferences' => true, 'label' => _i('The maximum number of lines in the post.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\Type('digit')]], 'cooldown_new_comment' => ['database' => true, 'boards_preferences' => true, 'label' => _i('The minimum delay between posts for each user in seconds.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\Type('digit')]], 'captcha_comment_link_limit' => ['database' => true, 'boards_preferences' => true, 'label' => _i('Maximum allowed `HTTP` links before triggering spam detection.'), 'type' => 'input', 'class' => 'span1', 'validation' => [new Assert\NotBlank(), new Assert\Type('digit')]], 'transparent_spoiler' => ['database' => true, 'boards_preferences' => true, 'help' => _i('Spoilers images to be semi-transparent. (Mods and Admins are not affected)'), 'type' => 'checkbox'], 'enable_flags' => ['database' => true, 'boards_preferences' => true, 'help' => _i('Display country flags of posters? (<a href="http://www.maxmind.com/en/geolocation_landing" target="_blank">Required GeoIP</a>)'), 'type' => 'checkbox'], 'enable_animated_gif_thumbs' => ['database' => true, 'boards_preferences' => true, 'help' => _i('Enable animated gif’s thumbnail creation. (CPU-heavy)'), 'type' => 'checkbox'], 'display_exif' => ['database' => true, 'boards_preferences' => true, 'help' => _i('Display EXIF data from images. (EXIF data is always stored in the database)'), 'type' => 'checkbox', 'disabled' => 'disabled'], 'enable_poster_hash' => ['database' => true, 'boards_preferences' => true, 'help' => _i('Enable an IP-based code to poster hashes. (Temporarily distinguish Anonymous users)'), 'type' => 'checkbox'], 'disable_ghost' => ['database' => true, 'boards_preferences' => true, 'help' => _i('Disable ghost replies.'), 'type' => 'checkbox'], 'hide_thumbnails' => ['database' => true, 'type' => 'checkbox', 'help' => _i('Disable thumbnails.')], 'sphinx' => ['database' => true, 'type' => 'checkbox', 'help' => _i('Use SphinxSearch as search engine.')], 'hidden' => ['database' => true, 'type' => 'checkbox', 'help' => _i('Hide the board from public access. (Mods and Admins are not affected)')]];
     $structure = \Foolz\Plugin\Hook::forge('Foolz\\Foolfuuka\\Model\\Radix::structure.result')->setParam('structure', $structure)->execute()->get($structure);
     $structure = array_merge($structure, ['separator-2' => ['type' => 'separator-short'], 'submit' => ['type' => 'submit', 'class' => 'btn-primary', 'value' => _i('Submit')], 'close' => ['type' => 'close']]);
     foreach ($structure as $key => $item) {
         $default = $this->config->get('foolz/foolfuuka', 'package', 'preferences.radix.' . $key);
         if ($default !== null) {
             $structure[$key]['default_value'] = $default;
         }
         $subs = ['sub', 'sub_inverse'];
         foreach ($subs as $inv) {
             if (isset($item[$inv])) {
                 foreach ($item[$inv] as $k => $i) {
                     $default = $this->config->get('foolz/foolfuuka', 'package', 'preferences.radix.' . $k);
                     if (!is_null($default)) {
                         $structure[$key][$inv][$k]['default_value'] = $default;
                     }
                 }
             }
         }
     }
     return $structure;
 }
开发者ID:procod3R,项目名称:FoolFuuka,代码行数:61,代码来源:RadixCollection.php


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