- re-add script_path for "strange configurations" to let them force the generated urls correctly

- show rank title if no rank image present in memberlist
- other fixes.


git-svn-id: file:///svn/phpbb/trunk@6730 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2006-12-08 15:20:57 +00:00
parent 4519c51066
commit 1c41450bd9
16 changed files with 130 additions and 36 deletions

View file

@ -408,6 +408,35 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
$cfg_array[$config_name] = (int) $cfg_array[$config_name]; $cfg_array[$config_name] = (int) $cfg_array[$config_name];
break; break;
// Absolute path
case 'script_path':
if (!$cfg_array[$config_name])
{
break;
}
$destination = str_replace('\\', '/', $cfg_array[$config_name]);
if ($destination !== '/')
{
// Adjust destination path (no trailing slash)
if (substr($destination, -1, 1) == '/')
{
$destination = substr($destination, 0, -1);
}
$destination = str_replace(array('../', './'), '', $destination);
if ($destination[0] != '/')
{
$destination = '/' . $destination;
}
}
$cfg_array[$config_name] = trim($destination);
break;
// Relative path (appended $phpbb_root_path) // Relative path (appended $phpbb_root_path)
case 'rpath': case 'rpath':
case 'rwpath': case 'rwpath':
@ -419,9 +448,9 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
$destination = $cfg_array[$config_name]; $destination = $cfg_array[$config_name];
// Adjust destination path (no trailing slash) // Adjust destination path (no trailing slash)
if ($destination{(sizeof($destination)-1)} == '/' || $destination{(sizeof($destination)-1)} == '\\') if (substr($destination, -1, 1) == '/' || substr($destination, -1, 1) == '\\')
{ {
$destination = substr($destination, 0, sizeof($destination)-2); $destination = substr($destination, 0, -1);
} }
$destination = str_replace(array('../', '..\\', './', '.\\'), '', $destination); $destination = str_replace(array('../', '..\\', './', '.\\'), '', $destination);

View file

@ -27,7 +27,12 @@ class acp_board
$action = request_var('action', ''); $action = request_var('action', '');
$submit = (isset($_POST['submit'])) ? true : false; $submit = (isset($_POST['submit'])) ? true : false;
// Validation types are: string, int, bool, rpath (relative), rwpath (realtive, writeable), path (relative path, but able to escape the root), wpath (writeable) /**
* Validation types are:
* string, int, bool,
* script_path (absolute path in url - beginning with / and no trailing slash),
* rpath (relative), rwpath (realtive, writeable), path (relative path, but able to escape the root), wpath (writeable)
*/
switch ($mode) switch ($mode)
{ {
case 'settings': case 'settings':
@ -287,6 +292,7 @@ class acp_board
'server_protocol' => array('lang' => 'SERVER_PROTOCOL', 'validate' => 'string', 'type' => 'text:10:10', 'explain' => true), 'server_protocol' => array('lang' => 'SERVER_PROTOCOL', 'validate' => 'string', 'type' => 'text:10:10', 'explain' => true),
'server_name' => array('lang' => 'SERVER_NAME', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true), 'server_name' => array('lang' => 'SERVER_NAME', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
'server_port' => array('lang' => 'SERVER_PORT', 'validate' => 'int', 'type' => 'text:5:5', 'explain' => true), 'server_port' => array('lang' => 'SERVER_PORT', 'validate' => 'int', 'type' => 'text:5:5', 'explain' => true),
'script_path' => array('lang' => 'SCRIPT_PATH', 'validate' => 'script_path', 'type' => 'text::255', 'explain' => true),
) )
); );
break; break;

View file

@ -94,10 +94,8 @@ class acp_inactive
include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx); include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx);
$messenger = new messenger(); $messenger = new messenger();
$board_url = generate_board_url() . "/ucp.$phpEx?mode=activate";
$usernames = array(); $usernames = array();
do do
{ {
$messenger->template('user_remind_inactive', $row['user_lang']); $messenger->template('user_remind_inactive', $row['user_lang']);
@ -109,7 +107,7 @@ class acp_inactive
$messenger->assign_vars(array( $messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($row['username']), 'USERNAME' => htmlspecialchars_decode($row['username']),
'REGISTER_DATE' => $user->format_date($row['user_regdate']), 'REGISTER_DATE' => $user->format_date($row['user_regdate']),
'U_ACTIVATE' => "$board_url&mode=activate&u=" . $row['user_id'] . '&k=' . $row['user_actkey']) 'U_ACTIVATE' => generate_board_url() . "/ucp.$phpEx?mode=activate&u=" . $row['user_id'] . '&k=' . $row['user_actkey'])
); );
$messenger->send($row['user_notify_type']); $messenger->send($row['user_notify_type']);

