本文整理汇总了PHP中titania类 的典型用法代码示例。如果您正苦于以下问题:PHP titania类的具体用法?PHP titania怎么用?PHP titania使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了titania类 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: initialize
/**
* Initialize the Search
*/
public static function initialize()
{
if (self::$index === false) {
// Initialize the ezc/Zend Search class
if (titania::$config->search_backend == 'zend') {
if (!is_writable(TITANIA_ROOT . self::store_path)) {
throw new exception(self::store_path . ' must be writable to use the Zend Lucene Search');
}
$handler = new ezcSearchZendLuceneHandler(TITANIA_ROOT . self::store_path);
} else {
if (titania::$config->search_backend == 'solr') {
$handler = new ezcSearchSolrHandler(titania::$config->search_backend_ip, titania::$config->search_backend_port);
// In case Solr would happen to go down..
if (!$handler->connection) {
// Log this as an error
titania::log(TITANIA_ERROR, 'Solr Server not responding');
self::$do_not_index = true;
return false;
}
} else {
throw new exception('We need a proper search backend selected');
}
}
$manager = new ezcSearchEmbeddedManager();
self::$index = new ezcSearchSession($handler, $manager);
return true;
}
}
开发者ID:Gfksx, 项目名称:customisation-db, 代码行数:31, 代码来源:search.php
示例2: load_types
/**
* Load the types into the $types array
*/
public static function load_types()
{
$dh = @opendir(TITANIA_ROOT . 'includes/types/');
if (!$dh) {
trigger_error('Could not open the types directory');
}
while (($fname = readdir($dh)) !== false) {
if (strpos($fname, '.' . PHP_EXT) && substr($fname, 0, 1) != '_' && $fname != 'base.' . PHP_EXT) {
include TITANIA_ROOT . 'includes/types/' . $fname;
$class_name = 'titania_type_' . substr($fname, 0, strpos($fname, '.' . PHP_EXT));
titania::add_lang('types/' . substr($fname, 0, strpos($fname, '.' . PHP_EXT)));
$class = new $class_name();
$class->auto_install();
self::$types[$class->id] = $class;
}
}
closedir($dh);
ksort(self::$types);
}
开发者ID:Gfksx, 项目名称:customisation-db, 代码行数:22, 代码来源:base.php
示例3: 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
示例4: 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');
titania::$hook->register('titania_generate_text_for_display', 'titania_outside_generate_text_for_display', 'standalone');
titania::add_lang('manage');
$this->p_master->assign_tpl_vars(phpbb::append_sid('mcp'));
phpbb::$template->assign_vars(array('L_TITLE' => phpbb::$user->lang['ATTENTION'], 'L_EXPLAIN' => ''));
include TITANIA_ROOT . 'manage/attention.' . PHP_EXT;
}
开发者ID:Noxwizard, 项目名称:customisation-db, 代码行数:22, 代码来源:mcp_titania.php
示例5: 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, 代码行数:30, 代码来源:common.php
示例6: titania_msg_handler
/**
* Error and message handler, call with trigger_error
*/
function titania_msg_handler($errno, $msg_text, $errfile, $errline)
{
global $msg_title, $msg_long_text;
// Do not display notices if we suppress them via @
if (error_reporting() == 0) {
return;
}
// Message handler is stripping text. In case we need it, we are possible to define long text...
if (isset($msg_long_text) && $msg_long_text && !$msg_text) {
$msg_text = $msg_long_text;
}
switch ($errno) {
case E_NOTICE:
case E_WARNING:
// Check the error reporting level and return if the error level does not match
// If DEBUG is defined the default level is E_ALL
if (($errno & (defined('DEBUG') ? E_ALL : error_reporting())) == 0) {
return;
}
if (strpos($errfile, 'cache') === false && strpos($errfile, 'template.') === false) {
// flush the content, else we get a white page if output buffering is on
if ((int) @ini_get('output_buffering') === 1 || strtolower(@ini_get('output_buffering')) === 'on') {
@ob_flush();
}
// Another quick fix for those having gzip compression enabled, but do not flush if the coder wants to catch "something". ;)
if (!empty(phpbb::$config['gzip_compress'])) {
if (@extension_loaded('zlib') && !headers_sent() && !ob_get_level()) {
@ob_flush();
}
}
// remove complete path to installation, with the risk of changing backslashes meant to be there
$errfile = str_replace(array(phpbb_realpath(PHPBB_ROOT_PATH), '\\'), array('', '/'), $errfile);
$msg_text = str_replace(array(phpbb_realpath(PHPBB_ROOT_PATH), '\\'), array('', '/'), $msg_text);
echo '<b>[phpBB Debug] PHP Notice</b>: in file <b>' . $errfile . '</b> on line <b>' . $errline . '</b>: <b>' . $msg_text . '</b><br />' . "\n";
// echo '<br /><br />BACKTRACE<br />' . get_backtrace() . '<br />' . "\n";
}
return;
break;
case E_USER_ERROR:
if (!empty(phpbb::$user) && !empty(phpbb::$user->lang)) {
$msg_text = !empty(phpbb::$user->lang[$msg_text]) ? phpbb::$user->lang[$msg_text] : $msg_text;
$msg_title = !isset($msg_title) ? phpbb::$user->lang['GENERAL_ERROR'] : (!empty(phpbb::$user->lang[$msg_title]) ? phpbb::$user->lang[$msg_title] : $msg_title);
$l_return_index = sprintf(phpbb::$user->lang['RETURN_INDEX'], '<a href="' . titania::$absolute_path . '">', '</a>');
$l_notify = '';
if (!empty(phpbb::$config['board_contact'])) {
$l_notify = '<p>' . sprintf(phpbb::$user->lang['NOTIFY_ADMIN_EMAIL'], phpbb::$config['board_contact']) . '</p>';
}
} else {
$msg_title = 'General Error';
$l_return_index = '<a href="' . titania::$absolute_path . '">Return to index page</a>';
$l_notify = '';
if (!empty(phpbb::$config['board_contact'])) {
$l_notify = '<p>Please notify the board administrator or webmaster: <a href="mailto:' . phpbb::$config['board_contact'] . '">' . phpbb::$config['board_contact'] . '</a></p>';
}
}
garbage_collection();
// Try to not call the adm page data...
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">';
echo '<head>';
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
echo '<title>' . $msg_title . '</title>';
echo '<style type="text/css">' . "\n" . '/* <![CDATA[ */' . "\n";
echo '* { margin: 0; padding: 0; } html { font-size: 100%; height: 100%; margin-bottom: 1px; background-color: #E4EDF0; } body { font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; color: #536482; background: #E4EDF0; font-size: 62.5%; margin: 0; } ';
echo 'a:link, a:active, a:visited { color: #006699; text-decoration: none; } a:hover { color: #DD6900; text-decoration: underline; } ';
echo '#wrap { padding: 0 20px 15px 20px; min-width: 615px; } #page-header { text-align: right; height: 40px; } #page-footer { clear: both; font-size: 1em; text-align: center; } ';
echo '.panel { margin: 4px 0; background-color: #FFFFFF; border: solid 1px #A9B8C2; } ';
echo '#errorpage #page-header a { font-weight: bold; line-height: 6em; } #errorpage #content { padding: 10px; } #errorpage #content h1 { line-height: 1.2em; margin-bottom: 0; color: #DF075C; } ';
echo '#errorpage #content div { margin-top: 20px; margin-bottom: 5px; border-bottom: 1px solid #CCCCCC; padding-bottom: 5px; color: #333333; font: bold 1.2em "Lucida Grande", Arial, Helvetica, sans-serif; text-decoration: none; line-height: 120%; text-align: left; } ';
echo "\n" . '/* ]]> */' . "\n";
echo '</style>';
echo '</head>';
echo '<body id="errorpage">';
echo '<div id="wrap">';
echo ' <div id="page-header">';
echo ' ' . $l_return_index;
echo ' </div>';
echo ' <div id="acp">';
echo ' <div class="panel">';
echo ' <div id="content">';
echo ' <h1>' . $msg_title . '</h1>';
echo ' <div>' . $msg_text . '</div>';
echo ' <div>' . get_backtrace() . '</div>';
echo $l_notify;
echo ' </div>';
echo ' </div>';
echo ' </div>';
echo ' <div id="page-footer">';
echo ' Powered by phpBB © 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>';
echo ' </div>';
echo '</div>';
echo '</body>';
echo '</html>';
exit_handler();
// On a fatal error (and E_USER_ERROR *is* fatal) we never want other scripts to continue and force an exit here.
exit;
break;
//.........这里部分代码省略.........
开发者ID:kairion, 项目名称:customisation-db, 代码行数:101, 代码来源:functions.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: utf8_normalize_nfc
}
titania::add_lang('posting');
phpbb::$user->add_lang('mcp');
if (titania::confirm_box(true)) {
$message = utf8_normalize_nfc(request_var('report_text', '', true));
titania::$contrib->report($message);
// Notifications
redirect(titania::$contrib->get_url());
} else {
//phpbb::$template->assign_var('S_CAN_NOTIFY', ((phpbb::$user->data['is_registered']) ? true : false));
titania::confirm_box(false, 'REPORT_CONTRIBUTION', '', array(), 'posting/report_body.html');
}
redirect(titania::$contrib->get_url());
}
titania::$contrib->get_download();
titania::$contrib->get_revisions();
titania::$contrib->get_screenshots();
titania::$contrib->get_rating();
titania::$contrib->assign_details();
if (!phpbb::$user->data['is_bot']) {
titania::$contrib->increase_view_counter();
}
// Set tracking
titania_tracking::track(TITANIA_CONTRIB, titania::$contrib->contrib_id);
// Subscriptions
titania_subscriptions::handle_subscriptions(TITANIA_CONTRIB, titania::$contrib->contrib_id, titania::$contrib->get_url());
// Canonical URL
phpbb::$template->assign_var('U_CANONICAL', titania::$contrib->get_url());
titania::page_header(titania::$contrib->contrib_name . ' - ' . phpbb::$user->lang['CONTRIB_DETAILS']);
titania::page_footer(true, 'contributions/contribution_details.html');
开发者ID:kairion, 项目名称:customisation-db, 代码行数:30, 代码来源:details.php
示例9: array
if ($topic_id) {
// Subscriptions
titania_subscriptions::handle_subscriptions(TITANIA_TOPIC, $topic_id, $topic->get_url());
// Check access level
if ($topic->topic_access < titania::$access_level || $topic->topic_type == TITANIA_QUEUE_DISCUSSION && !titania::$contrib->is_author && !titania::$contrib->is_active_coauthor && !titania_types::$types[titania::$contrib->contrib_type]->acl_get('queue_discussion')) {
titania::needs_auth();
}
posts_overlord::display_topic_complete($topic);
titania::page_header(censor_text($topic->topic_subject) . ' - ' . titania::$contrib->contrib_name);
if (phpbb::$auth->acl_get('u_titania_post')) {
phpbb::$template->assign_var('U_POST_REPLY', titania_url::append_url($topic->get_url(), array('action' => 'reply')));
}
// Canonical URL
phpbb::$template->assign_var('U_CANONICAL', $topic->get_url());
} else {
// Subscriptions
titania_subscriptions::handle_subscriptions(TITANIA_SUPPORT, titania::$contrib->contrib_id, titania::$contrib->get_url('support'));
// Mark all topics read
if (request_var('mark', '') == 'topics') {
titania_tracking::track(TITANIA_SUPPORT, titania::$contrib->contrib_id);
}
$data = topics_overlord::display_forums_complete('support', titania::$contrib);
titania::page_header(titania::$contrib->contrib_name . ' - ' . phpbb::$user->lang['CONTRIB_SUPPORT']);
if (phpbb::$auth->acl_get('u_titania_topic') && titania::$config->support_in_titania) {
phpbb::$template->assign_var('U_POST_TOPIC', titania_url::append_url(titania::$contrib->get_url('support'), array('action' => 'post')));
}
$data['sort']->set_url(titania::$contrib->get_url('support'));
phpbb::$template->assign_vars(array('U_MARK_TOPICS' => titania_url::append_url(titania::$contrib->get_url('support'), array('mark' => 'topics')), 'U_CANONICAL' => $data['sort']->build_canonical(), 'S_DISPLAY_SEARCHBOX' => true, 'S_SEARCHBOX_ACTION' => titania_url::build_url('search', array('type' => TITANIA_SUPPORT, 'contrib' => titania::$contrib->contrib_id))));
}
titania::page_footer(true, 'contributions/contribution_support.html');
开发者ID:Gfksx, 项目名称:customisation-db, 代码行数:30, 代码来源:support.php
示例10: while
while ($row = phpbb::$db->sql_fetchrow($result)) {
$contrib_categories[] = $row['category_id'];
}
phpbb::$db->sql_freeresult($result);
$active_coauthors = $nonactive_coauthors = array();
foreach (titania::$contrib->coauthors as $row) {
// User does not exist anymore...
if (users_overlord::get_user($row['user_id'], 'user_id') != $row['user_id']) {
continue;
}
if ($row['active']) {
$active_coauthors[] = users_overlord::get_user($row['user_id'], 'username');
} else {
$nonactive_coauthors[] = users_overlord::get_user($row['user_id'], 'username');
}
}
$active_coauthors = implode("\n", $active_coauthors);
$nonactive_coauthors = implode("\n", $nonactive_coauthors);
}
}
// Generate some stuff
generate_category_select($contrib_categories);
titania::$contrib->assign_details();
$message->display();
foreach ($status_list as $status => $row) {
phpbb::$template->assign_block_vars('status_select', array('S_SELECTED' => $status == titania::$contrib->contrib_status ? true : false, 'VALUE' => $status, 'NAME' => phpbb::$user->lang[$row]));
}
phpbb::$template->assign_vars(array('S_POST_ACTION' => titania::$contrib->get_url('manage'), 'S_EDIT_SUBJECT' => titania_types::$types[titania::$contrib->contrib_type]->acl_get('moderate') ? true : false, 'S_DELETE_CONTRIBUTION' => phpbb::$auth->acl_get('u_titania_admin') ? true : false, 'S_IS_OWNER' => titania::$contrib->is_author ? true : false, 'S_IS_MODERATOR' => titania_types::$types[titania::$contrib->contrib_type]->acl_get('moderate') ? true : false, 'S_CAN_EDIT_STYLE_DEMO' => titania::$config->can_modify_style_demo_url || titania_types::$types[TITANIA_TYPE_STYLE]->acl_get('moderate') || titania::$contrib->contrib_type != TITANIA_TYPE_STYLE ? true : false, 'CONTRIB_PERMALINK' => $permalink, 'SCREENSHOT_UPLOADER' => $screenshot->parse_uploader('posting/attachments/simple.html'), 'ERROR_MSG' => sizeof($error) ? implode('<br />', $error) : false, 'ACTIVE_COAUTHORS' => $active_coauthors, 'NONACTIVE_COAUTHORS' => $nonactive_coauthors, 'S_TRANSLATION_TYPE_ID' => defined('TITANIA_TYPE_TRANSLATION') ? TITANIA_TYPE_TRANSLATION : 0));
titania::page_header(titania::$contrib->contrib_name . ' - ' . phpbb::$user->lang['MANAGE_CONTRIBUTION']);
titania::page_footer(true, 'contributions/contribution_manage.html');
开发者ID:Gfksx, 项目名称:customisation-db, 代码行数:30, 代码来源:manage.php
示例11: foreach
$queue->move($new_tag);
} else {
// Generate the list of tags we can move it to
$extra = '<select name="id">';
foreach ($tags as $tag_id => $row) {
$extra .= '<option value="' . $tag_id . '">' . (isset(phpbb::$user->lang[$row['tag_field_name']]) ? phpbb::$user->lang[$row['tag_field_name']] : $row['tag_field_name']) . '</option>';
}
$extra .= '</select>';
phpbb::$template->assign_var('CONFIRM_EXTRA', $extra);
titania::confirm_box(false, 'MOVE_QUEUE');
}
redirect(titania_url::append_url($base_url, array('q' => $queue->queue_id)));
break;
}
// Display the main queue item
$data = queue_overlord::display_queue_item($queue_id);
// Handle replying/editing/etc
$posting_helper = new titania_posting();
$posting_helper->act('manage/queue_post.html');
// Display the posts in the queue (after the posting helper acts)
posts_overlord::display_topic_complete($data['topic']);
titania::page_header(queue_overlord::$queue[$queue_id]['topic_subject']);
} else {
// Subscriptions
titania_subscriptions::handle_subscriptions(TITANIA_QUEUE, $queue_type, titania_url::$current_page_url);
queue_overlord::display_queue($queue_type, $tag);
queue_overlord::display_categories($queue_type, $tag);
titania::page_header('VALIDATION_QUEUE');
}
titania::page_footer(true, 'manage/queue.html');
开发者ID:Noxwizard, 项目名称:customisation-db, 代码行数:30, 代码来源:queue.php
示例12: load_tool
/**
* Load the requested tool
*
* @param String $tool_name The name of this tool
* @param Boolean $return Specify whether an object of this tool will be returned
* @return The object of the requested tool if $return is set to true else this method will return true
*/
function load_tool($tool_name, $return = true)
{
global $user;
static $tools_loaded = array();
if (isset($tools_loaded[$tool_name])) {
return $return ? $tools_loaded[$tool_name] : true;
}
$tool_path = $this->tool_box_path . $tool_name . '.' . PHP_EXT;
if (false === @(include $tool_path)) {
trigger_error(sprintf($user->lang['TOOL_INCLUTION_NOT_FOUND'], $tool_path), E_USER_ERROR);
}
if (!class_exists($tool_name)) {
trigger_error(sprintf($user->lang['INCORRECT_CLASS'], $tool_name, PHP_EXT), E_USER_ERROR);
}
// Construct the class
$tools_loaded[$tool_name] = new $tool_name();
// Add the language file
titania::add_lang('manage_tools/' . $tool_name);
// Return
return $return ? $tools_loaded[$tool_name] : true;
}
开发者ID:kairion, 项目名称:customisation-db, 代码行数:28, 代码来源:manage_plugin.php
示例13: array
/**
* Menu Array
*
* 'filename' => array(
* 'title' => 'nav menu title',
* 'url' => $page_url,
* 'auth' => ($can_see_page) ? true : false, // Not required, always true if missing
* ),
*/
$nav_ary = array('attention' => array('title' => 'ATTENTION', 'url' => titania_url::build_url('manage/attention'), 'auth' => !phpbb::$auth->acl_gets('u_titania_mod_author_mod', 'u_titania_mod_contrib_mod', 'u_titania_mod_faq_mod', 'u_titania_mod_post_mod') && !sizeof(titania_types::find_authed('moderate')) ? false : true, 'count' => $attention_count), 'queue' => array('title' => 'VALIDATION_QUEUE', 'url' => titania_url::build_url('manage/queue'), 'auth' => sizeof(titania_types::find_authed('view')) && titania::$config->use_queue ? true : false), 'queue_discussion' => array('title' => 'QUEUE_DISCUSSION', 'url' => titania_url::build_url('manage/queue_discussion'), 'auth' => sizeof(titania_types::find_authed('queue_discussion')) && titania::$config->use_queue ? true : false), 'administration' => array('title' => 'ADMINISTRATION', 'url' => titania_url::build_url('manage/administration'), 'auth' => phpbb::$auth->acl_get('u_titania_admin') ? true : false, 'match' => array('categories')), 'categories' => array('title' => 'MANAGE_CATEGORIES', 'url' => titania_url::build_url('manage/categories'), 'auth' => phpbb::$auth->acl_get('u_titania_admin') ? true : false, 'display' => false));
// Display nav menu
titania::generate_nav($nav_ary, $page, 'attention');
// Generate the main breadcrumbs
titania::generate_breadcrumbs(array(phpbb::$user->lang['MANAGE'] => titania_url::build_url('manage')));
if ($page) {
titania::generate_breadcrumbs(array($nav_ary[$page]['title'] => $nav_ary[$page]['url']));
}
// And now to load the appropriate page...
switch ($page) {
case 'queue':
case 'queue_discussion':
case 'attention':
case 'administration':
case 'categories':
include TITANIA_ROOT . 'manage/' . $page . '.' . PHP_EXT;
break;
default:
include TITANIA_ROOT . 'manage/queue.' . PHP_EXT;
exit;
break;
}
开发者ID:kairion, 项目名称:customisation-db, 代码行数:31, 代码来源:index.php
示例14: array
if (!isset($versions[(int) $revision_phpbb_version[0] . (int) $revision_phpbb_version[2] . substr($revision_phpbb_version, 4)])) {
// Have we added some new phpBB version that does not exist? We need to purge the cache then
titania::$cache->destroy('_titania_phpbb_versions');
}
// Update the list of phpbb_versions for the revision to update
$revision->phpbb_versions[] = array('phpbb_version_branch' => (int) $revision_phpbb_version[0] . (int) $revision_phpbb_version[2], 'phpbb_version_revision' => substr($revision_phpbb_version, 4));
}
// Submit the translations
$translation->submit();
$revision->submit();
redirect(titania::$contrib->get_url());
}
}
// Output the available license options
foreach (titania_types::$types[titania::$contrib->contrib_type]->license_options as $option) {
phpbb::$template->assign_block_vars('license_options', array('NAME' => $option, 'VALUE' => $option));
}
// Display the list of phpBB versions available
foreach ($phpbb_versions as $version => $name) {
$template->assign_block_vars('phpbb_versions', array('VERSION' => $name, 'S_SELECTED' => in_array($name, $revision_phpbb_versions) ? true : false));
}
// Display the status list
foreach ($status_list as $status => $row) {
phpbb::$template->assign_block_vars('status_select', array('S_SELECTED' => $status == $revision_status ? true : false, 'VALUE' => $status, 'NAME' => phpbb::$user->lang[$row]));
}
// Display the rest of the page
phpbb::$template->assign_vars(array('ERROR_MSG' => sizeof($error) ? implode('<br />', $error) : '', 'REVISION_NAME' => $revision->revision_name, 'REVISION_LICENSE' => $revision->revision_license, 'REVISION_CUSTOM_LICENSE' => !in_array($revision->revision_license, titania_types::$types[titania::$contrib->contrib_type]->license_options) ? $revision->revision_license : '', 'TRANSLATION_UPLOADER' => titania_types::$types[titania::$contrib->contrib_type]->extra_upload ? $translation->parse_uploader('posting/attachments/simple.html') : '', 'S_IS_MODERATOR' => titania_types::$types[titania::$contrib->contrib_type]->acl_get('moderate') ? true : false, 'S_POST_ACTION' => titania::$contrib->get_url('revision_edit', array('revision' => $revision_id)), 'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"', 'S_CUSTOM_LICENSE' => !in_array($revision->revision_license, titania_types::$types[titania::$contrib->contrib_type]->license_options) ? true : false, 'S_ALLOW_CUSTOM_LICENSE' => titania_types::$types[titania::$contrib->contrib_type]->license_allow_custom ? true : false));
add_form_key('postform');
titania::page_header(titania::$contrib->contrib_name . ' - ' . phpbb::$user->lang['EDIT_REVISION']);
titania::page_footer(true, 'contributions/contribution_revision_edit.html');
开发者ID:Gfksx, 项目名称:customisation-db, 代码行数:30, 代码来源:revision_edit.php
示例15: request_var
/*$close = (isset($_POST['close'])) ? true : false;
$id_list = request_var('id_list', array(0));
if ($close && sizeof($id_list))
{
$attention_object = new titania_attention;
foreach ($id_list as $attention_id)
{
$attention_object->attention_id = $attention_id;
$attention_object->load();
}
}*/
switch ($type) {
case 'reported':
$type = TITANIA_ATTENTION_REPORTED;
break;
case 'unapproved':
$type = TITANIA_ATTENTION_UNAPPROVED;
break;
default:
$type = false;
break;
}
$options = array('attention_type' => $type, 'display_closed' => $closed, 'only_closed' => !$open && $closed ? true : false);
attention_overlord::display_attention_list($options);
phpbb::$template->assign_vars(array('S_ACTION' => titania_url::build_url('manage/attention'), 'S_OPEN_CHECKED' => $open, 'S_CLOSED_CHECKED' => $closed));
// Subscriptions
titania_subscriptions::handle_subscriptions(TITANIA_ATTENTION, 0, titania_url::build_url('manage/attention'));
titania::page_header('ATTENTION');
titania::page_footer(true, 'manage/attention.html');
}
开发者ID:kairion, 项目名称:customisation-db, 代码行数:31, 代码来源:attention.php
示例16: common_delete
private function common_delete($post_id, $undelete = false)
{
titania::add_lang('posting');
phpbb::$user->add_lang('posting');
// Load the stuff we need
$post_object = $this->load_post($post_id);
// Check permissions
if (!$undelete && !$post_object->acl_get('delete') || $undelete && !$post_object->acl_get('undelete')) {
titania::needs_auth();
}
if (titania::confirm_box(true)) {
if (!$undelete) {
$redirect_post_id = false;
// Delete the post
if (isset($_POST['hard_delete']) || $post_object->post_deleted) {
if (!phpbb::$auth->acl_get('u_titania_post_hard_delete')) {
titania::needs_auth();
}
$post_object->hard_delete();
// Try to redirect to the next or previous post
$redirect_post_id = posts_overlord::next_prev_post_id($post_object->topic_id, $post_object->post_id);
if ($redirect_post_id) {
redirect(titania_url::append_url($post_object->topic->get_url(), array('p' => $redirect_post_id, '#p' => $redirect_post_id)));
}
redirect(titania_url::build_url($post_object->topic->topic_url));
} else {
$post_object->soft_delete();
if (phpbb::$auth->acl_get('u_titania_mod_post_mod')) {
// They can see the post, redirect back to it
redirect($post_object->get_url());
} else {
// They cannot see the post, try to redirect to the next or previous post
$redirect_post_id = posts_overlord::next_prev_post_id($post_object->topic_id, $post_object->post_id);
if ($redirect_post_id) {
redirect(titania_url::append_url($post_object->topic->get_url(), array('p' => $redirect_post_id, '#p' => $redirect_post_id)));
}
}
}
redirect($post_object->topic->get_url());
} else {
$post_object->undelete();
redirect($post_object->get_url());
}
} else {
phpbb::$template->assign_var('S_HARD_DELETE', !$undelete && !$post_object->post_deleted && phpbb::$auth->acl_get('u_titania_post_hard_delete') ? true : false);
titania::confirm_box(false, !$undelete ? 'DELETE_POST' : 'UNDELETE_POST', '', array(), 'posting/delete_confirm.html');
}
redirect($post_object->get_url());
}
开发者ID:kairion, 项目名称:customisation-db, 代码行数:49, 代码来源:posting.php
示例17: pva_generate_category_select
function pva_generate_category_select()
{
titania::_include('functions_posting', 'generate_category_select');
phpbb::$template->destroy_block_vars('category_select');
generate_category_select();
phpbb::$template->set_filenames(array('generate_category_select' => 'manage/generate_category_select.html'));
$select = phpbb::$template->assign_display('generate_category_select');
return $select;
}
开发者ID:Gfksx, 项目名称:customisation-db, 代码行数:9, 代码来源:phpbb_version_add.php
示例18: foreach
$queue_type = $authed[0];
} else {
foreach ($authed as $type_id) {
$sql = 'SELECT COUNT(topic_id) AS cnt FROM ' . TITANIA_TOPICS_TABLE . '
WHERE topic_type = ' . TITANIA_QUEUE_DISCUSSION . '
AND topic_category = ' . (int) $type_id;
phpbb::$db->sql_query($sql);
$cnt = phpbb::$db->sql_fetchfield('cnt');
phpbb::$db->sql_freeresult();
phpbb::$template->assign_block_vars('categories', array('U_VIEW_CATEGORY' => titania_url::append_url($base_url, array('queue' => titania_types::$types[$type_id]->url)), 'CATEGORY_NAME' => titania_types::$types[$type_id]->lang, 'CATEGORY_CONTRIBS' => $cnt));
}
phpbb::$template->assign_vars(array('S_QUEUE_LIST' => true));
titania::page_header('QUEUE_DISCUSSION');
titania::page_footer(true, 'manage/queue.html');
}
}
} else {
if (!titania_types::$types[$queue_type]->acl_get('queue_discussion')) {
titania::needs_auth();
}
}
// Add the queue type to the base url
$base_url = titania_url::append_url($base_url, array('queue' => titania_types::$types[$queue_type]->url));
// Add to Breadcrumbs
titania::generate_breadcrumbs(array(titania_types::$types[$queue_type]->lang => $base_url));
topics_overlord::display_forums_complete('queue_discussion', false, array('topic_category' => $queue_type));
// Mark all topics read
phpbb::$template->assign_var('U_MARK_TOPICS', titania_url::append_url($base_url, array('mark' => 'topics')));
titania::page_header('QUEUE_DISCUSSION');
titania::page_footer(true, 'manage/queue_discussion.html');
开发者ID:kairion, 项目名称:customisation-db, 代码行数:30, 代码来源:queue_discussion.php
juven/maven-bash-completion: Maven Bash Auto Completion
阅读:820| 2022-08-16
shakee93/fonoapi: FonoApi - Mobile Device Description API
阅读:450| 2022-08-30
Cross Site Scripting (XSS) vulnerability in FusionPBX 4.5.26 allows remote unaut
阅读:985| 2022-07-08
route101/mastoinker: Quick image view assistant for Mastodon client
阅读:922| 2022-08-18
白酒的英文其实是:baijiu(你没看错,真的是baijiu,给老外介绍可以直接说baiju)。
阅读:390| 2022-11-06
0e0w · GitHub
阅读:428| 2022-08-15
MG2033/MobileNet: A Clearer and Simpler MobileNet Implementation in TensorFlow
阅读:694| 2022-08-30
音乐永远是让人产生共鸣的东西,心情好的时候我们会想哼个小曲儿,心情低落的时候会想
阅读:820| 2022-07-30
juankysoriano/MaterialLife: A Material Design styled Game of Life for Android
阅读:341| 2022-08-17
请发表评论