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


PHP titania::_include方法代码示例

本文整理汇总了PHP中titania::_include方法的典型用法代码示例。如果您正苦于以下问题:PHP titania::_include方法的具体用法?PHP titania::_include怎么用?PHP titania::_include使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在titania的用法示例。


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

示例1: get_attention_object

 /**
  * Get the appropriate attention object for the attention item
  *
  * @param mixed $attention_id
  * @param mixed $object_type
  * @param mixed $object_id
  */
 public static function get_attention_object($attention_id, $object_type = false, $object_id = false)
 {
     $data = self::load_attention($attention_id, $object_type, $object_id);
     if (!$data) {
         return false;
     }
     switch ($data['attention_object_type']) {
         case TITANIA_POST:
             titania::_include('objects/attention_types/post', false, 'titania_attention_post');
             $object = new titania_attention_post();
             break;
         case TITANIA_CONTRIB:
             titania::_include('objects/attention_types/contribution', false, 'titania_attention_contribution');
             $object = new titania_attention_contribution();
             break;
         default:
             $object = new titania_attention();
     }
     $object->__set_array($data);
     return $object;
 }
开发者ID:Sajaki,项目名称:customisation-db,代码行数:28,代码来源:attention.php

示例2: phpbb_com_titania_post_edit

function phpbb_com_titania_post_edit($hook, &$post_object)
{
    if (defined('IN_TITANIA_CONVERT') || !$post_object->phpbb_post_id) {
        return;
    }
    $forum_id = phpbb_com_forum_id($post_object->topic->topic_category, $post_object->post_type);
    if (!$forum_id) {
        return;
    }
    titania::_include('functions_posting', 'phpbb_posting');
    $post_text = $post_object->post_text;
    titania_decode_message($post_text, $post_object->post_text_uid);
    $post_text .= "\n\n" . titania_url::remove_sid($post_object->get_url());
    $options = array('post_id' => $post_object->phpbb_post_id, 'topic_title' => $post_object->post_subject, 'post_text' => $post_text);
    phpbb_posting('edit', $options);
}
开发者ID:Gfksx,项目名称:customisation-db,代码行数:16,代码来源:_hook_phpbb.com.php

示例3: isset

/**
 *
 * @package titania
 * @version $Id$
 * @copyright (c) 2008 phpBB Customisation Database Team
 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
 *
 */
/**
* @ignore
*/
if (!defined('IN_TITANIA')) {
    exit;
}
titania::_include('functions_posting', 'generate_type_select');
load_contrib();
// Used later when submitting
$contrib_clone = clone titania::$contrib;
if (!((titania::$contrib->is_author || titania::$contrib->is_active_coauthor) && phpbb::$auth->acl_get('u_titania_post_edit_own') && !in_array(titania::$contrib->contrib_status, array(TITANIA_CONTRIB_CLEANED, TITANIA_CONTRIB_DISABLED)) || titania_types::$types[titania::$contrib->contrib_type]->acl_get('moderate'))) {
    titania::needs_auth();
}
// Set some main vars up
$submit = isset($_POST['submit']) ? true : false;
$change_owner = request_var('change_owner', '', true);
// Blame Nathan, he said this was okay
$contrib_categories = request_var('contrib_category', array(0));
$contrib_demo = utf8_normalize_nfc(request_var('demo_url', '', true));
$active_coauthors = $active_coauthors_list = utf8_normalize_nfc(request_var('active_coauthors', '', true));
$nonactive_coauthors = $nonactive_coauthors_list = utf8_normalize_nfc(request_var('nonactive_coauthors', '', true));
$error = array();
开发者ID:Gfksx,项目名称:customisation-db,代码行数:30,代码来源:manage.php

示例4: spl_autoload_register

*
* This file is part of the phpBB Customisation Database package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
/**
 * @ignore
 */