View file

@ -1451,6 +1451,7 @@ function generate_board_url($without_script_path = false)
$server_protocol = ($config['server_protocol']) ? $config['server_protocol'] : (($config['cookie_secure']) ? 'https://' : 'http://'); $server_protocol = ($config['server_protocol']) ? $config['server_protocol'] : (($config['cookie_secure']) ? 'https://' : 'http://');
$server_name = $config['server_name']; $server_name = $config['server_name'];
$server_port = (int) $config['server_port']; $server_port = (int) $config['server_port'];
$script_path = $config['script_path'];
$url = $server_protocol . $server_name; $url = $server_protocol . $server_name;
} }
@ -1459,6 +1460,8 @@ function generate_board_url($without_script_path = false)
// Do not rely on cookie_secure, users seem to think that it means a secured cookie instead of an encrypted connection // Do not rely on cookie_secure, users seem to think that it means a secured cookie instead of an encrypted connection
$cookie_secure = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 1 : 0; $cookie_secure = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 1 : 0;
$url = (($cookie_secure) ? 'https://' : 'http://') . $server_name; $url = (($cookie_secure) ? 'https://' : 'http://') . $server_name;
$script_path = $user->page['root_script_path'];
} }
if ($server_port && (($config['cookie_secure'] && $server_port <> 443) || (!$config['cookie_secure'] && $server_port <> 80))) if ($server_port && (($config['cookie_secure'] && $server_port <> 443) || (!$config['cookie_secure'] && $server_port <> 80)))
@ -1466,13 +1469,18 @@ function generate_board_url($without_script_path = false)
$url .= ':' . $server_port; $url .= ':' . $server_port;
} }
if ($without_script_path) if (!$without_script_path)
{ {
return $url; $url .= $script_path;
} }
// Strip / from the end // Strip / from the end
return $url . substr($user->page['root_script_path'], 0, -1); if (substr($url, -1, 1) == '/')
{
$url = substr($url, 0, -1);
}
return $url;
} }
/** /**

View file

@ -358,11 +358,14 @@ class ftp extends transfer
* @access private * @access private
*/ */
function _chdir($dir = '') function _chdir($dir = '')
{
if ($dir && $dir !== '/')
{ {
if (substr($dir, -1, 1) == '/') if (substr($dir, -1, 1) == '/')
{ {
$dir = substr($dir, 0, -1); $dir = substr($dir, 0, -1);
} }
}
return @ftp_chdir($this->connection, $dir); return @ftp_chdir($this->connection, $dir);
} }
@ -584,11 +587,14 @@ class ftp_fsock extends transfer
* @access private * @access private
*/ */
function _chdir($dir = '') function _chdir($dir = '')
{
if ($dir && $dir !== '/')
{ {
if (substr($dir, -1, 1) == '/') if (substr($dir, -1, 1) == '/')
{ {
$dir = substr($dir, 0, -1); $dir = substr($dir, 0, -1);
} }
}
return $this->_send_command('CWD', $dir); return $this->_send_command('CWD', $dir);
} }

View file

@ -840,7 +840,14 @@ class bbcode_firstpass extends bbcode
{ {
global $config, $phpEx, $user; global $config, $phpEx, $user;
if ($config['force_server_vars'])
{
$check_path = $config['script_path'];
}
else
{
$check_path = ($user->page['root_script_path'] != '/') ? substr($user->page['root_script_path'], 0, -1) : '/'; $check_path = ($user->page['root_script_path'] != '/') ? substr($user->page['root_script_path'], 0, -1) : '/';
}
// Is the user trying to link to a php file in this domain and script path? // Is the user trying to link to a php file in this domain and script path?
if (strpos($url, ".{$phpEx}") !== false && strpos($url, $check_path) !== false) if (strpos($url, ".{$phpEx}") !== false && strpos($url, $check_path) !== false)

View file

@ -173,7 +173,7 @@ class ucp_profile
$messenger->assign_vars(array( $messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($data['username']), 'USERNAME' => htmlspecialchars_decode($data['username']),
'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&amp;u={$user->data['user_id']}", 'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u={$user->data['user_id']}",
'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user->data['user_id']}&k=$user_actkey") 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user->data['user_id']}&k=$user_actkey")
); );

View file

@ -113,7 +113,7 @@ class ucp_resend
$messenger->assign_vars(array( $messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($user_row['username']), 'USERNAME' => htmlspecialchars_decode($user_row['username']),
'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&amp;u={$user->data['user_id']}", 'U_USER_DETAILS' => generate_board_url() . "/memberlist.$phpEx?mode=viewprofile&u={$user->data['user_id']}",
'U_ACTIVATE' => generate_board_url() . "/ucp.$phpEx?mode=activate&u={$user_row['user_id']}&k={$user_row['user_actkey']}") 'U_ACTIVATE' => generate_board_url() . "/ucp.$phpEx?mode=activate&u={$user_row['user_id']}&k={$user_row['user_actkey']}")
); );

