mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Various bits and pieces ... this isn't really what I wanted M-2 to look like but hum ho
git-svn-id: file:///svn/phpbb/trunk@4441 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
6225256418
commit
7d7a08eee6
11 changed files with 299 additions and 240 deletions
|
@ -24,6 +24,9 @@ if (!defined('IN_PHPBB'))
|
||||||
die('Hacking attempt');
|
die('Hacking attempt');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$starttime = explode(' ', microtime());
|
||||||
|
$starttime = $starttime[1] + $starttime[0];
|
||||||
|
|
||||||
error_reporting(E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
|
error_reporting(E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
|
||||||
//error_reporting(E_ALL);
|
//error_reporting(E_ALL);
|
||||||
set_magic_quotes_runtime(0);
|
set_magic_quotes_runtime(0);
|
||||||
|
|
|
@ -13,6 +13,8 @@ CREATE TABLE phpbb_attachments (
|
||||||
user_id_to INTEGER NOT NULL
|
user_id_to INTEGER NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX attach_id ON phpbb_attachments (attach_id);
|
||||||
|
|
||||||
-- Table: phpbb_attach_desc
|
-- Table: phpbb_attach_desc
|
||||||
CREATE TABLE phpbb_attach_desc (
|
CREATE TABLE phpbb_attach_desc (
|
||||||
attach_id INTEGER NOT NULL,
|
attach_id INTEGER NOT NULL,
|
||||||
|
@ -28,6 +30,10 @@ CREATE TABLE phpbb_attach_desc (
|
||||||
PRIMARY KEY (attach_id)
|
PRIMARY KEY (attach_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX filetime ON phpbb_attach_desc (filetime);
|
||||||
|
CREATE INDEX physical_filename ON phpbb_attach_desc (physical_filename);
|
||||||
|
CREATE INDEX filesize ON phpbb_attach_desc (filesize);
|
||||||
|
|
||||||
-- Table: phpbb_auth_groups
|
-- Table: phpbb_auth_groups
|
||||||
CREATE TABLE phpbb_auth_groups (
|
CREATE TABLE phpbb_auth_groups (
|
||||||
group_id INTEGER DEFAULT 0 NOT NULL,
|
group_id INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
@ -36,6 +42,9 @@ CREATE TABLE phpbb_auth_groups (
|
||||||
auth_setting INTEGER DEFAULT 0 NOT NULL
|
auth_setting INTEGER DEFAULT 0 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX group_id ON phpbb_auth_groups (group_id);
|
||||||
|
CREATE INDEX auth_option_id ON phpbb_auth_groups (auth_option_id);
|
||||||
|
|
||||||
-- Table: phpbb_auth_options
|
-- Table: phpbb_auth_options
|
||||||
CREATE TABLE phpbb_auth_options (
|
CREATE TABLE phpbb_auth_options (
|
||||||
auth_option_id INTEGER NOT NULL,
|
auth_option_id INTEGER NOT NULL,
|
||||||
|
@ -46,6 +55,8 @@ CREATE TABLE phpbb_auth_options (
|
||||||
PRIMARY KEY (auth_option_id)
|
PRIMARY KEY (auth_option_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX auth_option ON phpbb_auth_options (auth_option);
|
||||||
|
|
||||||
-- Table: phpbb_auth_presets
|
-- Table: phpbb_auth_presets
|
||||||
CREATE TABLE phpbb_auth_presets (
|
CREATE TABLE phpbb_auth_presets (
|
||||||
preset_id INTEGER NOT NULL,
|
preset_id INTEGER NOT NULL,
|
||||||
|
@ -56,6 +67,8 @@ CREATE TABLE phpbb_auth_presets (
|
||||||
PRIMARY KEY (preset_id)
|
PRIMARY KEY (preset_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX preset_type ON phpbb_auth_presets (preset_type);
|
||||||
|
|
||||||
-- Table: phpbb_auth_users
|
-- Table: phpbb_auth_users
|
||||||
CREATE TABLE phpbb_auth_users (
|
CREATE TABLE phpbb_auth_users (
|
||||||
user_id INTEGER DEFAULT 0 NOT NULL,
|
user_id INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
@ -64,6 +77,9 @@ CREATE TABLE phpbb_auth_users (
|
||||||
auth_setting INTEGER DEFAULT 0 NOT NULL
|
auth_setting INTEGER DEFAULT 0 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX user_id ON phpbb_auth_users (user_id);
|
||||||
|
CREATE INDEX auth_option_id2 ON phpbb_auth_users (auth_option_id);
|
||||||
|
|
||||||
-- Table: 'phpbb_banlist'
|
-- Table: 'phpbb_banlist'
|
||||||
CREATE TABLE phpbb_banlist (
|
CREATE TABLE phpbb_banlist (
|
||||||
ban_id INTEGER NOT NULL,
|
ban_id INTEGER NOT NULL,
|
||||||
|
@ -94,6 +110,8 @@ CREATE TABLE phpbb_config (
|
||||||
PRIMARY KEY (config_name)
|
PRIMARY KEY (config_name)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX is_dynamic ON phpbb_config (is_dynamic);
|
||||||
|
|
||||||
-- Table: 'phpbb_confirm'
|
-- Table: 'phpbb_confirm'
|
||||||
CREATE TABLE phpbb_confirm (
|
CREATE TABLE phpbb_confirm (
|
||||||
confirm_id CHAR(32) DEFAULT '' NOT NULL,
|
confirm_id CHAR(32) DEFAULT '' NOT NULL,
|
||||||
|
@ -163,6 +181,9 @@ CREATE TABLE phpbb_forums (
|
||||||
PRIMARY KEY (forum_id)
|
PRIMARY KEY (forum_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX left_id ON phpbb_forums (left_id);
|
||||||
|
CREATE INDEX forum_last_post_id ON phpbb_forums (forum_last_post_id);
|
||||||
|
|
||||||
-- Table: phpbb_forum_access
|
-- Table: phpbb_forum_access
|
||||||
CREATE TABLE phpbb_forum_access (
|
CREATE TABLE phpbb_forum_access (
|
||||||
forum_id INTEGER DEFAULT 0 NOT NULL,
|
forum_id INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
@ -186,6 +207,10 @@ CREATE TABLE phpbb_forums_watch (
|
||||||
notify_status INTEGER DEFAULT 0 NOT NULL
|
notify_status INTEGER DEFAULT 0 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX forum_id ON phpbb_forums_watch (forum_id);
|
||||||
|
CREATE INDEX user_id2 ON phpbb_forums_watch (user_id);
|
||||||
|
CREATE INDEX notify_status ON phpbb_forums_watch (notify_status);
|
||||||
|
|
||||||
-- Table: 'phpbb_groups'
|
-- Table: 'phpbb_groups'
|
||||||
CREATE TABLE phpbb_groups (
|
CREATE TABLE phpbb_groups (
|
||||||
group_id INTEGER NOT NULL,
|
group_id INTEGER NOT NULL,
|
||||||
|
@ -228,9 +253,10 @@ CREATE TABLE phpbb_lang (
|
||||||
PRIMARY KEY (lang_id)
|
PRIMARY KEY (lang_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
-- Table: 'phpbb_log_moderator'
|
-- Table: 'phpbb_log'
|
||||||
CREATE TABLE phpbb_log_moderator (
|
CREATE TABLE phpbb_log (
|
||||||
log_id INTEGER DEFAULT 0 NOT NULL,
|
log_id INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
log_type INTEGER DEFAULT 0 NOT NULL,
|
||||||
user_id INTEGER DEFAULT 0 NOT NULL,
|
user_id INTEGER DEFAULT 0 NOT NULL,
|
||||||
forum_id INTEGER DEFAULT 0 NOT NULL,
|
forum_id INTEGER DEFAULT 0 NOT NULL,
|
||||||
topic_id INTEGER DEFAULT 0 NOT NULL,
|
topic_id INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
@ -241,16 +267,10 @@ CREATE TABLE phpbb_log_moderator (
|
||||||
PRIMARY KEY (log_id)
|
PRIMARY KEY (log_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
-- Table: 'phpbb_log_admin'
|
CREATE INDEX log_type ON phpbb_log (log_type);
|
||||||
CREATE TABLE phpbb_log_admin (
|
CREATE INDEX forum_id2 ON phpbb_log (forum_id);
|
||||||
log_id INTEGER NOT NULL,
|
CREATE INDEX topic_id ON phpbb_log (topic_id);
|
||||||
user_id INTEGER DEFAULT 0 NOT NULL,
|
CREATE INDEX user_id3 ON phpbb_log (user_id);
|
||||||
log_ip VARCHAR(40) NOT NULL,
|
|
||||||
log_time INTEGER NOT NULL,
|
|
||||||
log_operation TEXT,
|
|
||||||
log_data TEXT,
|
|
||||||
PRIMARY KEY (log_id)
|
|
||||||
);
|
|
||||||
|
|
||||||
-- Table: 'phpbb_moderator_cache'
|
-- Table: 'phpbb_moderator_cache'
|
||||||
CREATE TABLE phpbb_moderator_cache (
|
CREATE TABLE phpbb_moderator_cache (
|
||||||
|
@ -262,7 +282,10 @@ CREATE TABLE phpbb_moderator_cache (
|
||||||
display_on_index INTEGER DEFAULT 1 NOT NULL
|
display_on_index INTEGER DEFAULT 1 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
-- Table: 'phpbb_vote_results'
|
CREATE INDEX display_on_index ON phpbb_moderator_cache (display_on_index);
|
||||||
|
CREATE INDEX forum_id3 ON phpbb_moderator_cache (forum_id);
|
||||||
|
|
||||||
|
-- Table: 'phpbb_poll_results'
|
||||||
CREATE TABLE phpbb_poll_results (
|
CREATE TABLE phpbb_poll_results (
|
||||||
poll_option_id INTEGER DEFAULT 0 NOT NULL,
|
poll_option_id INTEGER DEFAULT 0 NOT NULL,
|
||||||
topic_id INTEGER DEFAULT 0 NOT NULL,
|
topic_id INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
@ -270,7 +293,10 @@ CREATE TABLE phpbb_poll_results (
|
||||||
poll_option_total INTEGER DEFAULT 0 NOT NULL
|
poll_option_total INTEGER DEFAULT 0 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
-- Table: 'phpbb_vote_voters'
|
CREATE INDEX poll_option_id ON phpbb_poll_results (poll_option_id);
|
||||||
|
CREATE INDEX topic_id3 ON phpbb_poll_results (topic_id);
|
||||||
|
|
||||||
|
-- Table: 'phpbb_poll_voters'
|
||||||
CREATE TABLE phpbb_poll_voters (
|
CREATE TABLE phpbb_poll_voters (
|
||||||
topic_id INTEGER DEFAULT 0 NOT NULL,
|
topic_id INTEGER DEFAULT 0 NOT NULL,
|
||||||
poll_option_id INTEGER DEFAULT 0 NOT NULL,
|
poll_option_id INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
@ -278,6 +304,10 @@ CREATE TABLE phpbb_poll_voters (
|
||||||
vote_user_ip VARCHAR(40) DEFAULT '' NOT NULL
|
vote_user_ip VARCHAR(40) DEFAULT '' NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX topic_id4 ON phpbb_poll_voters (topic_id);
|
||||||
|
CREATE INDEX vote_user_id ON phpbb_poll_voters (vote_user_id);
|
||||||
|
CREATE INDEX vote_user_ip ON phpbb_poll_voters (vote_user_ip);
|
||||||
|
|
||||||
-- Table: 'phpbb_posts'
|
-- Table: 'phpbb_posts'
|
||||||
CREATE TABLE phpbb_posts (
|
CREATE TABLE phpbb_posts (
|
||||||
post_id INTEGER NOT NULL,
|
post_id INTEGER NOT NULL,
|
||||||
|
@ -308,6 +338,12 @@ CREATE TABLE phpbb_posts (
|
||||||
PRIMARY KEY (post_id)
|
PRIMARY KEY (post_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX forum_id4 ON phpbb_posts (forum_id);
|
||||||
|
CREATE INDEX topic_id5 ON phpbb_posts (topic_id);
|
||||||
|
CREATE INDEX poster_ip ON phpbb_posts (poster_ip);
|
||||||
|
CREATE INDEX poster_id ON phpbb_posts (poster_id);
|
||||||
|
CREATE INDEX post_approved ON phpbb_posts (post_approved);
|
||||||
|
|
||||||
-- Table: 'phpbb_privmsgs'
|
-- Table: 'phpbb_privmsgs'
|
||||||
CREATE TABLE phpbb_privmsgs (
|
CREATE TABLE phpbb_privmsgs (
|
||||||
privmsgs_id INTEGER NOT NULL,
|
privmsgs_id INTEGER NOT NULL,
|
||||||
|
@ -327,6 +363,9 @@ CREATE TABLE phpbb_privmsgs (
|
||||||
PRIMARY KEY (privmsgs_id)
|
PRIMARY KEY (privmsgs_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX privmsgs_from_userid ON phpbb_privmsgs (privmsgs_from_userid);
|
||||||
|
CREATE INDEX privmsgs_to_userid ON phpbb_privmsgs (privmsgs_to_userid);
|
||||||
|
|
||||||
-- Table: 'phpbb_ranks'
|
-- Table: 'phpbb_ranks'
|
||||||
CREATE TABLE phpbb_ranks (
|
CREATE TABLE phpbb_ranks (
|
||||||
rank_id INTEGER NOT NULL,
|
rank_id INTEGER NOT NULL,
|
||||||
|
@ -344,6 +383,9 @@ CREATE TABLE phpbb_ratings (
|
||||||
rating INTEGER DEFAULT 0 NOT NULL
|
rating INTEGER DEFAULT 0 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX post_id ON phpbb_ratings (post_id);
|
||||||
|
CREATE INDEX user_id4 ON phpbb_ratings (user_id);
|
||||||
|
|
||||||
-- Table: 'phpbb_reports_reasons'
|
-- Table: 'phpbb_reports_reasons'
|
||||||
CREATE TABLE phpbb_reports_reasons (
|
CREATE TABLE phpbb_reports_reasons (
|
||||||
reason_id INTEGER NOT NULL,
|
reason_id INTEGER NOT NULL,
|
||||||
|
@ -373,6 +415,8 @@ CREATE TABLE phpbb_search_results (
|
||||||
PRIMARY KEY (search_id)
|
PRIMARY KEY (search_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX session_id ON phpbb_search_results (session_id);
|
||||||
|
|
||||||
-- Table: phpbb_search_wordlist
|
-- Table: phpbb_search_wordlist
|
||||||
CREATE TABLE phpbb_search_wordlist (
|
CREATE TABLE phpbb_search_wordlist (
|
||||||
word_id INTEGER NOT NULL,
|
word_id INTEGER NOT NULL,
|
||||||
|
@ -381,6 +425,8 @@ CREATE TABLE phpbb_search_wordlist (
|
||||||
PRIMARY KEY (word_id)
|
PRIMARY KEY (word_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX word_id ON phpbb_search_wordlist (word_id);
|
||||||
|
|
||||||
-- Table: phpbb_search_wordmatch
|
-- Table: phpbb_search_wordmatch
|
||||||
CREATE TABLE phpbb_search_wordmatch (
|
CREATE TABLE phpbb_search_wordmatch (
|
||||||
post_id INTEGER DEFAULT 0 NOT NULL,
|
post_id INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
@ -388,6 +434,8 @@ CREATE TABLE phpbb_search_wordmatch (
|
||||||
title_match INTEGER DEFAULT 0 NOT NULL
|
title_match INTEGER DEFAULT 0 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX word_id2 ON phpbb_search_wordmatch (word_id);
|
||||||
|
|
||||||
-- Table: 'phpbb_sessions'
|
-- Table: 'phpbb_sessions'
|
||||||
CREATE TABLE phpbb_sessions (
|
CREATE TABLE phpbb_sessions (
|
||||||
session_id VARCHAR(32) DEFAULT '' NOT NULL,
|
session_id VARCHAR(32) DEFAULT '' NOT NULL,
|
||||||
|
@ -402,6 +450,8 @@ CREATE TABLE phpbb_sessions (
|
||||||
PRIMARY KEY (session_id)
|
PRIMARY KEY (session_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX session_time ON phpbb_sessions (session_time);
|
||||||
|
|
||||||
-- Table: 'phpbb_smilies'
|
-- Table: 'phpbb_smilies'
|
||||||
CREATE TABLE phpbb_smilies (
|
CREATE TABLE phpbb_smilies (
|
||||||
smile_id INTEGER NOT NULL,
|
smile_id INTEGER NOT NULL,
|
||||||
|
@ -425,6 +475,10 @@ CREATE TABLE phpbb_styles (
|
||||||
PRIMARY KEY (style_id)
|
PRIMARY KEY (style_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX template_id ON phpbb_styles (template_id);
|
||||||
|
CREATE INDEX theme_id ON phpbb_styles (theme_id);
|
||||||
|
CREATE INDEX imageset_id ON phpbb_styles (imageset_id);
|
||||||
|
|
||||||
-- Table: 'phpbb_styles_template'
|
-- Table: 'phpbb_styles_template'
|
||||||
CREATE TABLE phpbb_styles_template (
|
CREATE TABLE phpbb_styles_template (
|
||||||
template_id INTEGER NOT NULL,
|
template_id INTEGER NOT NULL,
|
||||||
|
@ -545,6 +599,10 @@ CREATE TABLE phpbb_topics (
|
||||||
PRIMARY KEY (topic_id)
|
PRIMARY KEY (topic_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX forum_id5 ON phpbb_topics (forum_id);
|
||||||
|
CREATE INDEX forum_id_type ON phpbb_topics (forum_id, topic_type);
|
||||||
|
CREATE INDEX topic_last_post_time ON phpbb_topics (topic_last_post_time);
|
||||||
|
|
||||||
-- Table: 'phpbb_topic_marking'
|
-- Table: 'phpbb_topic_marking'
|
||||||
CREATE TABLE phpbb_topics_marking (
|
CREATE TABLE phpbb_topics_marking (
|
||||||
user_id INTEGER DEFAULT 0 NOT NULL,
|
user_id INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
@ -561,6 +619,10 @@ CREATE TABLE phpbb_topics_watch (
|
||||||
notify_status INTEGER DEFAULT 0 NOT NULL
|
notify_status INTEGER DEFAULT 0 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX topic_id6 ON phpbb_topics_watch (topic_id);
|
||||||
|
CREATE INDEX user_id5 ON phpbb_topics_watch (user_id);
|
||||||
|
CREATE INDEX notify_status2 ON phpbb_topics_watch (notify_status);
|
||||||
|
|
||||||
-- Table: 'phpbb_ucp_modules'
|
-- Table: 'phpbb_ucp_modules'
|
||||||
CREATE TABLE phpbb_ucp_modules (
|
CREATE TABLE phpbb_ucp_modules (
|
||||||
module_id INTEGER DEFAULT 0 NOT NULL,
|
module_id INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
@ -577,6 +639,9 @@ CREATE TABLE phpbb_user_group (
|
||||||
user_pending INTEGER
|
user_pending INTEGER
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX group_id2 ON phpbb_user_group (group_id);
|
||||||
|
CREATE INDEX user_id6 ON phpbb_user_group (user_id);
|
||||||
|
|
||||||
-- Table: 'phpbb_users'
|
-- Table: 'phpbb_users'
|
||||||
CREATE TABLE phpbb_users (
|
CREATE TABLE phpbb_users (
|
||||||
user_id INTEGER NOT NULL,
|
user_id INTEGER NOT NULL,
|
||||||
|
@ -650,6 +715,8 @@ CREATE TABLE phpbb_users (
|
||||||
PRIMARY KEY (user_id)
|
PRIMARY KEY (user_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE INDEX user_birthday ON phpbb_users (user_birthday);
|
||||||
|
|
||||||
-- Table: 'phpbb_words'
|
-- Table: 'phpbb_words'
|
||||||
CREATE TABLE phpbb_words (
|
CREATE TABLE phpbb_words (
|
||||||
word_id INTEGER NOT NULL,
|
word_id INTEGER NOT NULL,
|
||||||
|
|
|
@ -179,6 +179,9 @@ $lang += array(
|
||||||
'LOG_USERS_ADDED' => '<b>Added new leaders to usergroup</b> %s<br />» %s',
|
'LOG_USERS_ADDED' => '<b>Added new leaders to usergroup</b> %s<br />» %s',
|
||||||
'LOG_GROUP_DEFAULTS' => '<b>Group made default for members</b><br />» %s',
|
'LOG_GROUP_DEFAULTS' => '<b>Group made default for members</b><br />» %s',
|
||||||
'LOG_USERS_APPROVED' => '<b>Users approved in usergroup</b> %s<br />» %s',
|
'LOG_USERS_APPROVED' => '<b>Users approved in usergroup</b> %s<br />» %s',
|
||||||
|
'LOG_GROUP_DEMOTED' => '<b>Leaders demoted in usergroup</b> %s<br />» %s',
|
||||||
|
'LOG_GROUP_REMOVE' => '<b>Users removed from usergroup</b> %s<br />» %s',
|
||||||
|
'LOG_GROUP_DEMOTED' => '<b>Usergroup deleted</b><br />» %s',
|
||||||
|
|
||||||
'LOG_ADD_STYLE' => '<b>Added new style</b><br />» %s',
|
'LOG_ADD_STYLE' => '<b>Added new style</b><br />» %s',
|
||||||
'LOG_EDIT_STYLE' => '<b>Edited style</b><br />» %s',
|
'LOG_EDIT_STYLE' => '<b>Edited style</b><br />» %s',
|
||||||
|
@ -884,10 +887,10 @@ $lang += array(
|
||||||
'GROUP_LIST' => 'Current members',
|
'GROUP_LIST' => 'Current members',
|
||||||
'GROUP_LIST_EXPLAIN' => 'This is a complete list of all the current users with membership of this group. You can delete members (except in certain special groups) or add new ones as you see fit.',
|
'GROUP_LIST_EXPLAIN' => 'This is a complete list of all the current users with membership of this group. You can delete members (except in certain special groups) or add new ones as you see fit.',
|
||||||
'GROUP_MEMBERS' => 'Group members',
|
'GROUP_MEMBERS' => 'Group members',
|
||||||
'GROUP_MEMBERS_EXPLAIN' => 'This is a complete listing of all the members of this usergroup. It includes seperate sections for moderators, pending and existing members. From here you can manage all aspects of who has membership of this group and what their role is.',
|
'GROUP_MEMBERS_EXPLAIN' => 'This is a complete listing of all the members of this usergroup. It includes seperate sections for leaders, pending and existing members. From here you can manage all aspects of who has membership of this group and what their role is.',
|
||||||
'GROUP_MODERATORS' => 'Group Leaders',
|
'GROUP_MODERATORS' => 'Group Leaders',
|
||||||
'GROUP_MODS' => 'Group leaders',
|
'GROUP_MODS' => 'Group leaders',
|
||||||
'GROUP_MODS_EXPLAIN' => 'This is a list of users assigned group leader roles. Group leaders can add, approve and remove members of their group.',
|
'GROUP_MODS_EXPLAIN' => 'This is a list of users assigned group leader roles. Group leaders can add, approve and remove members of their group. If you wish to remove a user as a group leader but keep them within the group use demote instead of delete, delete will remove them from the group completely.',
|
||||||
'GROUP_PENDING' => 'Pending Users',
|
'GROUP_PENDING' => 'Pending Users',
|
||||||
'GROUP_PENDING_EXPLAIN' => 'These users have requested to join the group but have yet to be approved. You can approve or decline their request, or contact the user for further information.',
|
'GROUP_PENDING_EXPLAIN' => 'These users have requested to join the group but have yet to be approved. You can approve or decline their request, or contact the user for further information.',
|
||||||
'ADD_NEW_GROUP' => 'Create new group',
|
'ADD_NEW_GROUP' => 'Create new group',
|
||||||
|
|
|
@ -1,23 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
/***************************************************************************
|
// -------------------------------------------------------------
|
||||||
* lang_main.php [ English ]
|
//
|
||||||
* -------------------
|
// $Id$
|
||||||
* begin : Sat Dec 16 2000
|
//
|
||||||
* copyright : (C) 2001 The phpBB Group
|
// FILENAME : lang_main.php [ English ]
|
||||||
* email : support@phpbb.com
|
// STARTED : Sat Dec 16, 2000
|
||||||
*
|
// COPYRIGHT : © 2001, 2003 phpBB Group
|
||||||
* $Id$
|
// WWW : http://www.phpbb.com/
|
||||||
*
|
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
||||||
****************************************************************************/
|
//
|
||||||
|
// -------------------------------------------------------------
|
||||||
/***************************************************************************
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
// DEVELOPERS PLEASE NOTE
|
// DEVELOPERS PLEASE NOTE
|
||||||
//
|
//
|
||||||
|
@ -88,6 +80,7 @@ $lang = array(
|
||||||
'NEXT' => 'Next',
|
'NEXT' => 'Next',
|
||||||
'PREVIOUS' => 'Previous',
|
'PREVIOUS' => 'Previous',
|
||||||
'GOTO_PAGE' => 'Goto page',
|
'GOTO_PAGE' => 'Goto page',
|
||||||
|
'JUMP_PAGE' => 'Enter the page number you wish to goto',
|
||||||
'START_PAGE' => 'Make my start page',
|
'START_PAGE' => 'Make my start page',
|
||||||
'JOINED' => 'Joined',
|
'JOINED' => 'Joined',
|
||||||
'IP_ADDRESS' => 'IP Address',
|
'IP_ADDRESS' => 'IP Address',
|
||||||
|
@ -245,15 +238,14 @@ $lang = array(
|
||||||
'EMAIL_DISABLED' => 'Sorry but all email related functions have been disabled.',
|
'EMAIL_DISABLED' => 'Sorry but all email related functions have been disabled.',
|
||||||
'REMOVE_INSTALL' => 'Please delete, move or rename the install directory.',
|
'REMOVE_INSTALL' => 'Please delete, move or rename the install directory.',
|
||||||
|
|
||||||
'G_ADMINISTRATORS' => 'ADMINISTRATORS',
|
'G_ADMINISTRATORS' => 'Administrators',
|
||||||
'G_SUPER_MODERATORS'=> 'SUPER MODERATORS',
|
'G_SUPER_MODERATORS'=> 'Super Moderators',
|
||||||
'G_MODERATORS' => 'MODERATORS',
|
'G_REGISTERED' => 'Registered Users',
|
||||||
'G_REGISTERED' => 'REGISTERED USERS',
|
'G_REGISTERED_COPPA'=> 'Registered COPPA Users',
|
||||||
'G_REGISTERED_COPPA'=> 'REGISTERED COPPA USERS',
|
'G_INACTIVE' => 'Unapproved Users',
|
||||||
'G_INACTIVE' => 'INACTIVE USERS',
|
'G_INACTIVE_COPPA' => 'Unapproved COPPA Users',
|
||||||
'G_INACTIVE_COPPA' => 'INACTIVE COPPA USERS',
|
'G_GUESTS' => 'Guests',
|
||||||
'G_GUESTS' => 'GUESTS',
|
'G_BANNED' => 'Banned Users',
|
||||||
'G_BANNED' => 'BANNED USERS',
|
|
||||||
|
|
||||||
'NO_NEW_POSTS' => 'No new posts',
|
'NO_NEW_POSTS' => 'No new posts',
|
||||||
'NEW_POSTS' => 'New posts',
|
'NEW_POSTS' => 'New posts',
|
||||||
|
@ -435,9 +427,10 @@ $lang = array(
|
||||||
|
|
||||||
'VIEW_FORUM_TOPIC' => '1 Topic',
|
'VIEW_FORUM_TOPIC' => '1 Topic',
|
||||||
'VIEW_FORUM_TOPICS' => '%d Topics',
|
'VIEW_FORUM_TOPICS' => '%d Topics',
|
||||||
|
);
|
||||||
|
|
||||||
|
// viewtopic
|
||||||
// Viewtopic
|
$lang += array(
|
||||||
'VIEW_TOPIC' => 'View topic',
|
'VIEW_TOPIC' => 'View topic',
|
||||||
'LOGIN_VIEWTOPIC' => 'The board administrator requires you to be registered and logged in to view this topic.',
|
'LOGIN_VIEWTOPIC' => 'The board administrator requires you to be registered and logged in to view this topic.',
|
||||||
'PRINT_TOPIC' => 'Print View',
|
'PRINT_TOPIC' => 'Print View',
|
||||||
|
@ -515,8 +508,10 @@ $lang = array(
|
||||||
|
|
||||||
'VIEW_TOPIC_POST' => '1 Post',
|
'VIEW_TOPIC_POST' => '1 Post',
|
||||||
'VIEW_TOPIC_POSTS' => '%d Posts',
|
'VIEW_TOPIC_POSTS' => '%d Posts',
|
||||||
|
);
|
||||||
|
|
||||||
|
// posting
|
||||||
|
$lang += array(
|
||||||
'BBCODE_B_HELP' => 'Bold text: [b]text[/b] (alt+b)',
|
'BBCODE_B_HELP' => 'Bold text: [b]text[/b] (alt+b)',
|
||||||
'BBCODE_I_HELP' => 'Italic text: [i]text[/i] (alt+i)',
|
'BBCODE_I_HELP' => 'Italic text: [i]text[/i] (alt+i)',
|
||||||
'BBCODE_U_HELP' => 'Underline text: [u]text[/u] (alt+u)',
|
'BBCODE_U_HELP' => 'Underline text: [u]text[/u] (alt+u)',
|
||||||
|
@ -672,8 +667,10 @@ $lang = array(
|
||||||
'DOWNLOAD_NONE' => '0 Times', // replace %d with count
|
'DOWNLOAD_NONE' => '0 Times', // replace %d with count
|
||||||
'DOWNLOAD_COUNT' => '%d Time', // replace %d with count
|
'DOWNLOAD_COUNT' => '%d Time', // replace %d with count
|
||||||
'DOWNLOAD_COUNTS' => '%d Times', // replace %d with count
|
'DOWNLOAD_COUNTS' => '%d Times', // replace %d with count
|
||||||
|
);
|
||||||
|
|
||||||
|
// ucp
|
||||||
|
$lang += array(
|
||||||
'UCP' => 'User Control Panel',
|
'UCP' => 'User Control Panel',
|
||||||
'UCP_OPTIONS' => 'Options',
|
'UCP_OPTIONS' => 'Options',
|
||||||
|
|
||||||
|
@ -891,11 +888,10 @@ $lang = array(
|
||||||
|
|
||||||
|
|
||||||
'COPPA' => 'Your account has been created but has to be approved, please check your email for details.',
|
'COPPA' => 'Your account has been created but has to be approved, please check your email for details.',
|
||||||
|
);
|
||||||
|
|
||||||
|
// usercp_messaging
|
||||||
|
$lang += array(
|
||||||
|
|
||||||
|
|
||||||
'Private_Messaging' => 'Private Messaging',
|
'Private_Messaging' => 'Private Messaging',
|
||||||
'Unread_message' => 'Unread message',
|
'Unread_message' => 'Unread message',
|
||||||
'Read_message' => 'Read message',
|
'Read_message' => 'Read message',
|
||||||
|
@ -949,9 +945,10 @@ $lang = array(
|
||||||
'Sentbox_size' => 'Your Sentbox is %d%% full',
|
'Sentbox_size' => 'Your Sentbox is %d%% full',
|
||||||
'Savebox_size' => 'Your Savebox is %d%% full',
|
'Savebox_size' => 'Your Savebox is %d%% full',
|
||||||
'Click_view_privmsg' => 'Click %sHere%s to visit your Inbox',
|
'Click_view_privmsg' => 'Click %sHere%s to visit your Inbox',
|
||||||
|
);
|
||||||
|
|
||||||
|
// memberslist
|
||||||
|
$lang += array(
|
||||||
'FIND_USERNAME' => 'Find a member',
|
'FIND_USERNAME' => 'Find a member',
|
||||||
'FIND_USERNAME_EXPLAIN' => 'Use this form to search for specific members. You do not need to fill out all fields. To match partial data use * as a wildcard. When entering dates use the format yyyy-mm-dd, e.g. 2002-01-01. Use the mark checkboxes to select one or more usernames (several usernames may be accepted depending on the form itself). Alternatively you can mark the users required and click the Insert Marked button.',
|
'FIND_USERNAME_EXPLAIN' => 'Use this form to search for specific members. You do not need to fill out all fields. To match partial data use * as a wildcard. When entering dates use the format yyyy-mm-dd, e.g. 2002-01-01. Use the mark checkboxes to select one or more usernames (several usernames may be accepted depending on the form itself). Alternatively you can mark the users required and click the Insert Marked button.',
|
||||||
'NO_MEMBERS' => 'No members found for this search criteria',
|
'NO_MEMBERS' => 'No members found for this search criteria',
|
||||||
|
@ -1030,8 +1027,10 @@ $lang = array(
|
||||||
'IM_NO_JABBER' => 'Sorry, direct messaging of Jabber users is not supported on this server. You will need a Jabber client installed on your system to contact the recipient above.',
|
'IM_NO_JABBER' => 'Sorry, direct messaging of Jabber users is not supported on this server. You will need a Jabber client installed on your system to contact the recipient above.',
|
||||||
'IM_SENT_JABBER' => 'Your message to %1$s has been sent successfully.',
|
'IM_SENT_JABBER' => 'Your message to %1$s has been sent successfully.',
|
||||||
'IM_JABBER_SUBJECT' => 'Message from user %1$s at %2$s', // This needs to be part of a contact template
|
'IM_JABBER_SUBJECT' => 'Message from user %1$s at %2$s', // This needs to be part of a contact template
|
||||||
|
);
|
||||||
|
|
||||||
|
// gcp
|
||||||
|
$lang += array(
|
||||||
'Group_Control_Panel' => 'Group Control Panel',
|
'Group_Control_Panel' => 'Group Control Panel',
|
||||||
'Group_member_details' => 'Group Membership Details',
|
'Group_member_details' => 'Group Membership Details',
|
||||||
'Group_member_join' => 'Join a Group',
|
'Group_member_join' => 'Join a Group',
|
||||||
|
@ -1084,8 +1083,10 @@ $lang = array(
|
||||||
'Subscribe' => 'Subscribe',
|
'Subscribe' => 'Subscribe',
|
||||||
'Unsubscribe' => 'Unsubscribe',
|
'Unsubscribe' => 'Unsubscribe',
|
||||||
'View_Information' => 'View Information',
|
'View_Information' => 'View Information',
|
||||||
|
);
|
||||||
|
|
||||||
|
// search
|
||||||
|
$lang += array(
|
||||||
'Search_query' => 'Search Query',
|
'Search_query' => 'Search Query',
|
||||||
'Search_options' => 'Search Options',
|
'Search_options' => 'Search Options',
|
||||||
'Search_keywords' => 'Search for Keywords',
|
'Search_keywords' => 'Search for Keywords',
|
||||||
|
@ -1121,14 +1122,18 @@ $lang = array(
|
||||||
'Not_Authorised' => 'Not Authorised',
|
'Not_Authorised' => 'Not Authorised',
|
||||||
|
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
// viewonline
|
||||||
|
$lang += array(
|
||||||
'REG_USERS_ZERO_ONLINE' => 'There are 0 Registered users and ',
|
'REG_USERS_ZERO_ONLINE' => 'There are 0 Registered users and ',
|
||||||
'REG_USERS_ONLINE' => 'There are %d Registered users and ',
|
'REG_USERS_ONLINE' => 'There are %d Registered users and ',
|
||||||
'REG_USER_ONLINE' => 'There is %d Registered user and ',
|
'REG_USER_ONLINE' => 'There is %d Registered user and ',
|
||||||
'HIDDEN_USERS_ZERO_ONLINE'=> '0 Hidden users online',
|
'HIDDEN_USERS_ZERO_ONLINE' => '0 Hidden users online',
|
||||||
'HIDDEN_USERS_ONLINE' => '%d Hidden users online',
|
'HIDDEN_USERS_ONLINE' => '%d Hidden users online',
|
||||||
'HIDDEN_USER_ONLINE' => '%d Hidden user online',
|
'HIDDEN_USER_ONLINE' => '%d Hidden user online',
|
||||||
'GUEST_USERS_ONLINE' => 'There are %d Guest users online',
|
'GUEST_USERS_ONLINE' => 'There are %d Guest users online',
|
||||||
'GUEST_USERS_ZERO_ONLINE'=> 'There are 0 Guest users online',
|
'GUEST_USERS_ZERO_ONLINE' => 'There are 0 Guest users online',
|
||||||
'GUEST_USER_ONLINE' => 'There is %d Guest user online',
|
'GUEST_USER_ONLINE' => 'There is %d Guest user online',
|
||||||
|
|
||||||
'VIEW_ONLINE_TIME' => 'This data is based on users active over the past %d minute', // 1 minute
|
'VIEW_ONLINE_TIME' => 'This data is based on users active over the past %d minute', // 1 minute
|
||||||
|
@ -1146,8 +1151,10 @@ $lang = array(
|
||||||
'VIEWING_MEMBERS' => 'Viewing member details',
|
'VIEWING_MEMBERS' => 'Viewing member details',
|
||||||
'VIEWING_MESSAGES' => 'Viewing Private Messages',
|
'VIEWING_MESSAGES' => 'Viewing Private Messages',
|
||||||
'VIEWING_FAQ' => 'Viewing FAQ',
|
'VIEWING_FAQ' => 'Viewing FAQ',
|
||||||
|
);
|
||||||
|
|
||||||
|
// mcp
|
||||||
|
$lang += array(
|
||||||
'FRONT_PAGE' => 'Front page',
|
'FRONT_PAGE' => 'Front page',
|
||||||
'REPORTED_POSTS' => 'Reported posts',
|
'REPORTED_POSTS' => 'Reported posts',
|
||||||
'VIEW_FORUM' => 'View forum',
|
'VIEW_FORUM' => 'View forum',
|
||||||
|
@ -1300,16 +1307,18 @@ $lang = array(
|
||||||
'logm_delete_posts' => '<b>Deleted posts</b> %s',
|
'logm_delete_posts' => '<b>Deleted posts</b> %s',
|
||||||
'logm_approve_topic' => '<b>Approved topic</b>',
|
'logm_approve_topic' => '<b>Approved topic</b>',
|
||||||
'logm_approve_post' => '<b>Approved post</b> %s',
|
'logm_approve_post' => '<b>Approved post</b> %s',
|
||||||
'logm_unapprove_topic'=> '<b>Unapproved topic</b>',
|
'logm_unapprove_topic' => '<b>Unapproved topic</b>',
|
||||||
'logm_unapprove_post' => '<b>Unapproved post</b> %s',
|
'logm_unapprove_post' => '<b>Unapproved post</b> %s',
|
||||||
'logm_merge' => '<b>Merged posts</b> from topic %s',
|
'logm_merge' => '<b>Merged posts</b> from topic %s',
|
||||||
'logm_make_announce' => '<b>Changed topic type</b> to Announcement',
|
'logm_make_announce' => '<b>Changed topic type</b> to Announcement',
|
||||||
'logm_make_sticky' => '<b>Changed topic type</b> to Sticky',
|
'logm_make_sticky' => '<b>Changed topic type</b> to Sticky',
|
||||||
'logm_make_normal' => '<b>Changed topic type</b> to Normal',
|
'logm_make_normal' => '<b>Changed topic type</b> to Normal',
|
||||||
'logm_make_global' => '<b>Changed topic type</b> to Global Announcement',
|
'logm_make_global' => '<b>Changed topic type</b> to Global Announcement',
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
//----- post reporting
|
// report
|
||||||
|
$lang += array(
|
||||||
'REASON' => 'Reason',
|
'REASON' => 'Reason',
|
||||||
'MORE_INFO' => 'Further information',
|
'MORE_INFO' => 'Further information',
|
||||||
'CAN_LEAVE_BLANK' => 'This can be left blank.',
|
'CAN_LEAVE_BLANK' => 'This can be left blank.',
|
||||||
|
@ -1340,4 +1349,5 @@ $lang = array(
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -33,7 +33,6 @@ include($phpbb_root_path . 'common.'.$phpEx);
|
||||||
// Start session management
|
// Start session management
|
||||||
$user->start();
|
$user->start();
|
||||||
$auth->acl($user->data);
|
$auth->acl($user->data);
|
||||||
|
|
||||||
$user->setup();
|
$user->setup();
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,7 +63,7 @@ switch ($mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$start = (isset($_GET['start'])) ? intval($_GET['start']) : 0;
|
$start = (isset($_GET['start'])) ? intval($_GET['start']) : ((isset($_GET['page'])) ? (intval($_GET['page']) - 1) * $config['topics_per_page'] : 0);
|
||||||
$form = (!empty($_GET['form'])) ? htmlspecialchars($_GET['form']) : 0;
|
$form = (!empty($_GET['form'])) ? htmlspecialchars($_GET['form']) : 0;
|
||||||
$field = (isset($_GET['field'])) ? htmlspecialchars($_GET['field']) : 'username';
|
$field = (isset($_GET['field'])) ? htmlspecialchars($_GET['field']) : 'username';
|
||||||
|
|
||||||
|
@ -205,6 +204,8 @@ switch ($mode)
|
||||||
set_config('jab_password', $jabber->password);
|
set_config('jab_password', $jabber->password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$jabber->SendPresence();
|
||||||
|
|
||||||
// This _really_ needs to be an "email" template I think ... indeed the whole system is probably
|
// This _really_ needs to be an "email" template I think ... indeed the whole system is probably
|
||||||
// best suited "merged" with email in some way. Would enable notifications, etc. to be sent via
|
// best suited "merged" with email in some way. Would enable notifications, etc. to be sent via
|
||||||
// Jabber more easily too I think
|
// Jabber more easily too I think
|
||||||
|
|
|
@ -30,6 +30,7 @@ Search within this search set
|
||||||
Search on topic/post title only
|
Search on topic/post title only
|
||||||
Relevancy?
|
Relevancy?
|
||||||
Stemmers?
|
Stemmers?
|
||||||
|
Find similar?
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,16 @@ function im_popup(url, width, height)
|
||||||
window.open(url, '_contact', 'HEIGHT=' + height + ',resizable=yes,scrollbars=yes, WIDTH=' + width);
|
window.open(url, '_contact', 'HEIGHT=' + height + ',resizable=yes,scrollbars=yes, WIDTH=' + width);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function goto()
|
||||||
|
{
|
||||||
|
var page = prompt('{L_JUMP_PAGE}:', '{ON_PAGE}');
|
||||||
|
|
||||||
|
if (page !== null && !isNaN(page) && page > 0)
|
||||||
|
{
|
||||||
|
document.location.href = "{BASE_URL}&start=" + ((page * {PER_PAGE}) - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
<table width="95%" cellspacing="2" cellpadding="2" border="0" align="center">
|
<table width="95%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||||
<tr>
|
<tr>
|
||||||
<td><a class="titles" href="{U_VIEW_FORUM}" title="{FORUM_DESC}">{FORUM_NAME}</a><!-- IF S_IS_POSTABLE --><!-- IF MODERATORS neq ''--><br /><b class="gensmall">{L_MODERATORS}: {MODERATORS}</b><!-- ENDIF --><!-- ENDIF --></td>
|
<td><a class="titles" href="{U_VIEW_FORUM}" title="{FORUM_DESC}">{FORUM_NAME}</a><!-- IF S_IS_POSTABLE --><!-- IF MODERATORS --><br /><b class="gensmall">{L_MODERATORS}: {MODERATORS}</b><!-- ENDIF --><!-- ENDIF --></td>
|
||||||
<td class="gensmall" align="right" valign="bottom"><!-- IF S_IS_POSTABLE -->{MOD_CP}<!-- ENDIF --></td>
|
<td class="gensmall" align="right" valign="bottom"><!-- IF S_IS_POSTABLE -->{MOD_CP}<!-- ENDIF --></td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- IF PAGE_NUMBER neq '' -->
|
<!-- IF TOTAL_TOPICS -->
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><table width="100%" cellspacing="0" border="0">
|
<td colspan="2"><table width="100%" cellspacing="0" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -1,27 +1,19 @@
|
||||||
<?php
|
<?php
|
||||||
/***************************************************************************
|
// -------------------------------------------------------------
|
||||||
* viewforum.php
|
//
|
||||||
* -------------------
|
// $Id$
|
||||||
* begin : Saturday, Feb 13, 2001
|
//
|
||||||
* copyright : (C) 2001 The phpBB Group
|
// FILENAME : viewforum.php
|
||||||
* email : support@phpbb.com
|
// STARTED : Sat Feb 13, 2001
|
||||||
*
|
// COPYRIGHT : © 2001, 2003 phpBB Group
|
||||||
* $Id$
|
// WWW : http://www.phpbb.com/
|
||||||
*
|
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
||||||
***************************************************************************/
|
//
|
||||||
|
// -------------------------------------------------------------
|
||||||
/***************************************************************************
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
define('IN_PHPBB', true);
|
define('IN_PHPBB', true);
|
||||||
$phpbb_root_path = './';
|
$phpbb_root_path = './';
|
||||||
include($phpbb_root_path . 'extension.inc');
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||||
include($phpbb_root_path . 'common.'.$phpEx);
|
include($phpbb_root_path . 'common.'.$phpEx);
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,8 +24,8 @@ $auth->acl($user->data);
|
||||||
|
|
||||||
// Start initial var setup
|
// Start initial var setup
|
||||||
$forum_id = (isset($_REQUEST['f'])) ? max(intval($_REQUEST['f']), 0) : 0;
|
$forum_id = (isset($_REQUEST['f'])) ? max(intval($_REQUEST['f']), 0) : 0;
|
||||||
$start = (isset($_GET['start'])) ? max(intval($_GET['start']), 0) : 0;
|
|
||||||
$mark_read = (!empty($_GET['mark'])) ? htmlspecialchars($_GET['mark']) : '';
|
$mark_read = (!empty($_GET['mark'])) ? htmlspecialchars($_GET['mark']) : '';
|
||||||
|
$start = 0;
|
||||||
|
|
||||||
$sort_days = (isset($_REQUEST['st'])) ? max(intval($_REQUEST['st']), 0) : ((!empty($user->data['user_show_days'])) ? $user->data['user_show_days'] : 0);
|
$sort_days = (isset($_REQUEST['st'])) ? max(intval($_REQUEST['st']), 0) : ((!empty($user->data['user_show_days'])) ? $user->data['user_show_days'] : 0);
|
||||||
$sort_key = (!empty($_REQUEST['sk'])) ? htmlspecialchars($_REQUEST['sk']) : ((!empty($user->data['user_sortby_type'])) ? $user->data['user_sortby_type'] : 't');
|
$sort_key = (!empty($_REQUEST['sk'])) ? htmlspecialchars($_REQUEST['sk']) : ((!empty($user->data['user_sortby_type'])) ? $user->data['user_sortby_type'] : 't');
|
||||||
|
@ -154,9 +146,8 @@ if ($forum_data['left_id'] != $forum_data['right_id'] - 1)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$template->assign_var('S_HAS_SUBFORUM', FALSE);
|
$template->assign_var('S_HAS_SUBFORUM', FALSE);
|
||||||
get_moderators($moderators, $forum_id);
|
|
||||||
}
|
}
|
||||||
|
get_moderators($moderators, $forum_id);
|
||||||
|
|
||||||
// Output forum listing if it is postable
|
// Output forum listing if it is postable
|
||||||
if ($forum_data['forum_type'] == FORUM_POST)
|
if ($forum_data['forum_type'] == FORUM_POST)
|
||||||
|
@ -175,15 +166,21 @@ if ($forum_data['forum_type'] == FORUM_POST)
|
||||||
trigger_error($message);
|
trigger_error($message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Is a forum specific topic count required?
|
||||||
|
if ($forum_data['forum_topics_per_page'])
|
||||||
|
{
|
||||||
|
$config['topics_per_page'] = $forum_data['forum_topics_per_page'];
|
||||||
|
}
|
||||||
|
|
||||||
// Do the forum Prune - cron type job ...
|
$start = (isset($_GET['start'])) ? max(intval($_GET['start']), 0) : 0;
|
||||||
|
|
||||||
|
// Do the forum Prune thang - cron type job ...
|
||||||
if ($forum_data['prune_next'] < time() && $forum_data['enable_prune'])
|
if ($forum_data['prune_next'] < time() && $forum_data['enable_prune'])
|
||||||
{
|
{
|
||||||
include_once($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
|
include_once($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
|
||||||
auto_prune($forum_id, $forum_data['forum_flags'], $forum_data['prune_days'], $forum_data['prune_freq']);
|
auto_prune($forum_id, $forum_data['forum_flags'], $forum_data['prune_days'], $forum_data['prune_freq']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Forum rules, subscription info and word censors
|
// Forum rules, subscription info and word censors
|
||||||
$s_watching_forum = $s_watching_forum_img = '';
|
$s_watching_forum = $s_watching_forum_img = '';
|
||||||
|
|
||||||
|
@ -199,7 +196,6 @@ if ($forum_data['forum_type'] == FORUM_POST)
|
||||||
$censors = array();
|
$censors = array();
|
||||||
obtain_word_list($censors);
|
obtain_word_list($censors);
|
||||||
|
|
||||||
|
|
||||||
// Topic ordering options
|
// Topic ordering options
|
||||||
$limit_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 364 => $user->lang['1_YEAR']);
|
$limit_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 364 => $user->lang['1_YEAR']);
|
||||||
|
|
||||||
|
@ -246,14 +242,6 @@ if ($forum_data['forum_type'] == FORUM_POST)
|
||||||
// Select the sort order
|
// Select the sort order
|
||||||
$sql_sort_order = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
|
$sql_sort_order = $sort_by_sql[$sort_key] . ' ' . (($sort_dir == 'd') ? 'DESC' : 'ASC');
|
||||||
|
|
||||||
|
|
||||||
// Is a forum specific topic count required?
|
|
||||||
if ($forum_data['forum_topics_per_page'])
|
|
||||||
{
|
|
||||||
$config['topics_per_page'] = $forum_data['forum_topics_per_page'];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Basic pagewide vars
|
// Basic pagewide vars
|
||||||
$post_alt = ($forum_data['forum_status'] == ITEM_LOCKED) ? $user->lang['FORUM_LOCKED'] : $user->lang['POST_NEW_TOPIC'];
|
$post_alt = ($forum_data['forum_status'] == ITEM_LOCKED) ? $user->lang['FORUM_LOCKED'] : $user->lang['POST_NEW_TOPIC'];
|
||||||
|
|
||||||
|
@ -377,11 +365,9 @@ if ($forum_data['forum_type'] == FORUM_POST)
|
||||||
$mark_time_topic = (isset($tracking_topics[$forum_id36][$topic_id36])) ? base_convert($tracking_topics[$forum_id36][$topic_id36], 36, 10) + $config['board_startdate'] : 0;
|
$mark_time_topic = (isset($tracking_topics[$forum_id36][$topic_id36])) ? base_convert($tracking_topics[$forum_id36][$topic_id36], 36, 10) + $config['board_startdate'] : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Replies
|
// Replies
|
||||||
$replies = ($auth->acl_get('m_approve')) ? $row['topic_replies_real'] : $row['topic_replies'];
|
$replies = ($auth->acl_get('m_approve')) ? $row['topic_replies_real'] : $row['topic_replies'];
|
||||||
|
|
||||||
|
|
||||||
// Topic type/folder
|
// Topic type/folder
|
||||||
$topic_type = '';
|
$topic_type = '';
|
||||||
if ($row['topic_status'] == ITEM_MOVED)
|
if ($row['topic_status'] == ITEM_MOVED)
|
||||||
|
@ -431,8 +417,6 @@ if ($forum_data['forum_type'] == FORUM_POST)
|
||||||
$folder_new = 'folder_locked_new';
|
$folder_new = 'folder_locked_new';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($user->data['user_id'] != ANONYMOUS)
|
if ($user->data['user_id'] != ANONYMOUS)
|
||||||
{
|
{
|
||||||
$unread_topic = true;
|
$unread_topic = true;
|
||||||
|
@ -450,7 +434,6 @@ if ($forum_data['forum_type'] == FORUM_POST)
|
||||||
$folder_img = ($unread_topic) ? $folder_new : $folder;
|
$folder_img = ($unread_topic) ? $folder_new : $folder;
|
||||||
$folder_alt = ($unread_topic) ? 'NEW_POSTS' : (($row['topic_status'] == ITEM_LOCKED) ? 'TOPIC_LOCKED' : 'NO_NEW_POSTS');
|
$folder_alt = ($unread_topic) ? 'NEW_POSTS' : (($row['topic_status'] == ITEM_LOCKED) ? 'TOPIC_LOCKED' : 'NO_NEW_POSTS');
|
||||||
|
|
||||||
|
|
||||||
// Posted image?
|
// Posted image?
|
||||||
if (!empty($row['mark_type']))
|
if (!empty($row['mark_type']))
|
||||||
{
|
{
|
||||||
|
@ -458,13 +441,11 @@ if ($forum_data['forum_type'] == FORUM_POST)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!empty($row['poll_start']))
|
if (!empty($row['poll_start']))
|
||||||
{
|
{
|
||||||
$topic_type .= $user->lang['VIEW_TOPIC_POLL'];
|
$topic_type .= $user->lang['VIEW_TOPIC_POLL'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Goto message generation
|
// Goto message generation
|
||||||
if (($replies + 1) > $config['posts_per_page'])
|
if (($replies + 1) > $config['posts_per_page'])
|
||||||
{
|
{
|
||||||
|
@ -494,7 +475,6 @@ if ($forum_data['forum_type'] == FORUM_POST)
|
||||||
$goto_page = '';
|
$goto_page = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Generate all the URIs ...
|
// Generate all the URIs ...
|
||||||
$view_topic_url = "viewtopic.$phpEx$SID&f=$forum_id&t=$topic_id";
|
$view_topic_url = "viewtopic.$phpEx$SID&f=$forum_id&t=$topic_id";
|
||||||
|
|
||||||
|
@ -506,7 +486,6 @@ if ($forum_data['forum_type'] == FORUM_POST)
|
||||||
|
|
||||||
$last_post_author = ($row['topic_last_poster_id'] == ANONYMOUS) ? (($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] . ' ' : $user->lang['GUEST'] . ' ') : "<a href=\"memberlist.$phpEx$SID&mode=viewprofile&u=" . $row['topic_last_poster_id'] . '">' . $row['topic_last_poster_name'] . '</a>';
|
$last_post_author = ($row['topic_last_poster_id'] == ANONYMOUS) ? (($row['topic_last_poster_name'] != '') ? $row['topic_last_poster_name'] . ' ' : $user->lang['GUEST'] . ' ') : "<a href=\"memberlist.$phpEx$SID&mode=viewprofile&u=" . $row['topic_last_poster_id'] . '">' . $row['topic_last_poster_name'] . '</a>';
|
||||||
|
|
||||||
|
|
||||||
// This will allow the style designer to output a different header
|
// This will allow the style designer to output a different header
|
||||||
// or even seperate the list of announcements from sticky and normal
|
// or even seperate the list of announcements from sticky and normal
|
||||||
// topics
|
// topics
|
||||||
|
@ -548,7 +527,6 @@ if ($forum_data['forum_type'] == FORUM_POST)
|
||||||
$s_type_switch = ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) ? 1 : 0;
|
$s_type_switch = ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) ? 1 : 0;
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
|
|
||||||
if ($config['load_db_lastread'])
|
if ($config['load_db_lastread'])
|
||||||
{
|
{
|
||||||
if ((isset($row['mark_time']) && $row['topic_last_post_time'] > $row['mark_time']) || (empty($row['mark_time']) && $row['topic_last_post_time'] > $forum_data['mark_time']))
|
if ((isset($row['mark_time']) && $row['topic_last_post_time'] > $row['mark_time']) || (empty($row['mark_time']) && $row['topic_last_post_time'] > $forum_data['mark_time']))
|
||||||
|
|
|
@ -1,38 +1,28 @@
|
||||||
<?php
|
<?php
|
||||||
/***************************************************************************
|
// -------------------------------------------------------------
|
||||||
* viewonline.php
|
//
|
||||||
* -------------------
|
// $Id$
|
||||||
* begin : Saturday, Feb 13, 2001
|
//
|
||||||
* copyright : (C) 2001 The phpBB Group
|
// FILENAME : viewonline.php
|
||||||
* email : support@phpbb.com
|
// STARTED : Sat Dec 16, 2000
|
||||||
*
|
// COPYRIGHT : © 2001, 2003 phpBB Group
|
||||||
* $Id$
|
// WWW : http://www.phpbb.com/
|
||||||
*
|
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
||||||
***************************************************************************/
|
//
|
||||||
|
// -------------------------------------------------------------
|
||||||
/***************************************************************************
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
***************************************************************************/
|
|
||||||
|
|
||||||
define('IN_PHPBB', true);
|
define('IN_PHPBB', true);
|
||||||
$phpbb_root_path = './';
|
$phpbb_root_path = './';
|
||||||
include($phpbb_root_path . 'extension.inc');
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||||
include($phpbb_root_path . 'common.'.$phpEx);
|
include($phpbb_root_path . 'common.'.$phpEx);
|
||||||
|
|
||||||
|
|
||||||
// Start session management
|
// Start session management
|
||||||
$user->start();
|
$user->start();
|
||||||
$auth->acl($user->data);
|
$auth->acl($user->data);
|
||||||
$user->setup();
|
$user->setup();
|
||||||
|
|
||||||
|
|
||||||
// Get and set some variables
|
// Get and set some variables
|
||||||
$start = (isset($_GET['start'])) ? intval($_GET['start']) : ((isset($_GET['page'])) ? (intval($_GET['page']) - 1) * $config['topics_per_page'] : 0);
|
$start = (isset($_GET['start'])) ? intval($_GET['start']) : 0;
|
||||||
|
|
||||||
$sort_key = (!empty($_REQUEST['sk'])) ? htmlspecialchars($_REQUEST['sk']) : 'b';
|
$sort_key = (!empty($_REQUEST['sk'])) ? htmlspecialchars($_REQUEST['sk']) : 'b';
|
||||||
$sort_dir = (!empty($_REQUEST['sd'])) ? htmlspecialchars($_REQUEST['sd']) : 'd';
|
$sort_dir = (!empty($_REQUEST['sd'])) ? htmlspecialchars($_REQUEST['sd']) : 'd';
|
||||||
|
@ -45,9 +35,10 @@ $order_by = $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DES
|
||||||
|
|
||||||
|
|
||||||
// Forum info
|
// Forum info
|
||||||
$sql = 'SELECT forum_id, forum_name
|
$sql = 'SELECT forum_id, forum_name, parent_id, forum_type, left_id, right_id
|
||||||
FROM ' . FORUMS_TABLE;
|
FROM ' . FORUMS_TABLE . '
|
||||||
$result = $db->sql_query($sql);
|
ORDER BY left_id ASC';
|
||||||
|
$result = $db->sql_query($sql, 600);
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
|
@ -64,17 +55,13 @@ $sql = 'SELECT u.user_id, u.username, u.user_allow_viewonline, u.user_colour, s.
|
||||||
ORDER BY ' . $order_by;
|
ORDER BY ' . $order_by;
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
$prev_ip = '';
|
$prev_ip = $prev_id = array();
|
||||||
$logged_visible_online = $logged_hidden_online = $guests_online = $reg_counter = $guest_counter = $prev_user = 0;
|
$logged_visible_online = $logged_hidden_online = $guests_online = $reg_counter = $guest_counter = 0;
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
$view_online = false;
|
$view_online = false;
|
||||||
|
|
||||||
if ($row['user_id'] != ANONYMOUS)
|
if ($row['user_id'] != ANONYMOUS && !in_array($row['user_id'], $prev_id))
|
||||||
{
|
|
||||||
$user_id = $row['user_id'];
|
|
||||||
|
|
||||||
if ($user_id != $prev_user)
|
|
||||||
{
|
{
|
||||||
$username = $row['username'];
|
$username = $row['username'];
|
||||||
|
|
||||||
|
@ -98,12 +85,9 @@ while ($row = $db->sql_fetchrow($result))
|
||||||
|
|
||||||
$which_counter = 'reg_counter';
|
$which_counter = 'reg_counter';
|
||||||
$which_row = 'reg_user_row';
|
$which_row = 'reg_user_row';
|
||||||
$prev_user = $user_id;
|
$prev_id[] = $row['user_id'];
|
||||||
}
|
}
|
||||||
}
|
else if (!in_array($row['session_ip'], $prev_ip))
|
||||||
else
|
|
||||||
{
|
|
||||||
if ($row['session_ip'] != $prev_ip)
|
|
||||||
{
|
{
|
||||||
$username = $user->lang['GUEST'];
|
$username = $user->lang['GUEST'];
|
||||||
$view_online = true;
|
$view_online = true;
|
||||||
|
@ -112,9 +96,8 @@ while ($row = $db->sql_fetchrow($result))
|
||||||
$which_counter = 'guest_counter';
|
$which_counter = 'guest_counter';
|
||||||
$which_row = 'guest_user_row';
|
$which_row = 'guest_user_row';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$prev_ip = $row['session_ip'];
|
$prev_ip[] = $row['session_ip'];
|
||||||
|
|
||||||
if ($view_online)
|
if ($view_online)
|
||||||
{
|
{
|
||||||
|
@ -205,7 +188,7 @@ while ($row = $db->sql_fetchrow($result))
|
||||||
|
|
||||||
'S_ROW_COUNT' => $$which_counter,
|
'S_ROW_COUNT' => $$which_counter,
|
||||||
|
|
||||||
'U_USER_PROFILE' => "memberlist.$phpEx$SID&mode=viewprofile&u=$user_id",
|
'U_USER_PROFILE' => "memberlist.$phpEx$SID&mode=viewprofile&u=" . $row['user_id'],
|
||||||
'U_FORUM_LOCATION' => $location_url)
|
'U_FORUM_LOCATION' => $location_url)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -213,6 +196,8 @@ while ($row = $db->sql_fetchrow($result))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
unset($prev_id);
|
||||||
|
unset($prev_ip);
|
||||||
|
|
||||||
|
|
||||||
// Generate reg/hidden/guest online text
|
// Generate reg/hidden/guest online text
|
||||||
|
@ -243,8 +228,8 @@ unset($vars_online);
|
||||||
|
|
||||||
|
|
||||||
// Grab group details for legend display
|
// Grab group details for legend display
|
||||||
$sql = "SELECT group_name, group_colour, group_type
|
$sql = 'SELECT group_name, group_colour, group_type
|
||||||
FROM " . GROUPS_TABLE . "
|
FROM ' . GROUPS_TABLE . "
|
||||||
WHERE group_colour <> ''
|
WHERE group_colour <> ''
|
||||||
AND group_type <> " . GROUP_HIDDEN;
|
AND group_type <> " . GROUP_HIDDEN;
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
@ -269,7 +254,6 @@ $template->assign_vars(array(
|
||||||
'U_SORT_LOCATION' => "viewonline.$phpEx$SID&sk=c&sd=" . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'))
|
'U_SORT_LOCATION' => "viewonline.$phpEx$SID&sk=c&sd=" . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Output the page
|
// Output the page
|
||||||
page_header($user->lang['WHO_IS_ONLINE']);
|
page_header($user->lang['WHO_IS_ONLINE']);
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
define('IN_PHPBB', true);
|
define('IN_PHPBB', true);
|
||||||
$phpbb_root_path = './';
|
$phpbb_root_path = './';
|
||||||
include($phpbb_root_path . 'extension.inc');
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||||
include($phpbb_root_path . 'common.'.$phpEx);
|
include($phpbb_root_path . 'common.'.$phpEx);
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,6 +35,8 @@ $forum_id = (isset($_GET['f'])) ? max(intval($_GET['f']), 0) : 0;
|
||||||
$topic_id = (isset($_GET['t'])) ? max(intval($_GET['t']), 0) : 0;
|
$topic_id = (isset($_GET['t'])) ? max(intval($_GET['t']), 0) : 0;
|
||||||
$post_id = (isset($_GET['p'])) ? max(intval($_GET['p']), 0) : 0;
|
$post_id = (isset($_GET['p'])) ? max(intval($_GET['p']), 0) : 0;
|
||||||
$start = (isset($_GET['start'])) ? max(intval($_GET['start']), 0) : 0;
|
$start = (isset($_GET['start'])) ? max(intval($_GET['start']), 0) : 0;
|
||||||
|
$view = (isset($_GET['view'])) ? htmlspecialchars($_GET['view']) : '';
|
||||||
|
|
||||||
|
|
||||||
$sort_days = (!empty($_REQUEST['st'])) ? max(intval($_REQUEST['st']), 0) : 0;
|
$sort_days = (!empty($_REQUEST['st'])) ? max(intval($_REQUEST['st']), 0) : 0;
|
||||||
$sort_key = (!empty($_REQUEST['sk'])) ? htmlspecialchars($_REQUEST['sk']) : 't';
|
$sort_key = (!empty($_REQUEST['sk'])) ? htmlspecialchars($_REQUEST['sk']) : 't';
|
||||||
|
@ -51,9 +53,9 @@ $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? unseri
|
||||||
|
|
||||||
// Find topic id if user requested a newer or older topic
|
// Find topic id if user requested a newer or older topic
|
||||||
$unread_post_id = '';
|
$unread_post_id = '';
|
||||||
if (isset($_GET['view']) && !$post_id)
|
if ($view && !$post_id)
|
||||||
{
|
{
|
||||||
if ($_GET['view'] == 'unread')
|
if ($view == 'unread')
|
||||||
{
|
{
|
||||||
if ($user->data['user_id'] != ANONYMOUS)
|
if ($user->data['user_id'] != ANONYMOUS)
|
||||||
{
|
{
|
||||||
|
@ -101,10 +103,10 @@ if (isset($_GET['view']) && !$post_id)
|
||||||
$unread_post_id = $post_id = $row['post_id'];
|
$unread_post_id = $post_id = $row['post_id'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ($_GET['view'] == 'next' || $_GET['view'] == 'previous')
|
else if ($view == 'next' || $view == 'previous')
|
||||||
{
|
{
|
||||||
$sql_condition = ($_GET['view'] == 'next') ? '>' : '<';
|
$sql_condition = ($view == 'next') ? '>' : '<';
|
||||||
$sql_ordering = ($_GET['view'] == 'next') ? 'ASC' : 'DESC';
|
$sql_ordering = ($view == 'next') ? 'ASC' : 'DESC';
|
||||||
|
|
||||||
$sql = 'SELECT t.topic_id
|
$sql = 'SELECT t.topic_id
|
||||||
FROM ' . TOPICS_TABLE . ' t, ' . TOPICS_TABLE . " t2
|
FROM ' . TOPICS_TABLE . ' t, ' . TOPICS_TABLE . " t2
|
||||||
|
@ -117,7 +119,7 @@ if (isset($_GET['view']) && !$post_id)
|
||||||
|
|
||||||
if (!($row = $db->sql_fetchrow($result)))
|
if (!($row = $db->sql_fetchrow($result)))
|
||||||
{
|
{
|
||||||
$message = ($_GET['view'] == 'next') ? 'NO_NEWER_TOPICS' : 'NO_OLDER_TOPICS';
|
$message = ($view == 'next') ? 'NO_NEWER_TOPICS' : 'NO_OLDER_TOPICS';
|
||||||
trigger_error($message);
|
trigger_error($message);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -217,7 +219,7 @@ if ($forum_password)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
// Not final in the slightest! Far too simplistic
|
// Not final in the slightest! Far too simplistic
|
||||||
if (isset($_GET['rate']))
|
if (isset($_GET['rate']))
|
||||||
{
|
{
|
||||||
|
@ -246,7 +248,21 @@ if (isset($_GET['rate']))
|
||||||
|
|
||||||
// Insert rating if appropriate
|
// Insert rating if appropriate
|
||||||
$sql = (!$updated) ? 'INSERT INTO ' . RATINGS_TABLE . ' (user_id, post_id, rating, rating_time) VALUES (' . $user->data['user_id'] . ", $post_id, $rate, " . time() . ')' : 'UPDATE ' . RATINGS_TABLE . " SET rating = $rate, rating_time = " . time() . " WHERE post_id = $post_id AND user_id = " . $user->data['user_id'];
|
$sql = (!$updated) ? 'INSERT INTO ' . RATINGS_TABLE . ' (user_id, post_id, rating, rating_time) VALUES (' . $user->data['user_id'] . ", $post_id, $rate, " . time() . ')' : 'UPDATE ' . RATINGS_TABLE . " SET rating = $rate, rating_time = " . time() . " WHERE post_id = $post_id AND user_id = " . $user->data['user_id'];
|
||||||
// $db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
// Rating sum and count past thirty days
|
||||||
|
$sql = 'SELECT p.poster_id, SUM(r.rating) AS rated, COUNT(r.rating) as total_ratings
|
||||||
|
FROM ' . RATINGS_TABLE . ' r, ' . POSTS_TABLE . ' p, ' . POSTS_TABLE . " p2
|
||||||
|
WHERE p2.post_id = $post_id
|
||||||
|
AND p.poster_id = p2.poster_id
|
||||||
|
AND p.post_time > " . (time() - (30 * 86400)) . '
|
||||||
|
AND r.post_id = p.post_id
|
||||||
|
AND r.user_id <> p2.poster_id
|
||||||
|
GROUP BY p.poster_id';
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
$row = $db->sql_fetchrow($result);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
// Rating sum and count since first post
|
// Rating sum and count since first post
|
||||||
$sql = 'SELECT p.poster_id, SUM(r.rating) AS rated, COUNT(r.rating) as total_ratings
|
$sql = 'SELECT p.poster_id, SUM(r.rating) AS rated, COUNT(r.rating) as total_ratings
|
||||||
|
@ -265,20 +281,6 @@ if (isset($_GET['rate']))
|
||||||
$total_ratings = $row['total_ratings'];
|
$total_ratings = $row['total_ratings'];
|
||||||
$historic_rating = ($row['rated'] / $row['total_ratings']) * 0.30;
|
$historic_rating = ($row['rated'] / $row['total_ratings']) * 0.30;
|
||||||
|
|
||||||
// Rating sum and count past thirty days
|
|
||||||
$sql = 'SELECT p.poster_id, SUM(r.rating) AS rated, COUNT(r.rating) as total_ratings
|
|
||||||
FROM ' . RATINGS_TABLE . ' r, ' . POSTS_TABLE . ' p, ' . POSTS_TABLE . " p2
|
|
||||||
WHERE p2.post_id = $post_id
|
|
||||||
AND p.poster_id = p2.poster_id
|
|
||||||
AND p.post_time > " . (time() - (30 * 86400)) . '
|
|
||||||
AND r.post_id = p.post_id
|
|
||||||
AND r.user_id <> p2.poster_id
|
|
||||||
GROUP BY p.poster_id';
|
|
||||||
$result = $db->sql_query($sql);
|
|
||||||
|
|
||||||
$row = $db->sql_fetchrow($result);
|
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
$total_ratings += $row['total_ratings'];
|
$total_ratings += $row['total_ratings'];
|
||||||
$thirty_day_rating = ($row['rated'] / $row['total_ratings']) * 0.50;
|
$thirty_day_rating = ($row['rated'] / $row['total_ratings']) * 0.50;
|
||||||
|
|
||||||
|
@ -322,7 +324,7 @@ if (isset($_GET['rate']))
|
||||||
$message = $message . '<br /><br />' . sprintf($user->lang['RETURN_POST'], "<a href=\"viewtopic.$phpEx$SID&f=$forum_id&t=$topic_id&p=$post_id#$post_id\">", '</a>');
|
$message = $message . '<br /><br />' . sprintf($user->lang['RETURN_POST'], "<a href=\"viewtopic.$phpEx$SID&f=$forum_id&t=$topic_id&p=$post_id#$post_id\">", '</a>');
|
||||||
trigger_error($message);
|
trigger_error($message);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
// What is start equal to?
|
// What is start equal to?
|
||||||
|
@ -776,14 +778,14 @@ do
|
||||||
$user_sig = $row['user_sig'];
|
$user_sig = $row['user_sig'];
|
||||||
$bbcode_bitfield |= $row['user_sig_bbcode_bitfield'];
|
$bbcode_bitfield |= $row['user_sig_bbcode_bitfield'];
|
||||||
}
|
}
|
||||||
//'<img src="images/karma' . $row['user_karma'] . '.gif" alt="' . $user->lang['KARMA_LEVEL'] . ': ' . $user->lang['KARMA'][$row['user_karma']] . '" title="' . $user->lang['KARMA_LEVEL'] . ': ' . $user->lang['KARMA'][$row['user_karma']] . '" />'
|
|
||||||
$id_cache[] = $poster_id;
|
$id_cache[] = $poster_id;
|
||||||
$user_cache[$poster_id] = array(
|
$user_cache[$poster_id] = array(
|
||||||
'joined' => $user->format_date($row['user_regdate'], $user->lang['DATE_FORMAT']),
|
'joined' => $user->format_date($row['user_regdate'], $user->lang['DATE_FORMAT']),
|
||||||
'posts' => (!empty($row['user_posts'])) ? $row['user_posts'] : '',
|
'posts' => (!empty($row['user_posts'])) ? $row['user_posts'] : '',
|
||||||
'from' => (!empty($row['user_from'])) ? $row['user_from'] : '',
|
'from' => (!empty($row['user_from'])) ? $row['user_from'] : '',
|
||||||
'karma' => (!empty($row['user_karma'])) ? $row['user_karma'] : 0,
|
'karma' => (!empty($row['user_karma'])) ? $row['user_karma'] : 0,
|
||||||
'karma_img' => '',
|
'karma_img' => '<img src="images/karma' . $row['user_karma'] . '.gif" alt="' . $user->lang['KARMA_LEVEL'] . ': ' . $user->lang['KARMA'][$row['user_karma']] . '" title="' . $user->lang['KARMA_LEVEL'] . ': ' . $user->lang['KARMA'][$row['user_karma']] . '" />',
|
||||||
|
|
||||||
'sig' => $user_sig,
|
'sig' => $user_sig,
|
||||||
'sig_bbcode_uid' => (!empty($row['user_sig_bbcode_uid'])) ? $row['user_sig_bbcode_uid'] : '',
|
'sig_bbcode_uid' => (!empty($row['user_sig_bbcode_uid'])) ? $row['user_sig_bbcode_uid'] : '',
|
||||||
|
|
Loading…
Add table
Reference in a new issue