if (!defined('IN_PHPBB')) {
    exit;
}
global $phpbb_container;
$ext_root_path = $phpbb_container->getParameter('phpbb.titania.root_path');
$php_ext = $phpbb_container->getParameter('core.php_ext');
// Include core classes
require $ext_root_path . 'includes/core/phpbb.' . $php_ext;
require $ext_root_path . 'includes/core/titania.' . $php_ext;
titania::configure($phpbb_container->get('phpbb.titania.config'), $ext_root_path, $php_ext);
// Set up our auto-loader
spl_autoload_register(array('titania', 'autoload'));
// Include the dynamic constants (after reading the Titania config file, but before loading the phpBB common file)
titania::_include('dynamic_constants');
// Initialise phpBB
phpbb::initialise();
// Initialise Titania
titania::initialise();
开发者ID:Sajaki,项目名称:customisation-db,代码行数:31,代码来源:common.php

示例5: display

 public function display($tpl_block = 'revisions', $show_queue = false)
 {
     titania::_include('functions_display', 'order_phpbb_version_list_from_db');
     $ordered_phpbb_versions = order_phpbb_version_list_from_db($this->phpbb_versions);
     // Get rid of the day of the week if it exists in the dateformat
     $old_date_format = phpbb::$user->date_format;
     phpbb::$user->date_format = str_replace('D ', '', phpbb::$user->date_format);
     phpbb::$template->assign_block_vars($tpl_block, array('REVISION_ID' => $this->revision_id, 'CREATED' => phpbb::$user->format_date($this->revision_time), 'NAME' => $this->revision_name ? censor_text($this->revision_name) : ($this->contrib ? $this->contrib->contrib_name . ' ' . $this->revision_version : ''), 'VERSION' => $this->revision_version, 'VALIDATED_DATE' => $this->validation_date ? phpbb::$user->format_date($this->validation_date) : phpbb::$user->lang['NOT_VALIDATED'], 'REVISION_QUEUE' => $show_queue && $this->revision_queue_id ? titania_url::build_url('manage/queue', array('q' => $this->revision_queue_id)) : '', 'PHPBB_VERSION' => sizeof($ordered_phpbb_versions) == 1 ? $ordered_phpbb_versions[0] : '', 'REVISION_LICENSE' => $this->revision_license ? censor_text($this->revision_license) : ($this->contrib && sizeof(titania_types::$types[$this->contrib->contrib_type]->license_options) ? phpbb::$user->lang['UNKNOWN'] : ''), 'U_DOWNLOAD' => $this->get_url(), 'U_EDIT' => $this->contrib && ($this->contrib->is_author || $this->contrib->is_active_coauthor || titania_types::$types[$this->contrib->contrib_type]->acl_get('moderate')) ? $this->contrib->get_url('revision_edit', array('revision' => $this->revision_id)) : '', 'U_VIEW_INSTALL' => titania_types::$types[$this->contrib->contrib_type]->display_install_file && file_exists(titania::$config->modx_storage_path . $this->revision_id) ? titania_url::build_url('view-install', array('id' => $this->revision_id)) : '', 'S_USE_QUEUE' => titania::$config->use_queue && titania_types::$types[$this->contrib->contrib_type]->use_queue ? true : false, 'S_NEW' => $this->revision_status == TITANIA_REVISION_NEW ? true : false, 'S_APPROVED' => $this->revision_status == TITANIA_REVISION_APPROVED ? true : false, 'S_DENIED' => $this->revision_status == TITANIA_REVISION_DENIED ? true : false, 'S_PULLED_SECURITY' => $this->revision_status == TITANIA_REVISION_PULLED_SECURITY ? true : false, 'S_PULLED_OTHER' => $this->revision_status == TITANIA_REVISION_PULLED_OTHER ? true : false, 'S_REPACKED' => $this->revision_status == TITANIA_REVISION_REPACKED ? true : false, 'S_RESUBMITTED' => $this->revision_status == TITANIA_REVISION_RESUBMITTED ? true : false));
     phpbb::$user->date_format = $old_date_format;
     // Output phpBB versions
     foreach ($ordered_phpbb_versions as $version) {
         phpbb::$template->assign_block_vars($tpl_block . '.phpbb_versions', array('VERSION' => $version));
     }
     // Output translations
     if (sizeof($this->translations)) {
         $translations = new titania_attachment(TITANIA_TRANSLATION, $this->revision_id);
         $translations->store_attachments($this->translations);
         foreach ($translations->parse_attachments($message = false) as $attachment) {
             phpbb::$template->assign_block_vars($tpl_block . '.translations', array('DISPLAY_ATTACHMENT' => $attachment));
         }
     }
     phpbb::$template->assign_var('ICON_EDIT', '<img src="' . titania::$images_path . 'icon_edit.gif" alt="' . phpbb::$user->lang['EDIT'] . '" title="' . phpbb::$user->lang['EDIT'] . '" />');
     // Hooks
     titania::$hook->call_hook(array(__CLASS__, __FUNCTION__), $this, $tpl_block);
 }