View file

@ -490,6 +490,14 @@ if (version_compare($current_version, '3.0.b3', '<'))
$no_updates = false; $no_updates = false;
} }
if (version_compare($current_version, '3.0.b4', '<'))
{
// Add config value
set_config('script_path', '/');
$no_updates = false;
}
_write_result($no_updates, $errored, $error_ary); _write_result($no_updates, $errored, $error_ary);
$error_ary = array(); $error_ary = array();

View file

@ -987,6 +987,19 @@ class install_install extends module
$server_protocol = ($server_protocol !== '') ? $server_protocol : ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://'); $server_protocol = ($server_protocol !== '') ? $server_protocol : ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://');
$cookie_secure = ($cookie_secure !== '') ? $cookie_secure : ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? true : false); $cookie_secure = ($cookie_secure !== '') ? $cookie_secure : ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? true : false);
if ($script_path === '')
{
$name = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF');
if (!$name)
{
$name = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : getenv('REQUEST_URI');
}
// Replace backslashes and doubled slashes (could happen on some proxy setups)
$name = str_replace(array('\\', '//', '/install'), '/', $name);
$script_path = trim(dirname($name));
}
foreach ($this->advanced_config_options as $config_key => $vars) foreach ($this->advanced_config_options as $config_key => $vars)
{ {
if (!is_array($vars) && strpos($config_key, 'legend') === false) if (!is_array($vars) && strpos($config_key, 'legend') === false)
@ -1166,6 +1179,22 @@ class install_install extends module
$user_ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : ''; $user_ip = (!empty($_SERVER['REMOTE_ADDR'])) ? htmlspecialchars($_SERVER['REMOTE_ADDR']) : '';
if ($script_path !== '/')
{
// Adjust destination path (no trailing slash)
if ($script_path[sizeof($script_path) - 1] == '/')
{
$script_path = substr($script_path, 0, -1);
}
$script_path = str_replace(array('../', './'), '', $script_path);
if ($script_path[0] != '/')
{
$script_path = '/' . $script_path;
}
}
// Set default config and post data, this applies to all DB's // Set default config and post data, this applies to all DB's
$sql_ary = array( $sql_ary = array(
'INSERT INTO ' . $table_prefix . "config (config_name, config_value) 'INSERT INTO ' . $table_prefix . "config (config_name, config_value)
@ -1235,17 +1264,13 @@ class install_install extends module
WHERE config_name = 'force_server_vars'", WHERE config_name = 'force_server_vars'",
'UPDATE ' . $table_prefix . "config 'UPDATE ' . $table_prefix . "config
SET config_value = '" . $db->sql_escape($server_name) . "' SET config_value = '" . $db->sql_escape($script_path) . "'
WHERE config_name = 'server_name'", WHERE config_name = 'script_path'",
'UPDATE ' . $table_prefix . "config 'UPDATE ' . $table_prefix . "config
SET config_value = '" . $db->sql_escape($server_protocol) . "' SET config_value = '" . $db->sql_escape($server_protocol) . "'
WHERE config_name = 'server_protocol'", WHERE config_name = 'server_protocol'",
'UPDATE ' . $table_prefix . "config
SET config_value = '" . $db->sql_escape($server_port) . "'
WHERE config_name = 'server_port'",
'UPDATE ' . $table_prefix . "config 'UPDATE ' . $table_prefix . "config
SET config_value = '" . $db->sql_escape($admin_name) . "' SET config_value = '" . $db->sql_escape($admin_name) . "'
WHERE config_name = 'newest_username'", WHERE config_name = 'newest_username'",
@ -2025,7 +2050,7 @@ class install_install extends module
* The variables that we will be passing between pages * The variables that we will be passing between pages
* Used to retrieve data quickly on each page * Used to retrieve data quickly on each page
*/ */
var $request_vars = array('language', 'dbms', 'dbhost', 'dbport', 'dbuser', 'dbpasswd', 'dbname', 'table_prefix', 'default_lang', 'admin_name', 'admin_pass1', 'admin_pass2', 'board_email1', 'board_email2', 'img_imagick', 'ftp_path', 'ftp_user', 'ftp_pass', 'email_enable', 'smtp_delivery', 'smtp_host', 'smtp_auth', 'smtp_user', 'smtp_pass', 'cookie_secure', 'force_server_vars', 'server_protocol', 'server_name', 'server_port'); var $request_vars = array('language', 'dbms', 'dbhost', 'dbport', 'dbuser', 'dbpasswd', 'dbname', 'table_prefix', 'default_lang', 'admin_name', 'admin_pass1', 'admin_pass2', 'board_email1', 'board_email2', 'img_imagick', 'ftp_path', 'ftp_user', 'ftp_pass', 'email_enable', 'smtp_delivery', 'smtp_host', 'smtp_auth', 'smtp_user', 'smtp_pass', 'cookie_secure', 'force_server_vars', 'server_protocol', 'server_name', 'server_port', 'script_path');
/** /**
* The information below will be used to build the input fields presented to the user * The information below will be used to build the input fields presented to the user
@ -2064,6 +2089,7 @@ class install_install extends module
'server_protocol' => array('lang' => 'SERVER_PROTOCOL', 'type' => 'text:10:10', 'explain' => true), 'server_protocol' => array('lang' => 'SERVER_PROTOCOL', 'type' => 'text:10:10', 'explain' => true),
'server_name' => array('lang' => 'SERVER_NAME', 'type' => 'text:40:255', 'explain' => true), 'server_name' => array('lang' => 'SERVER_NAME', 'type' => 'text:40:255', 'explain' => true),
'server_port' => array('lang' => 'SERVER_PORT', 'type' => 'text:5:5', 'explain' => true), 'server_port' => array('lang' => 'SERVER_PORT', 'type' => 'text:5:5', 'explain' => true),
'script_path' => array('lang' => 'SCRIPT_PATH', 'type' => 'text::255', 'explain' => true),
); );
/** /**

View file

@ -412,6 +412,7 @@ class install_update extends module
// To ease the update process create a file location map // To ease the update process create a file location map
$update_list = $cache->get('_update_list'); $update_list = $cache->get('_update_list');
$script_path = ($config['force_server_vars']) ? (($config['script_path'] == '/') ? '/' : $config['script_path'] . '/') : $user->page['root_script_path'];
foreach ($update_list as $status => $files) foreach ($update_list as $status => $files)
{ {
@ -429,7 +430,7 @@ class install_update extends module
$template->assign_block_vars('location', array( $template->assign_block_vars('location', array(
'SOURCE' => htmlspecialchars($file_struct['filename']), 'SOURCE' => htmlspecialchars($file_struct['filename']),
'DESTINATION' => $user->page['root_script_path'] . htmlspecialchars($file_struct['filename']), 'DESTINATION' => $script_path . htmlspecialchars($file_struct['filename']),
)); ));
} }
} }

View file

@ -170,6 +170,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('print_pm', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('queue_interval', '600'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('queue_interval', '600');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ranks_path', 'images/ranks'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('ranks_path', 'images/ranks');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_block_size', '250'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_block_size', '250');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_gc', '7200'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_gc', '7200');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_indexing_state', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_indexing_state', '');

View file

@ -249,7 +249,7 @@ $lang = array_merge($lang, array(
'LIMIT_LOAD_EXPLAIN' => 'If the 1 minute system load exceeds this value the board will go offline, 1.0 equals ~100% utilisation of one processor. This only functions on UNIX based servers.', 'LIMIT_LOAD_EXPLAIN' => 'If the 1 minute system load exceeds this value the board will go offline, 1.0 equals ~100% utilisation of one processor. This only functions on UNIX based servers.',
'LIMIT_SESSIONS' => 'Limit sessions', 'LIMIT_SESSIONS' => 'Limit sessions',
'LIMIT_SESSIONS_EXPLAIN' => 'If the number of sessions exceeds this value within a one minute period the board will go offline. Set to 0 for unlimited sessions.', 'LIMIT_SESSIONS_EXPLAIN' => 'If the number of sessions exceeds this value within a one minute period the board will go offline. Set to 0 for unlimited sessions.',
'LOAD_CPF_MEMBERLIST' => 'Display custom profile fields in memberlist', 'LOAD_CPF_MEMBERLIST' => 'Allow styles to display custom profile fields in memberlist',
'LOAD_CPF_VIEWPROFILE' => 'Display custom profile fields in user profiles', 'LOAD_CPF_VIEWPROFILE' => 'Display custom profile fields in user profiles',
'LOAD_CPF_VIEWTOPIC' => 'Display custom profile fields on viewtopic', 'LOAD_CPF_VIEWTOPIC' => 'Display custom profile fields on viewtopic',
'LOAD_USER_ACTIVITY' => 'Show users activity', 'LOAD_USER_ACTIVITY' => 'Show users activity',
@ -305,6 +305,8 @@ $lang = array_merge($lang, array(
'PATH_SETTINGS' => 'Path settings', 'PATH_SETTINGS' => 'Path settings',
'RANKS_PATH' => 'Rank image storage path', 'RANKS_PATH' => 'Rank image storage path',
'RANKS_PATH_EXPLAIN' => 'Path under your phpBB root dir, e.g. <samp>images/ranks</samp>', 'RANKS_PATH_EXPLAIN' => 'Path under your phpBB root dir, e.g. <samp>images/ranks</samp>',
'SCRIPT_PATH' => 'Script path',
'SCRIPT_PATH_EXPLAIN' => 'The path where phpBB is located relative to the domain name, e.g. <samp>/phpBB3</samp>',
'SEND_ENCODING' => 'Send encoding', 'SEND_ENCODING' => 'Send encoding',
'SEND_ENCODING_EXPLAIN' => 'Send the file encoding from phpBB via HTTP overriding the webserver configuration', 'SEND_ENCODING_EXPLAIN' => 'Send the file encoding from phpBB via HTTP overriding the webserver configuration',
'SERVER_NAME' => 'Domain name', 'SERVER_NAME' => 'Domain name',

View file

@ -259,7 +259,7 @@ $lang = array_merge($lang, array(
'RETRY_WRITE_EXPLAIN' => 'If you wish you can change the permissions on config.php to allow phpBB to write to it. Should you wish to do that you can click Retry below to try again. Remember to return the permissions on config.php after phpBB has finished installation.', 'RETRY_WRITE_EXPLAIN' => 'If you wish you can change the permissions on config.php to allow phpBB to write to it. Should you wish to do that you can click Retry below to try again. Remember to return the permissions on config.php after phpBB has finished installation.',
'SCRIPT_PATH' => 'Script path', 'SCRIPT_PATH' => 'Script path',
'SCRIPT_PATH_EXPLAIN' => 'The path where phpBB is located relative to the domain name', 'SCRIPT_PATH_EXPLAIN' => 'The path where phpBB is located relative to the domain name, e.g. <samp>/phpBB3</samp>',
'SELECT_LANG' => 'Select language', 'SELECT_LANG' => 'Select language',
'SERVER_CONFIG' => 'Server Configuration', 'SERVER_CONFIG' => 'Server Configuration',
'SOFTWARE' => 'Forum Software', 'SOFTWARE' => 'Forum Software',

View file

@ -1444,14 +1444,17 @@ function show_profile($data)
// Dump it out to the template // Dump it out to the template
return array( return array(
'AGE' => $age, 'AGE' => $age,
'USERNAME' => $username,
'USER_COLOR' => (!empty($data['user_colour'])) ? $data['user_colour'] : '',
'RANK_TITLE' => $rank_title, 'RANK_TITLE' => $rank_title,
'JOINED' => $user->format_date($data['user_regdate']), 'JOINED' => $user->format_date($data['user_regdate']),
'VISITED' => (empty($last_visit)) ? ' - ' : $user->format_date($last_visit), 'VISITED' => (empty($last_visit)) ? ' - ' : $user->format_date($last_visit),
'POSTS' => ($data['user_posts']) ? $data['user_posts'] : 0, 'POSTS' => ($data['user_posts']) ? $data['user_posts'] : 0,
'WARNINGS' => isset($data['user_warnings']) ? $data['user_warnings'] : 0, 'WARNINGS' => isset($data['user_warnings']) ? $data['user_warnings'] : 0,
'USERNAME_FULL' => get_username_string('full', $user_id, $username, $data['user_colour']),
'USERNAME' => get_username_string('username', $user_id, $username, $data['user_colour']),
'USER_COLOR' => get_username_string('colour', $user_id, $username, $data['user_colour']),
'U_VIEW_PROFILE' => get_username_string('profile', $user_id, $username, $data['user_colour']),
'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : (($online) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')), 'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : (($online) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')),
'S_ONLINE' => ($config['load_onlinetrack'] && $online) ? true : false, 'S_ONLINE' => ($config['load_onlinetrack'] && $online) ? true : false,
'RANK_IMG' => $rank_img, 'RANK_IMG' => $rank_img,
@ -1459,7 +1462,6 @@ function show_profile($data)
'ICQ_STATUS_IMG' => (!empty($data['user_icq'])) ? '<img src="http://web.icq.com/whitepages/online?icq=' . $data['user_icq'] . '&amp;img=5" width="18" height="18" />' : '', 'ICQ_STATUS_IMG' => (!empty($data['user_icq'])) ? '<img src="http://web.icq.com/whitepages/online?icq=' . $data['user_icq'] . '&amp;img=5" width="18" height="18" />' : '',
'S_JABBER_ENABLED' => ($config['jab_enable']) ? true : false, 'S_JABBER_ENABLED' => ($config['jab_enable']) ? true : false,
'U_PROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $user_id),
'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$user_id&amp;sr=posts") : '', 'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$user_id&amp;sr=posts") : '',
'U_NOTES' => $auth->acl_getf_global('m_') ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $user_id, true, $user->session_id) : '', 'U_NOTES' => $auth->acl_getf_global('m_') ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&amp;mode=user_notes&amp;u=' . $user_id, true, $user->session_id) : '',
'U_WARN' => $auth->acl_getf_global('m_warn') ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $user_id, true, $user->session_id) : '', 'U_WARN' => $auth->acl_getf_global('m_warn') ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&amp;mode=warn_user&amp;u=' . $user_id, true, $user->session_id) : '',

View file

@ -61,10 +61,10 @@
<!-- IF memberrow.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --> <tr class="row1"><!-- ENDIF --> <!-- IF memberrow.S_ROW_COUNT is even --><tr class="row2"><!-- ELSE --> <tr class="row1"><!-- ENDIF -->
<td class="gen" align="center">&nbsp;{memberrow.ROW_NUMBER}&nbsp;</td> <td class="gen" align="center">&nbsp;{memberrow.ROW_NUMBER}&nbsp;</td>
<td class="genmed" align="left"><strong><a<!-- IF memberrow.USER_COLOR --> style="color:#{memberrow.USER_COLOR}"<!-- ENDIF --> href="{memberrow.U_VIEW_PROFILE}">{memberrow.USERNAME}</a></strong></td> <td class="genmed" align="left">{memberrow.USERNAME_FULL}</td>
<td class="genmed" align="center" nowrap="nowrap">&nbsp;{memberrow.JOINED}&nbsp;</td> <td class="genmed" align="center" nowrap="nowrap">&nbsp;{memberrow.JOINED}&nbsp;</td>
<td class="gen" align="center">{memberrow.POSTS}</td> <td class="gen" align="center">{memberrow.POSTS}</td>
<td class="gen" align="center">{memberrow.RANK_IMG}</td> <td class="gen" align="center"><!-- IF memberrow.RANK_IMG -->{memberrow.RANK_IMG}<!-- ELSE -->{memberrow.RANK_TITLE}<!-- ENDIF --></td>
<td class="gen" align="center">&nbsp;<!-- IF memberrow.U_PM --><a href="{memberrow.U_PM}">{PM_IMG}</a><!-- ENDIF -->&nbsp;</td> <td class="gen" align="center">&nbsp;<!-- IF memberrow.U_PM --><a href="{memberrow.U_PM}">{PM_IMG}</a><!-- ENDIF -->&nbsp;</td>
<td class="gen" align="center">&nbsp;<!-- IF memberrow.U_EMAIL --><a href="{memberrow.U_EMAIL}">{EMAIL_IMG}</a><!-- ENDIF -->&nbsp;</td> <td class="gen" align="center">&nbsp;<!-- IF memberrow.U_EMAIL --><a href="{memberrow.U_EMAIL}">{EMAIL_IMG}</a><!-- ENDIF -->&nbsp;</td>
<td class="gen" align="center">&nbsp;<!-- IF memberrow.U_WWW --><a href="{memberrow.U_WWW}" target="_blank">{WWW_IMG}</a><!-- ENDIF -->&nbsp;</td> <td class="gen" align="center">&nbsp;<!-- IF memberrow.U_WWW --><a href="{memberrow.U_WWW}" target="_blank">{WWW_IMG}</a><!-- ENDIF -->&nbsp;</td>