B3P v2: Added link block
and added phpBB3 core files includes/cache.php and includes/constants.php and a Datebase backup. :-)
This commit is contained in:
505
non-contrib/includes/cache.php
Normal file
505
non-contrib/includes/cache.php
Normal file
@@ -0,0 +1,505 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package acm
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class for grabbing/handling cached entries, extends acm_file or acm_db depending on the setup
|
||||
* @package acm
|
||||
*/
|
||||
class cache extends acm
|
||||
{
|
||||
/**
|
||||
* Get config values
|
||||
*/
|
||||
function obtain_config()
|
||||
{
|
||||
global $db;
|
||||
|
||||
if (($config = $this->get('config')) !== false)
|
||||
{
|
||||
$sql = 'SELECT config_name, config_value
|
||||
FROM ' . CONFIG_TABLE . '
|
||||
WHERE is_dynamic = 1';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$config[$row['config_name']] = $row['config_value'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
$config = $cached_config = array();
|
||||
|
||||
$sql = 'SELECT config_name, config_value, is_dynamic
|
||||
FROM ' . CONFIG_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if (!$row['is_dynamic'])
|
||||
{
|
||||
$cached_config[$row['config_name']] = $row['config_value'];
|
||||
}
|
||||
|
||||
$config[$row['config_name']] = $row['config_value'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$this->put('config', $cached_config);
|
||||
}
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain list of naughty words and build preg style replacement arrays for use by the
|
||||
* calling script
|
||||
*/
|
||||
function obtain_word_list()
|
||||
{
|
||||
global $db;
|
||||
|
||||
if (($censors = $this->get('_word_censors')) === false)
|
||||
{
|
||||
$sql = 'SELECT word, replacement
|
||||
FROM ' . WORDS_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$censors = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$censors['match'][] = '#(?<!\w)(' . str_replace('\*', '\w*?', preg_quote($row['word'], '#')) . ')(?!\w)#i';
|
||||
$censors['replace'][] = $row['replacement'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$this->put('_word_censors', $censors);
|
||||
}
|
||||
|
||||
return $censors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain currently listed icons
|
||||
*/
|
||||
function obtain_icons()
|
||||
{
|
||||
if (($icons = $this->get('_icons')) === false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
// Topic icons
|
||||
$sql = 'SELECT *
|
||||
FROM ' . ICONS_TABLE . '
|
||||
ORDER BY icons_order';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$icons = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$icons[$row['icons_id']]['img'] = $row['icons_url'];
|
||||
$icons[$row['icons_id']]['width'] = (int) $row['icons_width'];
|
||||
$icons[$row['icons_id']]['height'] = (int) $row['icons_height'];
|
||||
$icons[$row['icons_id']]['display'] = (bool) $row['display_on_posting'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$this->put('_icons', $icons);
|
||||
}
|
||||
|
||||
return $icons;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain ranks
|
||||
*/
|
||||
function obtain_ranks()
|
||||
{
|
||||
if (($ranks = $this->get('_ranks')) === false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . RANKS_TABLE . '
|
||||
ORDER BY rank_min DESC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$ranks = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if ($row['rank_special'])
|
||||
{
|
||||
$ranks['special'][$row['rank_id']] = array(
|
||||
'rank_title' => $row['rank_title'],
|
||||
'rank_image' => $row['rank_image']
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$ranks['normal'][] = array(
|
||||
'rank_title' => $row['rank_title'],
|
||||
'rank_min' => $row['rank_min'],
|
||||
'rank_image' => $row['rank_image']
|
||||
);
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$this->put('_ranks', $ranks);
|
||||
}
|
||||
|
||||
return $ranks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain allowed extensions
|
||||
*
|
||||
* @param mixed $forum_id If false then check for private messaging, if int then check for forum id. If true, then only return extension informations.
|
||||
*
|
||||
* @return array allowed extensions array.
|
||||
*/
|
||||
function obtain_attach_extensions($forum_id)
|
||||
{
|
||||
if (($extensions = $this->get('_extensions')) === false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$extensions = array(
|
||||
'_allowed_post' => array(),
|
||||
'_allowed_pm' => array(),
|
||||
);
|
||||
|
||||
// The rule is to only allow those extensions defined. ;)
|
||||
$sql = 'SELECT e.extension, g.*
|
||||
FROM ' . EXTENSIONS_TABLE . ' e, ' . EXTENSION_GROUPS_TABLE . ' g
|
||||
WHERE e.group_id = g.group_id
|
||||
AND (g.allow_group = 1 OR g.allow_in_pm = 1)';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$extension = strtolower(trim($row['extension']));
|
||||
|
||||
$extensions[$extension] = array(
|
||||
'display_cat' => (int) $row['cat_id'],
|
||||
'download_mode' => (int) $row['download_mode'],
|
||||
'upload_icon' => trim($row['upload_icon']),
|
||||
'max_filesize' => (int) $row['max_filesize'],
|
||||
'allow_group' => $row['allow_group'],
|
||||
'allow_in_pm' => $row['allow_in_pm'],
|
||||
);
|
||||
|
||||
$allowed_forums = ($row['allowed_forums']) ? unserialize(trim($row['allowed_forums'])) : array();
|
||||
|
||||
// Store allowed extensions forum wise
|
||||
if ($row['allow_group'])
|
||||
{
|
||||
$extensions['_allowed_post'][$extension] = (!sizeof($allowed_forums)) ? 0 : $allowed_forums;
|
||||
}
|
||||
|
||||
if ($row['allow_in_pm'])
|
||||
{
|
||||
$extensions['_allowed_pm'][$extension] = 0;
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$this->put('_extensions', $extensions);
|
||||
}
|
||||
|
||||
// Forum post
|
||||
if ($forum_id === false)
|
||||
{
|
||||
// We are checking for private messages, therefore we only need to get the pm extensions...
|
||||
$return = array('_allowed_' => array());
|
||||
|
||||
foreach ($extensions['_allowed_pm'] as $extension => $check)
|
||||
{
|
||||
$return['_allowed_'][$extension] = 0;
|
||||
$return[$extension] = $extensions[$extension];
|
||||
}
|
||||
|
||||
$extensions = $return;
|
||||
}
|
||||
else if ($forum_id === true)
|
||||
{
|
||||
return $extensions;
|
||||
}
|
||||
else
|
||||
{
|
||||
$forum_id = (int) $forum_id;
|
||||
$return = array('_allowed_' => array());
|
||||
|
||||
foreach ($extensions['_allowed_post'] as $extension => $check)
|
||||
{
|
||||
// Check for allowed forums
|
||||
if (is_array($check))
|
||||
{
|
||||
$allowed = (!in_array($forum_id, $check)) ? false : true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$allowed = true;
|
||||
}
|
||||
|
||||
if ($allowed)
|
||||
{
|
||||
$return['_allowed_'][$extension] = 0;
|
||||
$return[$extension] = $extensions[$extension];
|
||||
}
|
||||
}
|
||||
|
||||
$extensions = $return;
|
||||
}
|
||||
|
||||
if (!isset($extensions['_allowed_']))
|
||||
{
|
||||
$extensions['_allowed_'] = array();
|
||||
}
|
||||
|
||||
return $extensions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain active bots
|
||||
*/
|
||||
function obtain_bots()
|
||||
{
|
||||
if (($bots = $this->get('_bots')) === false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
switch ($db->sql_layer)
|
||||
{
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
$sql = 'SELECT user_id, bot_agent, bot_ip
|
||||
FROM ' . BOTS_TABLE . '
|
||||
WHERE bot_active = 1
|
||||
ORDER BY LEN(bot_agent) DESC';
|
||||
break;
|
||||
|
||||
case 'firebird':
|
||||
$sql = 'SELECT user_id, bot_agent, bot_ip
|
||||
FROM ' . BOTS_TABLE . '
|
||||
WHERE bot_active = 1
|
||||
ORDER BY CHAR_LENGTH(bot_agent) DESC';
|
||||
break;
|
||||
|
||||
// LENGTH supported by MySQL, IBM DB2 and Oracle for sure...
|
||||
default:
|
||||
$sql = 'SELECT user_id, bot_agent, bot_ip
|
||||
FROM ' . BOTS_TABLE . '
|
||||
WHERE bot_active = 1
|
||||
ORDER BY LENGTH(bot_agent) DESC';
|
||||
break;
|
||||
}
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$bots = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$bots[] = $row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$this->put('_bots', $bots);
|
||||
}
|
||||
|
||||
return $bots;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain cfg file data
|
||||
*/
|
||||
function obtain_cfg_items($theme)
|
||||
{
|
||||
global $config, $phpbb_root_path;
|
||||
|
||||
$parsed_items = array(
|
||||
'theme' => array(),
|
||||
'template' => array(),
|
||||
'imageset' => array()
|
||||
);
|
||||
|
||||
foreach ($parsed_items as $key => $parsed_array)
|
||||
{
|
||||
$parsed_array = $this->get('_cfg_' . $key . '_' . $theme[$key . '_path']);
|
||||
|
||||
if ($parsed_array === false)
|
||||
{
|
||||
$parsed_array = array();
|
||||
}
|
||||
|
||||
$reparse = false;
|
||||
$filename = $phpbb_root_path . 'styles/' . $theme[$key . '_path'] . '/' . $key . '/' . $key . '.cfg';
|
||||
|
||||
if (!file_exists($filename))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($parsed_array['filetime']) || (($config['load_tplcompile'] && @filemtime($filename) > $parsed_array['filetime'])))
|
||||
{
|
||||
$reparse = true;
|
||||
}
|
||||
|
||||
// Re-parse cfg file
|
||||
if ($reparse)
|
||||
{
|
||||
$parsed_array = parse_cfg_file($filename);
|
||||
$parsed_array['filetime'] = @filemtime($filename);
|
||||
|
||||
$this->put('_cfg_' . $key . '_' . $theme[$key . '_path'], $parsed_array);
|
||||
}
|
||||
$parsed_items[$key] = $parsed_array;
|
||||
}
|
||||
|
||||
return $parsed_items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain disallowed usernames
|
||||
*/
|
||||
function obtain_disallowed_usernames()
|
||||
{
|
||||
if (($usernames = $this->get('_disallowed_usernames')) === false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = 'SELECT disallow_username
|
||||
FROM ' . DISALLOW_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$usernames = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$usernames[] = str_replace('%', '.*?', preg_quote(utf8_clean_string($row['disallow_username']), '#'));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$this->put('_disallowed_usernames', $usernames);
|
||||
}
|
||||
|
||||
return $usernames;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain hooks...
|
||||
*/
|
||||
function obtain_hooks()
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
if (($hook_files = $this->get('_hooks')) === false)
|
||||
{
|
||||
$hook_files = array();
|
||||
|
||||
// Now search for hooks...
|
||||
$dh = @opendir($phpbb_root_path . 'includes/hooks/');
|
||||
|
||||
if ($dh)
|
||||
{
|
||||
while (($file = readdir($dh)) !== false)
|
||||
{
|
||||
if (strpos($file, 'hook_') === 0 && substr($file, -(strlen($phpEx) + 1)) === '.' . $phpEx)
|
||||
{
|
||||
$hook_files[] = substr($file, 0, -(strlen($phpEx) + 1));
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
|
||||
$this->put('_hooks', $hook_files);
|
||||
}
|
||||
|
||||
return $hook_files;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain currently listed blocks
|
||||
*/
|
||||
function obtain_blocks()
|
||||
{
|
||||
if (($blocks = $this->get('_blocks')) === false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
// Get blocks
|
||||
$sql = 'SELECT *
|
||||
FROM ' . PORTAL_BLOCKS_TABLE . '
|
||||
ORDER BY block_order';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$blocks = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$blocks[$row['block_id']]['id'] = (int )$row['block_id'];
|
||||
$blocks[$row['block_id']]['title'] = (string) $row['block_title'];
|
||||
$blocks[$row['block_id']]['type'] = (string) $row['block_type'];
|
||||
$blocks[$row['block_id']]['position'] = (string) $row['block_position'];
|
||||
$blocks[$row['block_id']]['group'] = (string) $row['block_groups'];
|
||||
$blocks[$row['block_id']]['order'] = (int) $row['block_order'];
|
||||
$blocks[$row['block_id']]['icon'] = (string) $row['block_icon'];
|
||||
$blocks[$row['block_id']]['text'] = (string) $row['block_text'];
|
||||
$blocks[$row['block_id']]['text_bitfield'] = (string) $row['block_text_bitfield'];
|
||||
$blocks[$row['block_id']]['text_options'] = (int) $row['block_text_options'];
|
||||
$blocks[$row['block_id']]['text_uid'] = (string) $row['block_text_uid'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$this->put('_blocks', $blocks);
|
||||
}
|
||||
|
||||
return $blocks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain currently listed navigation links
|
||||
*/
|
||||
function obtain_links()
|
||||
{
|
||||
if (($links = $this->get('_links')) === false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
// Get navigation links
|
||||
$sql = 'SELECT *
|
||||
FROM ' . PORTAL_LINKS_TABLE . '
|
||||
ORDER BY link_order';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$links = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$links[$row['link_id']]['id'] = (int )$row['link_id'];
|
||||
$links[$row['link_id']]['title'] = (string) $row['link_title'];
|
||||
$links[$row['link_id']]['url'] = (string) $row['link_url'];
|
||||
$links[$row['link_id']]['is_cat'] = ($row['link_is_cat']) ? true : false;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$this->put('_links', $links);
|
||||
}
|
||||
|
||||
return $links;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
275
non-contrib/includes/constants.php
Normal file
275
non-contrib/includes/constants.php
Normal file
@@ -0,0 +1,275 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* valid external constants:
|
||||
* PHPBB_MSG_HANDLER
|
||||
* PHPBB_DB_NEW_LINK
|
||||
* PHPBB_ROOT_PATH
|
||||
* PHPBB_ADMIN_PATH
|
||||
*/
|
||||
|
||||
// phpBB Version
|
||||
define('PHPBB_VERSION', '3.0.5');
|
||||
|
||||
// QA-related
|
||||
// define('PHPBB_QA', 1);
|
||||
|
||||
// User related
|
||||
define('ANONYMOUS', 1);
|
||||
|
||||
define('USER_ACTIVATION_NONE', 0);
|
||||
define('USER_ACTIVATION_SELF', 1);
|
||||
define('USER_ACTIVATION_ADMIN', 2);
|
||||
define('USER_ACTIVATION_DISABLE', 3);
|
||||
|
||||
define('AVATAR_UPLOAD', 1);
|
||||
define('AVATAR_REMOTE', 2);
|
||||
define('AVATAR_GALLERY', 3);
|
||||
|
||||
define('USER_NORMAL', 0);
|
||||
define('USER_INACTIVE', 1);
|
||||
define('USER_IGNORE', 2);
|
||||
define('USER_FOUNDER', 3);
|
||||
|
||||
define('INACTIVE_REGISTER', 1);
|
||||
define('INACTIVE_PROFILE', 2);
|
||||
define('INACTIVE_MANUAL', 3);
|
||||
define('INACTIVE_REMIND', 4);
|
||||
|
||||
// ACL
|
||||
define('ACL_NEVER', 0);
|
||||
define('ACL_YES', 1);
|
||||
define('ACL_NO', -1);
|
||||
|
||||
// Login error codes
|
||||
define('LOGIN_CONTINUE', 1);
|
||||
define('LOGIN_BREAK', 2);
|
||||
define('LOGIN_SUCCESS', 3);
|
||||
define('LOGIN_SUCCESS_CREATE_PROFILE', 20);
|
||||
define('LOGIN_ERROR_USERNAME', 10);
|
||||
define('LOGIN_ERROR_PASSWORD', 11);
|
||||
define('LOGIN_ERROR_ACTIVE', 12);
|
||||
define('LOGIN_ERROR_ATTEMPTS', 13);
|
||||
define('LOGIN_ERROR_EXTERNAL_AUTH', 14);
|
||||
define('LOGIN_ERROR_PASSWORD_CONVERT', 15);
|
||||
|
||||
// Group settings
|
||||
define('GROUP_OPEN', 0);
|
||||
define('GROUP_CLOSED', 1);
|
||||
define('GROUP_HIDDEN', 2);
|
||||
define('GROUP_SPECIAL', 3);
|
||||
define('GROUP_FREE', 4);
|
||||
|
||||
// Forum/Topic states
|
||||
define('FORUM_CAT', 0);
|
||||
define('FORUM_POST', 1);
|
||||
define('FORUM_LINK', 2);
|
||||
define('ITEM_UNLOCKED', 0);
|
||||
define('ITEM_LOCKED', 1);
|
||||
define('ITEM_MOVED', 2);
|
||||
|
||||
// Forum Flags
|
||||
define('FORUM_FLAG_LINK_TRACK', 1);
|
||||
define('FORUM_FLAG_PRUNE_POLL', 2);
|
||||
define('FORUM_FLAG_PRUNE_ANNOUNCE', 4);
|
||||
define('FORUM_FLAG_PRUNE_STICKY', 8);
|
||||
define('FORUM_FLAG_ACTIVE_TOPICS', 16);
|
||||
define('FORUM_FLAG_POST_REVIEW', 32);
|
||||
|
||||
// Optional text flags
|
||||
define('OPTION_FLAG_BBCODE', 1);
|
||||
define('OPTION_FLAG_SMILIES', 2);
|
||||
define('OPTION_FLAG_LINKS', 4);
|
||||
|
||||
// Topic types
|
||||
define('POST_NORMAL', 0);
|
||||
define('POST_STICKY', 1);
|
||||
define('POST_ANNOUNCE', 2);
|
||||
define('POST_GLOBAL', 3);
|
||||
|
||||
// Lastread types
|
||||
define('TRACK_NORMAL', 0);
|
||||
define('TRACK_POSTED', 1);
|
||||
|
||||
// Notify methods
|
||||
define('NOTIFY_EMAIL', 0);
|
||||
define('NOTIFY_IM', 1);
|
||||
define('NOTIFY_BOTH', 2);
|
||||
|
||||
// Email Priority Settings
|
||||
define('MAIL_LOW_PRIORITY', 4);
|
||||
define('MAIL_NORMAL_PRIORITY', 3);
|
||||
define('MAIL_HIGH_PRIORITY', 2);
|
||||
|
||||
// Log types
|
||||
define('LOG_ADMIN', 0);
|
||||
define('LOG_MOD', 1);
|
||||
define('LOG_CRITICAL', 2);
|
||||
define('LOG_USERS', 3);
|
||||
|
||||
// Private messaging - Do NOT change these values
|
||||
define('PRIVMSGS_HOLD_BOX', -4);
|
||||
define('PRIVMSGS_NO_BOX', -3);
|
||||
define('PRIVMSGS_OUTBOX', -2);
|
||||
define('PRIVMSGS_SENTBOX', -1);
|
||||
define('PRIVMSGS_INBOX', 0);
|
||||
|
||||
// Full Folder Actions
|
||||
define('FULL_FOLDER_NONE', -3);
|
||||
define('FULL_FOLDER_DELETE', -2);
|
||||
define('FULL_FOLDER_HOLD', -1);
|
||||
|
||||
// Download Modes - Attachments
|
||||
define('INLINE_LINK', 1);
|
||||
// This mode is only used internally to allow modders extending the attachment functionality
|
||||
define('PHYSICAL_LINK', 2);
|
||||
|
||||
// Confirm types
|
||||
define('CONFIRM_REG', 1);
|
||||
define('CONFIRM_LOGIN', 2);
|
||||
define('CONFIRM_POST', 3);
|
||||
|
||||
// Categories - Attachments
|
||||
define('ATTACHMENT_CATEGORY_NONE', 0);
|
||||
define('ATTACHMENT_CATEGORY_IMAGE', 1); // Inline Images
|
||||
define('ATTACHMENT_CATEGORY_WM', 2); // Windows Media Files - Streaming
|
||||
define('ATTACHMENT_CATEGORY_RM', 3); // Real Media Files - Streaming
|
||||
define('ATTACHMENT_CATEGORY_THUMB', 4); // Not used within the database, only while displaying posts
|
||||
define('ATTACHMENT_CATEGORY_FLASH', 5); // Flash/SWF files
|
||||
define('ATTACHMENT_CATEGORY_QUICKTIME', 6); // Quicktime/Mov files
|
||||
|
||||
// BBCode UID length
|
||||
define('BBCODE_UID_LEN', 8);
|
||||
|
||||
// Number of core BBCodes
|
||||
define('NUM_CORE_BBCODES', 12);
|
||||
|
||||
// Magic url types
|
||||
define('MAGIC_URL_EMAIL', 1);
|
||||
define('MAGIC_URL_FULL', 2);
|
||||
define('MAGIC_URL_LOCAL', 3);
|
||||
define('MAGIC_URL_WWW', 4);
|
||||
|
||||
// Profile Field Types
|
||||
define('FIELD_INT', 1);
|
||||
define('FIELD_STRING', 2);
|
||||
define('FIELD_TEXT', 3);
|
||||
define('FIELD_BOOL', 4);
|
||||
define('FIELD_DROPDOWN', 5);
|
||||
define('FIELD_DATE', 6);
|
||||
|
||||
// referer validation
|
||||
define('REFERER_VALIDATE_NONE', 0);
|
||||
define('REFERER_VALIDATE_HOST', 1);
|
||||
define('REFERER_VALIDATE_PATH', 2);
|
||||
|
||||
// phpbb_chmod() permissions
|
||||
@define('CHMOD_ALL', 7);
|
||||
@define('CHMOD_READ', 4);
|
||||
@define('CHMOD_WRITE', 2);
|
||||
@define('CHMOD_EXECUTE', 1);
|
||||
|
||||
// Captcha code length
|
||||
define('CAPTCHA_MIN_CHARS', 4);
|
||||
define('CAPTCHA_MAX_CHARS', 7);
|
||||
|
||||
// Additional constants
|
||||
define('VOTE_CONVERTED', 127);
|
||||
define('BLOCK_NONE', 0);
|
||||
define('BLOCK_LEFT', 1);
|
||||
define('BLOCK_RIGHT', 2);
|
||||
define('BLOCK_TOP', 3);
|
||||
define('BLOCK_BOTTOM', 4);
|
||||
define('BLOCK_MIDDLE_TOP', 5);
|
||||
define('BLOCK_MIDDLE_BOTTOM', 6);
|
||||
|
||||
// Table names
|
||||
define('ACL_GROUPS_TABLE', $table_prefix . 'acl_groups');
|
||||
define('ACL_OPTIONS_TABLE', $table_prefix . 'acl_options');
|
||||
define('ACL_ROLES_DATA_TABLE', $table_prefix . 'acl_roles_data');
|
||||
define('ACL_ROLES_TABLE', $table_prefix . 'acl_roles');
|
||||
define('ACL_USERS_TABLE', $table_prefix . 'acl_users');
|
||||
define('ATTACHMENTS_TABLE', $table_prefix . 'attachments');
|
||||
define('BANLIST_TABLE', $table_prefix . 'banlist');
|
||||
define('BBCODES_TABLE', $table_prefix . 'bbcodes');
|
||||
define('BOOKMARKS_TABLE', $table_prefix . 'bookmarks');
|
||||
define('BOTS_TABLE', $table_prefix . 'bots');
|
||||
define('CONFIG_TABLE', $table_prefix . 'config');
|
||||
define('CONFIRM_TABLE', $table_prefix . 'confirm');
|
||||
define('DISALLOW_TABLE', $table_prefix . 'disallow');
|
||||
define('DRAFTS_TABLE', $table_prefix . 'drafts');
|
||||
define('EXTENSIONS_TABLE', $table_prefix . 'extensions');
|
||||
define('EXTENSION_GROUPS_TABLE', $table_prefix . 'extension_groups');
|
||||
define('FORUMS_TABLE', $table_prefix . 'forums');
|
||||
define('FORUMS_ACCESS_TABLE', $table_prefix . 'forums_access');
|
||||
define('FORUMS_TRACK_TABLE', $table_prefix . 'forums_track');
|
||||
define('FORUMS_WATCH_TABLE', $table_prefix . 'forums_watch');
|
||||
define('GROUPS_TABLE', $table_prefix . 'groups');
|
||||
define('ICONS_TABLE', $table_prefix . 'icons');
|
||||
define('LANG_TABLE', $table_prefix . 'lang');
|
||||
define('LOG_TABLE', $table_prefix . 'log');
|
||||
define('MODERATOR_CACHE_TABLE', $table_prefix . 'moderator_cache');
|
||||
define('MODULES_TABLE', $table_prefix . 'modules');
|
||||
define('POLL_OPTIONS_TABLE', $table_prefix . 'poll_options');
|
||||
define('POLL_VOTES_TABLE', $table_prefix . 'poll_votes');
|
||||
define('POSTS_TABLE', $table_prefix . 'posts');
|
||||
define('PRIVMSGS_TABLE', $table_prefix . 'privmsgs');
|
||||
define('PRIVMSGS_FOLDER_TABLE', $table_prefix . 'privmsgs_folder');
|
||||
define('PRIVMSGS_RULES_TABLE', $table_prefix . 'privmsgs_rules');
|
||||
define('PRIVMSGS_TO_TABLE', $table_prefix . 'privmsgs_to');
|
||||
define('PROFILE_FIELDS_TABLE', $table_prefix . 'profile_fields');
|
||||
define('PROFILE_FIELDS_DATA_TABLE', $table_prefix . 'profile_fields_data');
|
||||
define('PROFILE_FIELDS_LANG_TABLE', $table_prefix . 'profile_fields_lang');
|
||||
define('PROFILE_LANG_TABLE', $table_prefix . 'profile_lang');
|
||||
define('RANKS_TABLE', $table_prefix . 'ranks');
|
||||
define('REPORTS_TABLE', $table_prefix . 'reports');
|
||||
define('REPORTS_REASONS_TABLE', $table_prefix . 'reports_reasons');
|
||||
define('SEARCH_RESULTS_TABLE', $table_prefix . 'search_results');
|
||||
define('SEARCH_WORDLIST_TABLE', $table_prefix . 'search_wordlist');
|
||||
define('SEARCH_WORDMATCH_TABLE', $table_prefix . 'search_wordmatch');
|
||||
define('SESSIONS_TABLE', $table_prefix . 'sessions');
|
||||
define('SESSIONS_KEYS_TABLE', $table_prefix . 'sessions_keys');
|
||||
define('SITELIST_TABLE', $table_prefix . 'sitelist');
|
||||
define('SMILIES_TABLE', $table_prefix . 'smilies');
|
||||
define('STYLES_TABLE', $table_prefix . 'styles');
|
||||
define('STYLES_TEMPLATE_TABLE', $table_prefix . 'styles_template');
|
||||
define('STYLES_TEMPLATE_DATA_TABLE',$table_prefix . 'styles_template_data');
|
||||
define('STYLES_THEME_TABLE', $table_prefix . 'styles_theme');
|
||||
define('STYLES_IMAGESET_TABLE', $table_prefix . 'styles_imageset');
|
||||
define('STYLES_IMAGESET_DATA_TABLE',$table_prefix . 'styles_imageset_data');
|
||||
define('TOPICS_TABLE', $table_prefix . 'topics');
|
||||
define('TOPICS_POSTED_TABLE', $table_prefix . 'topics_posted');
|
||||
define('TOPICS_TRACK_TABLE', $table_prefix . 'topics_track');
|
||||
define('TOPICS_WATCH_TABLE', $table_prefix . 'topics_watch');
|
||||
define('USER_GROUP_TABLE', $table_prefix . 'user_group');
|
||||
define('USERS_TABLE', $table_prefix . 'users');
|
||||
define('WARNINGS_TABLE', $table_prefix . 'warnings');
|
||||
define('WORDS_TABLE', $table_prefix . 'words');
|
||||
define('ZEBRA_TABLE', $table_prefix . 'zebra');
|
||||
|
||||
// Additional tables
|
||||
define('PORTAL_ROOT_PATH', 'portal/');
|
||||
define('PORTAL_ICONS_PATH', 'images/portal/icons');
|
||||
|
||||
define('PORTAL_BLOCKS_TABLE', $table_prefix . 'portal_blocks');
|
||||
define('PORTAL_CONFIG_TABLE', $table_prefix . 'portal_config');
|
||||
//define('PORTAL_PAGES_TABLE', $table_prefix . 'portal_pages');
|
||||
define('PORTAL_LINKS_TABLE', $table_prefix . 'portal_links');
|
||||
|
||||
?>
|
||||
BIN
non-contrib/store/backup_1252165208_7b6275c2eb44c553.sql.gz
Normal file
BIN
non-contrib/store/backup_1252165208_7b6275c2eb44c553.sql.gz
Normal file
Binary file not shown.
@@ -167,9 +167,9 @@ $result = $db->sql_query($sql);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Grab navigation links
|
||||
//if ($portal_config['num_links'] > 0)
|
||||
//{
|
||||
/* $links = $cache->obtain_links();
|
||||
if ($portal_config['num_links'] > 0)
|
||||
{
|
||||
$links = $cache->obtain_links();
|
||||
|
||||
if (sizeof($links))
|
||||
{
|
||||
@@ -183,8 +183,8 @@ $db->sql_freeresult($result);
|
||||
));
|
||||
}
|
||||
}
|
||||
//}
|
||||
*/
|
||||
}
|
||||
|
||||
// Assign specific vars
|
||||
$template->assign_vars(array(
|
||||
'WELCOME_USERNAME' => get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour']),
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
<!--version $Id$ //-->
|
||||
{$LR_BLOCK_H_L}<img src="{T_THEME_PATH}/images/portal/portal_links.png" width="16" height="16" alt="" /> {L_LINKS}{$LR_BLOCK_H_R}
|
||||
<!-- IF .links -->
|
||||
<div class="portal-navigation">
|
||||
<ul>
|
||||
<!-- IF .link -->
|
||||
<!-- BEGIN link -->
|
||||
<li><a href="{link.URL}" title="{link.TEXT}">{link.TEXT}</a></li>
|
||||
<!-- END link -->
|
||||
<!-- ELSE -->
|
||||
<span style="float:left;" class="gensmall"><strong>{L_NO_LINKS}</strong></span><br />
|
||||
<!-- ENDIF -->
|
||||
<!-- BEGIN links -->
|
||||
<!-- IF links.S_IS_CAT --><div class="menutitle">{links.TITLE}</div><!-- ELSE --><li><a href="{links.URL}">{links.TITLE}</a></li><!-- ENDIF -->
|
||||
<!-- END links -->
|
||||
</ul>
|
||||
</div>
|
||||
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}
|
||||
<!-- ELSE -->
|
||||
<span style="float:left;" class="gensmall"><strong>{L_NO_LINKS}</strong></span><br />
|
||||
<!-- ENDIF -->
|
||||
|
||||
Reference in New Issue
Block a user