开发者ID:Gfksx,项目名称:customisation-db,代码行数:25,代码来源:revision.php

示例6: phpbb_com_titania_post_edit

function phpbb_com_titania_post_edit($hook, &$post_object)
{
    if (defined('IN_TITANIA_CONVERT') || !$post_object->phpbb_post_id) {
        return;
    }
    $forum_id = phpbb_com_forum_id($post_object->topic->topic_category, $post_object->post_type);
    if (!$forum_id) {
        return;
    }
    titania::_include('functions_posting', 'phpbb_posting');
    $path_helper = phpbb::$container->get('path_helper');
    $post_text = $post_object->post_text;
    phpbb_com_handle_attachments($post_object, $post_text);
    message::decode($post_text, $post_object->post_text_uid);
    $post_text .= "\n\n" . $path_helper->strip_url_params($post_object->get_url(), 'sid');
    $options = array('post_id' => $post_object->phpbb_post_id, 'topic_title' => $post_object->post_subject, 'post_text' => $post_text);
    phpbb_posting('edit', $options);
}
开发者ID:Sajaki,项目名称:customisation-db,代码行数:18,代码来源:_hook_phpbb.com.php

示例7: main

    function main($id, $mode)
    {
        global $phpbb_root_path;
        define('PHPBB_INCLUDED', true);
        define('USE_PHPBB_TEMPLATE', true);
        define('IN_TITANIA', true);
        if (!defined('PHP_EXT')) {
            define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
        }
        require TITANIA_ROOT . 'common.' . PHP_EXT;
        // Need a few hacks to be used from within phpBB
        titania_url::decode_url(titania::$config->phpbb_script_path);
        titania::$hook->register(array('titania_url', 'build_url'), 'titania_outside_build_url', 'standalone');
        titania::$hook->register(array('titania_url', 'append_url'), 'titania_outside_build_url', 'standalone');
        titania::$hook->register(array('titania', 'page_header'), 'titania_outside_page_header', 'standalone');
        titania::$hook->register(array('titania', 'page_footer'), 'titania_outside_page_footer', 'standalone');
        $this->p_master->assign_tpl_vars(phpbb::append_sid('ucp'));
        // Include some files
        titania::_include('functions_display', 'titania_topic_folder_img');
        // Setup the sort tool
        $sort = new titania_sort();
        $sort->default_limit = phpbb::$config['topics_per_page'];
        $sort->request();
        // Start initial var setup
        $url = $this->u_action;
        add_form_key('ucp_front_subscription');
        // User wants to unsubscribe?
        if (isset($_POST['unsubscribe'])) {
            if (check_form_key('ucp_front_subscription')) {
                $sections = request_var('sections', array(0 => array(0 => 0)));
                $items = request_var('items', array(0 => array(0 => 0)));
                $subscriptions = $sections + $items;
                if (sizeof($subscriptions)) {
                    foreach ($subscriptions as $type => $type_id) {
                        $object_ids = array_keys($type_id);
                        foreach ($object_ids as $object_id) {
                            $sql = 'DELETE FROM ' . TITANIA_WATCH_TABLE . '
								WHERE watch_user_id = ' . phpbb::$user->data['user_id'] . '
								AND watch_object_type = ' . $type . '
								AND watch_object_id = ' . $object_id;
                            phpbb::$db->sql_query($sql);
                        }
                    }
                } else {
                    $msg = phpbb::$user->lang['NO_SUBSCRIPTIONS_SELECTED'];
                }
            } else {
                $msg = phpbb::$user->lang['FORM_INVALID'];
            }
            if (isset($msg)) {
                meta_refresh(3, $url);
                $message = $msg . '<br /><br />' . sprintf(phpbb::$user->lang['RETURN_UCP'], '<a href="' . $url . '">', '</a>');
                trigger_error($message);
            }
        }
        switch ($mode) {
            case 'subscription_items':
                $array_items = array(TITANIA_CONTRIB, TITANIA_TOPIC);
                // We prepare pagination stuff
                $sql = 'SELECT COUNT(*) AS subscription_count
					FROM ' . TITANIA_WATCH_TABLE . '
					WHERE ' . phpbb::$db->sql_in_set('watch_object_type', $array_items) . '
						AND watch_user_id = ' . phpbb::$user->data['user_id'];
                phpbb::$db->sql_query($sql);
                $subscription_count = phpbb::$db->sql_fetchfield('subscription_count');
                phpbb::$db->sql_freeresult();
                $sort->total = $subscription_count;
                $sort->build_pagination($url);
                $sql_ary = array('SELECT' => '*,
						CASE w.watch_object_type
							WHEN ' . TITANIA_CONTRIB . ' THEN c.contrib_last_update
							WHEN ' . TITANIA_TOPIC . ' THEN t.topic_last_post_time
						END AS time', 'FROM' => array(TITANIA_WATCH_TABLE => 'w'), 'LEFT_JOIN' => array(array('FROM' => array(TITANIA_CONTRIBS_TABLE => 'c'), 'ON' => '(w.watch_object_type = ' . TITANIA_CONTRIB . ')
								AND c.contrib_id = w.watch_object_id'), array('FROM' => array(TITANIA_TOPICS_TABLE => 't'), 'ON' => 'w.watch_object_type = ' . TITANIA_TOPIC . '
								AND t.topic_id = w.watch_object_id')), 'WHERE' => 'w.watch_user_id = ' . phpbb::$user->data['user_id'] . '
						AND ' . phpbb::$db->sql_in_set('watch_object_type', $array_items), 'ORDER_BY' => 'time DESC');
                // Additional tracking for support topics
                titania_tracking::get_track_sql($sql_ary, TITANIA_TOPIC, 't.topic_id');
                titania_tracking::get_track_sql($sql_ary, TITANIA_SUPPORT, 0, 'tsa');
                titania_tracking::get_track_sql($sql_ary, TITANIA_SUPPORT, 't.parent_id', 'tsc');
                titania_tracking::get_track_sql($sql_ary, TITANIA_QUEUE_DISCUSSION, 0, 'tqt');
                // Tracking for contributions
                titania_tracking::get_track_sql($sql_ary, TITANIA_CONTRIB, 'c.contrib_id', 'tc');
                $sql = phpbb::$db->sql_build_query('SELECT', $sql_ary);
                // Get the data
                $result = phpbb::$db->sql_query_limit($sql, $sort->limit, $sort->start);
                $user_ids = $rows = array();
                while ($row = phpbb::$db->sql_fetchrow($result)) {
                    $rows[] = $row;
                    titania_tracking::store_from_db($row);
                    if ($row['watch_object_type'] == TITANIA_TOPIC) {
                        $user_ids[] = $row['topic_first_post_user_id'];
                        $user_ids[] = $row['topic_last_post_user_id'];
                    } else {
                        if ($row['watch_object_type'] == TITANIA_CONTRIB) {
                            $user_ids[] = $row['contrib_user_id'];
                        }
                    }
                }
                phpbb::$db->sql_freeresult($result);
//.........这里部分代码省略.........
开发者ID:Noxwizard,项目名称:customisation-db,代码行数:101,代码来源:ucp_titania.php

示例8: run_tool

    /**
     * Run the tool
     */
    function run_tool()
    {
        // Define some vars that we'll need
        $start = request_var('start', 0);
        $limit = 100;
        // Create topic if it does not exist?
        $create_topic = true;
        titania::_include('functions_posting', 'phpbb_posting');
        titania::add_lang('contributions');
        $types = array();
        foreach (titania_types::$types as $id => $class) {
            if ($class->forum_robot && $class->forum_database) {
                $types[] = $id;
            }
        }
        if (!sizeof($types)) {
            trigger_back('UPDATE_RELEASE_TOPICS_COMPLETE');
        }
        $sql = 'SELECT COUNT(contrib_id) AS cnt FROM ' . TITANIA_CONTRIBS_TABLE . '
			WHERE ' . phpbb::$db->sql_in_set('contrib_status', array(TITANIA_CONTRIB_APPROVED, TITANIA_CONTRIB_DOWNLOAD_DISABLED)) . '
				AND ' . phpbb::$db->sql_in_set('contrib_type', $types);
        phpbb::$db->sql_query($sql);
        $total = phpbb::$db->sql_fetchfield('cnt');
        phpbb::$db->sql_freeresult();
        // Grab our batch
        $sql_ary = array('SELECT' => 'c.contrib_id, c.contrib_user_id, c.contrib_type, c.contrib_name, c.contrib_name_clean, c.contrib_desc, c.contrib_desc_uid, c.contrib_release_topic_id,
				t.topic_first_post_id,
				u.user_id, u.username, u.username_clean, u.user_colour', 'FROM' => array(TITANIA_CONTRIBS_TABLE => 'c', USERS_TABLE => 'u'), 'LEFT_JOIN' => array(array('FROM' => array(TOPICS_TABLE => 't'), 'ON' => 't.topic_id = c.contrib_release_topic_id')), 'GROUP_BY' => 'c.contrib_id', 'WHERE' => phpbb::$db->sql_in_set('c.contrib_status', array(TITANIA_CONTRIB_APPROVED, TITANIA_CONTRIB_DOWNLOAD_DISABLED)) . '
				AND u.user_id = c.contrib_user_id
				AND ' . phpbb::$db->sql_in_set('contrib_type', $types), 'ORDER_BY' => 'c.contrib_id DESC');
        $sql = phpbb::$db->sql_build_query('SELECT', $sql_ary);
        $result = phpbb::$db->sql_query_limit($sql, $limit, $start);
        while ($row = phpbb::$db->sql_fetchrow($result)) {
            // Grab the revisions
            $revisions = array();
            $sql = 'SELECT r.revision_id, r.attachment_id, r.revision_version, a.real_filename, a.filesize
				FROM ' . TITANIA_REVISIONS_TABLE . ' r, ' . TITANIA_ATTACHMENTS_TABLE . ' a
				WHERE r.contrib_id = ' . $row['contrib_id'] . '
					AND r.revision_status = ' . TITANIA_REVISION_APPROVED . '
					AND a.attachment_id = r.attachment_id';
            $rev_result = phpbb::$db->sql_query($sql);
            while ($rev_row = phpbb::$db->sql_fetchrow($rev_result)) {
                $revisions[$rev_row['revision_version']] = $rev_row;
            }
            phpbb::$db->sql_freeresult($rev_result);
            // Sort the revisions by their version, put the newest one in $revision
            uksort($revisions, 'reverse_version_compare');
            if (!sizeof($revisions)) {
                continue;
            }
            $revision = array_shift($revisions);
            users_overlord::$users[$row['user_id']] = $row;
            $contrib = new titania_contribution();
            $contrib->__set_array($row);
            $contrib->download = $row;
            // Update the release topic
            $contrib->update_release_topic();
        }
        phpbb::$db->sql_freeresult($result);
        if ($start + $limit >= $total) {
            trigger_back('UPDATE_RELEASE_TOPICS_COMPLETE');
        } else {
            meta_refresh(0, titania_url::build_url('manage/administration', array('t' => 'update_release_topics', 'start' => $start + $limit, 'submit' => 1, 'hash' => generate_link_hash('manage'))));
            trigger_error(phpbb::$user->lang('UPDATE_RELEASE_TOPICS_PROGRESS', $start + $limit, $total));
        }
    }
开发者ID:Gfksx,项目名称:customisation-db,代码行数:69,代码来源:update_release_topics.php

示例9: titania_attachment

            // increase a FAQ views counter
            $faq->increase_views_counter();
            // tracking
            titania_tracking::track(TITANIA_FAQ, $faq_id);
            $message = $faq->generate_text_for_display();
            // Grab attachments
            $attachments = new titania_attachment(TITANIA_FAQ, $faq->faq_id);
            $attachments->load_attachments();
            $parsed_attachments = $attachments->parse_attachments($message);
            phpbb::$template->assign_vars(array('FAQ_SUBJECT' => $faq->faq_subject, 'FAQ_TEXT' => $message, 'FAQ_VIEWS' => $faq->faq_views, 'S_DETAILS' => true, 'S_ACCESS_TEAMS' => $faq->faq_access == TITANIA_ACCESS_TEAMS ? true : false, 'S_ACCESS_AUTHORS' => $faq->faq_access == TITANIA_ACCESS_AUTHORS ? true : false, 'U_EDIT_FAQ' => titania::$contrib->is_author || phpbb::$auth->acl_get('u_titania_faq_edit') ? $faq->get_url('edit') : false, 'U_CANONICAL' => $faq->get_url()));
            foreach ($parsed_attachments as $attachment) {
                phpbb::$template->assign_block_vars('attachment', array('DISPLAY_ATTACHMENT' => $attachment));
            }
        } else {
            titania::page_header(titania::$contrib->contrib_name . ' - ' . phpbb::$user->lang['FAQ_LIST']);
            titania::_include('functions_display', 'titania_topic_folder_img');
            // Setup the sort tool
            $sort = new titania_sort();
            $sort->set_url(titania::$contrib->get_url('faq'));
            $sort->set_defaults(phpbb::$config['topics_per_page']);
            $sort->request();
            $faqs = array();
            $sql_ary = array('SELECT' => 'f.*', 'FROM' => array(TITANIA_CONTRIB_FAQ_TABLE => 'f'), 'WHERE' => 'f.contrib_id = ' . titania::$contrib->contrib_id . '
						AND f.faq_access >= ' . titania::$access_level, 'ORDER_BY' => 'f.left_id ASC');
            // Main SQL Query
            $sql = phpbb::$db->sql_build_query('SELECT', $sql_ary);
            // Handle pagination
            if ($sort->sql_count($sql_ary, 'faq_id')) {
                $sort->build_pagination($faq->get_url());
                // Get the data
                $result = phpbb::$db->sql_query_limit($sql, $sort->limit, $sort->start);
开发者ID:kairion,项目名称:customisation-db,代码行数:31,代码来源:faq.php

示例10: titania_revision

        case 4:
            if (!titania_types::$types[titania::$contrib->contrib_type]->validate_translation) {
                $step = 5;
                $try_again = true;
                continue;
            }
            $revision = new titania_revision(titania::$contrib, $revision_id);
            if (!$revision->load()) {
                trigger_error('NO_REVISION');
            }
            $revision_attachment = new titania_attachment(TITANIA_CONTRIB);
            $revision_attachment->attachment_id = $revision->attachment_id;
            if (!$revision_attachment->load()) {
                trigger_error('ERROR_NO_ATTACHMENT');
            }
            titania::_include('library/translations/translation_validation');
            $zip_file = titania::$config->upload_path . '/' . utf8_basename($revision_attachment->attachment_directory) . '/' . utf8_basename($revision_attachment->physical_filename);
            $new_dir_name = titania::$contrib->contrib_name_clean . '_' . preg_replace('#[^0-9a-z]#', '_', strtolower($revision->revision_version));
            $validation_tools = new translation_validation($zip_file, $new_dir_name);
            $sql = 'SELECT row_id, phpbb_version_branch, phpbb_version_revision FROM ' . TITANIA_REVISIONS_PHPBB_TABLE . '
				WHERE revision_id = ' . $revision->revision_id;
            $result = phpbb::$db->sql_query($sql);
            while ($row = phpbb::$db->sql_fetchrow($result)) {
                $version_string = $row['phpbb_version_branch'][0] . '.' . $row['phpbb_version_branch'][1] . '.' . $row['phpbb_version_revision'];
                $reference_filepath = $validation_tools->automod_phpbb_files($version_string);
                // path to files against which we will validate the package
            }
            $errors = $validation_tools->check_package($reference_filepath);
            if (!empty($errors)) {
                trigger_error(implode('<br /><br />', $errors));
            }
开发者ID:Gfksx,项目名称:customisation-db,代码行数:31,代码来源:revision.php

示例11: array

     }
 }
 $error = array();
 if ($submit) {
     // In run_tool do whatever is required.  If there is an error, put it into the array and the display options will be ran again
     $tool->run_tool($error);
 }
 if (!$submit || !empty($error)) {
     /*
      * Instead of building a page yourself you may return an array with the options you want to show.  This is outputted similar to how the acp_board is.
      * You may also send back a string if you just want a confirm box shown with that string used for the title
      */
     $options = $tool->display_options();
     if (is_array($options) && isset($options['vars'])) {
         titania::page_header($options['title']);
         titania::_include('functions_manage', 'use_lang');
         // Go through each error and see if the key exists in the phpbb::$user->lang.  If it does, use that.
         if (!empty($error)) {
             array_walk($error, 'use_lang');
         }
         phpbb::$template->assign_vars(array('L_TITLE' => phpbb::$user->lang[$options['title']], 'L_TITLE_EXPLAIN' => isset(phpbb::$user->lang[$options['title'] . '_EXPLAIN']) ? phpbb::$user->lang[$options['title'] . '_EXPLAIN'] : '', 'S_ERROR' => !empty($error) ? true : false, 'ERROR_MSG' => !empty($error) ? implode('<br />', $error) : ''));
         foreach ($options['vars'] as $name => $vars) {
             if (!is_array($vars) && strpos($name, 'legend') === false) {
                 continue;
             }
             if (strpos($name, 'legend') !== false) {
                 phpbb::$template->assign_block_vars('options', array('S_LEGEND' => true, 'LEGEND' => isset(phpbb::$user->lang[$vars]) ? phpbb::$user->lang[$vars] : $vars));
                 continue;
             }
             $type = explode(':', $vars['type']);
             $l_explain = '';
开发者ID:kairion,项目名称:customisation-db,代码行数:31,代码来源:administration.php

示例12: topic_folder_img

 /**
  * Generate topic status
  */
 public function topic_folder_img(&$folder_img, &$folder_alt)
 {
     titania::_include('functions_display', 'titania_topic_folder_img');
     titania_topic_folder_img($folder_img, $folder_alt, $this->get_postcount(), $this->unread, $this->topic_posted, $this->topic_sticky, $this->topic_locked);
 }
开发者ID:kairion,项目名称:customisation-db,代码行数:8,代码来源:topic.php

示例13: folder_img

 /**
  * Generate topic status
  */
 public static function folder_img($is_unread, &$folder_img, &$folder_alt, $replies = 0)
 {
     titania::_include('functions_display', 'titania_topic_folder_img');
     titania_topic_folder_img($folder_img, $folder_alt, $replies, $is_unread);
 }
开发者ID:kairion,项目名称:customisation-db,代码行数:8,代码来源:queue.php

示例14: reply_release_topic

 /**
  * Reply to the release topic
  *
  * @param int $branch	Specific branch release topic to reply to
  * @param string $reply Message to reply to the topic with
  * @param array $options Any additional options for the reply
  */
 public function reply_release_topic($branch, $reply, $options = array())
 {
     $release_topic_id = $this->get_release_topic_id($branch);
     if (!$release_topic_id) {
         return;
     }
     titania::_include('functions_posting', 'phpbb_posting');
     $options_reply = array_merge($options, array('topic_id' => $release_topic_id, 'topic_title' => 'Re: ' . $this->contrib_name, 'post_text' => $reply));
     phpbb_posting('reply', $options_reply);
 }
开发者ID:Sajaki,项目名称:customisation-db,代码行数:17,代码来源:contribution.php

示例15: array_merge

         } else {
             if ($action_contribs == 'move' && !empty($contribs_to_id)) {
                 $error = array_merge($error, $category_object->move_category_content($contribs_to_id));
             }
         }
         if (!sizeof($error)) {
             // Delete category
             $category_object->delete();
             // Redirect back to the previous category
             redirect(titania_url::build_url('manage/categories', array('c' => $parent_id)));
         }
     }
     phpbb::$template->assign_vars(array('S_DELETE_CATEGORY' => true, 'U_ACTION' => titania_url::build_url('manage/categories', array('c' => $category_id, 'action' => 'delete')), 'U_BACK' => 'c_' . $category_object->parent_id, 'CATEGORY' => $category_id, 'CATEGORY_NAME' => isset(phpbb::$user->lang[$category_object->category_name]) ? phpbb::$user->lang[$category_object->category_name] : $category_object->category_name, 'SECTION_NAME' => phpbb::$user->lang['DELETE_CATEGORY'] . ' - ' . (isset(phpbb::$user->lang[$category_object->category_name]) ? phpbb::$user->lang[$category_object->category_name] : $category_object->category_name), 'S_HAS_SUBCATS' => $category_object->right_id - $category_object->left_id > 1 ? true : false, 'S_MOVE_CATEGORY_OPTIONS' => generate_category_select($category_object->parent_id, true), 'ERROR_MSG' => sizeof($error) ? implode('<br />', $error) : ''));
     break;
 default:
     titania::_include('functions_display', 'titania_display_categories');
     titania_display_categories($category_id, 'categories', true);
     if ($category_id != 0) {
         // Breadcrumbs
         $category_object = new titania_category();
         $categories_ary = titania::$cache->get_categories();
         // Parents
         foreach (array_reverse(titania::$cache->get_category_parents($category_id)) as $row) {
             $category_object->__set_array($categories_ary[$row['category_id']]);
             titania::generate_breadcrumbs(array(isset(phpbb::$user->lang[$categories_ary[$row['category_id']]['category_name']]) ? phpbb::$user->lang[$categories_ary[$row['category_id']]['category_name']] : $categories_ary[$row['category_id']]['category_name'] => titania_url::build_url('manage/categories', array('c' => $row['category_id']))));
         }
         // Self
         $category_object->__set_array($categories_ary[$category_id]);
         titania::generate_breadcrumbs(array(isset(phpbb::$user->lang[$categories_ary[$category_id]['category_name']]) ? phpbb::$user->lang[$categories_ary[$category_id]['category_name']] : $categories_ary[$category_id]['category_name'] => titania_url::build_url('manage/categories', array('c' => $category_id))));
         // Second set of breadcrumbs for category navigation
         // Parents
开发者ID:Gfksx,项目名称:customisation-db,代码行数:31,代码来源:categories.php


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