mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Revised attachment categories a bit
Fixes for the following bugs: #4830 #4818 #4816 #4810 #4808 #4798 #4796 #4772 #4662 #4646 #4546 #4524 #4270 I hope not having introduced additional severe errors :) git-svn-id: file:///svn/phpbb/trunk@6511 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
9a0ca3d334
commit
fcd9b898f1
27 changed files with 330 additions and 135 deletions
|
@ -24,6 +24,13 @@ $user->session_begin(false);
|
|||
$auth->acl($user->data);
|
||||
$user->setup('viewtopic');
|
||||
|
||||
/*
|
||||
$fp = fopen('session.txt', 'at');
|
||||
fwrite($fp, print_r($_GET, true));
|
||||
fwrite($fp, print_r($user->data, true));
|
||||
fclose($fp);
|
||||
*/
|
||||
|
||||
if (!$download_id)
|
||||
{
|
||||
trigger_error('NO_ATTACHMENT_SELECTED');
|
||||
|
|
|
@ -538,7 +538,9 @@ class acp_attachments
|
|||
ATTACHMENT_CATEGORY_NONE => $user->lang['NO_FILE_CAT'],
|
||||
ATTACHMENT_CATEGORY_IMAGE => $user->lang['CAT_IMAGES'],
|
||||
ATTACHMENT_CATEGORY_WM => $user->lang['CAT_WM_FILES'],
|
||||
ATTACHMENT_CATEGORY_RM => $user->lang['CAT_RM_FILES']
|
||||
ATTACHMENT_CATEGORY_RM => $user->lang['CAT_RM_FILES'],
|
||||
ATTACHMENT_CATEGORY_FLASH => $user->lang['CAT_FLASH_FILES'],
|
||||
ATTACHMENT_CATEGORY_QUICKTIME => $user->lang['CAT_QUICKTIME_FILES'],
|
||||
);
|
||||
|
||||
$group_id = request_var('g', 0);
|
||||
|
@ -1019,7 +1021,9 @@ class acp_attachments
|
|||
ATTACHMENT_CATEGORY_NONE => $user->lang['NO_FILE_CAT'],
|
||||
ATTACHMENT_CATEGORY_IMAGE => $user->lang['CAT_IMAGES'],
|
||||
ATTACHMENT_CATEGORY_WM => $user->lang['CAT_WM_FILES'],
|
||||
ATTACHMENT_CATEGORY_RM => $user->lang['CAT_RM_FILES']
|
||||
ATTACHMENT_CATEGORY_RM => $user->lang['CAT_RM_FILES'],
|
||||
ATTACHMENT_CATEGORY_FLASH => $user->lang['CAT_FLASH_FILES'],
|
||||
ATTACHMENT_CATEGORY_QUICKTIME => $user->lang['CAT_QUICKTIME_FILES'],
|
||||
);
|
||||
|
||||
if ($group_id)
|
||||
|
|
|
@ -317,7 +317,7 @@ class acp_groups
|
|||
{
|
||||
if (isset($group_row['group_avatar']) && $group_row['group_avatar'])
|
||||
{
|
||||
avatar_delete($group_row['group_avatar']);
|
||||
avatar_delete('group', $group_row);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,9 @@ class acp_language
|
|||
list($_REQUEST['language_file'], ) = array_keys($missing_file);
|
||||
}
|
||||
|
||||
list($this->language_directory, $this->language_file) = explode('|', request_var('language_file', '|common.' . $phpEx));
|
||||
$selected_lang_file = request_var('language_file', '|common.' . $phpEx);
|
||||
|
||||
list($this->language_directory, $this->language_file) = explode('|', $selected_lang_file);
|
||||
|
||||
$this->language_directory = basename($this->language_directory);
|
||||
$this->language_file = basename($this->language_file);
|
||||
|
@ -201,7 +203,7 @@ class acp_language
|
|||
|
||||
if (!$fp)
|
||||
{
|
||||
trigger_error(sprintf($user->lang['UNABLE_TO_WRITE_FILE'], $filename) . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
trigger_error(sprintf($user->lang['UNABLE_TO_WRITE_FILE'], $filename) . adm_back_link($this->u_action . '&id=' . $lang_id . '&language_file=' . urlencode($selected_lang_file)), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if ($this->language_directory == 'email')
|
||||
|
@ -285,6 +287,8 @@ class acp_language
|
|||
$file = request_var('file', '');
|
||||
$dir = request_var('dir', '');
|
||||
|
||||
$selected_lang_file = $dir . '|' . $file;
|
||||
|
||||
$old_file = '/' . $this->get_filename($row['lang_iso'], $dir, $file, false, true);
|
||||
$lang_path = 'language/' . $row['lang_iso'] . '/' . (($dir) ? $dir . '/' : '');
|
||||
|
||||
|
@ -308,7 +312,7 @@ class acp_language
|
|||
|
||||
if (($result = $transfer->open_session()) !== true)
|
||||
{
|
||||
trigger_error($user->lang[$result] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
trigger_error($user->lang[$result] . adm_back_link($this->u_action . '&action=details&id=' . $lang_id . '&language_file=' . urlencode($selected_lang_file)), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$transfer->rename($lang_path . $file, $lang_path . $file . '.bak');
|
||||
|
@ -320,7 +324,7 @@ class acp_language
|
|||
|
||||
add_log('admin', 'LOG_LANGUAGE_FILE_REPLACED', $file);
|
||||
|
||||
trigger_error($user->lang['UPLOAD_COMPLETED'] . adm_back_link($this->u_action));
|
||||
trigger_error($user->lang['UPLOAD_COMPLETED'] . adm_back_link($this->u_action . '&action=details&id=' . $lang_id . '&language_file=' . urlencode($selected_lang_file)));
|
||||
}
|
||||
|
||||
$action = 'details';
|
||||
|
|
|
@ -276,7 +276,8 @@ class acp_main
|
|||
{
|
||||
$sql = 'SELECT COUNT(attach_id) AS total_orphan
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE is_orphan = 1';
|
||||
WHERE is_orphan = 1
|
||||
AND filetime < ' . (time() - 3*60*60);
|
||||
$result = $db->sql_query($sql);
|
||||
$total_orphan = (int) $db->sql_fetchfield('total_orphan');
|
||||
$db->sql_freeresult($result);
|
||||
|
|
|
@ -397,9 +397,12 @@ pagination_sep = \'{PAGINATION_SEP}\'
|
|||
}
|
||||
unset($cfg_data);
|
||||
|
||||
if (sizeof($sql_ary))
|
||||
{
|
||||
$sql = 'UPDATE ' . STYLES_IMAGESET_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
|
||||
WHERE imageset_id = $style_id";
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
$cache->destroy('sql', STYLES_IMAGESET_TABLE);
|
||||
|
||||
|
@ -1845,7 +1848,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
|
|||
{
|
||||
foreach ($key_array as $key)
|
||||
{
|
||||
$imageset_cfg .= "\n" . $key . ' = ' . str_replace("styles/{$style_row['imageset_path']}/imageset/", '{PATH}', $style_row[$key]);
|
||||
$imageset_cfg .= "\nimg_" . $key . ' = ' . str_replace("styles/{$style_row['imageset_path']}/imageset/", '{PATH}', $style_row[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -389,7 +389,7 @@ class acp_users
|
|||
// Delete old avatar if present
|
||||
if ($user_row['user_avatar'] && $user_row['user_avatar_type'] != AVATAR_GALLERY)
|
||||
{
|
||||
avatar_delete($user_row['user_avatar']);
|
||||
avatar_delete('user', $user_row);
|
||||
}
|
||||
|
||||
add_log('admin', 'LOG_USER_DEL_AVATAR', $user_row['username']);
|
||||
|
@ -1476,7 +1476,7 @@ class acp_users
|
|||
// Delete old avatar if present
|
||||
if ($user_row['user_avatar'] && $filename != $user_row['user_avatar'] && $user_row['user_avatar_type'] != AVATAR_GALLERY)
|
||||
{
|
||||
avatar_delete($user_row['user_avatar']);
|
||||
avatar_delete('user', $user_row);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -130,7 +130,8 @@ 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('SWF_CAT', 5); // Replaced by [flash]? or an additional possibility?
|
||||
define('ATTACHMENT_CATEGORY_FLASH', 5); // Flash/SWF files
|
||||
define('ATTACHMENT_CATEGORY_QUICKTIME', 6); // Quicktime/Mov files
|
||||
|
||||
// BBCode UID length
|
||||
define('BBCODE_UID_LEN', 5);
|
||||
|
|
|
@ -1945,6 +1945,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
|||
'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'),
|
||||
|
||||
'S_DISPLAY_FULL_LOGIN' => ($s_display) ? true : false,
|
||||
'S_AUTOLOGIN_ENABLED' => ($config['allow_autologin']) ? true : false,
|
||||
'S_LOGIN_ACTION' => (!$admin) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') : append_sid("index.$phpEx", false, true, $user->session_id), // Needs to stay index.$phpEx because we are within the admin directory
|
||||
'S_HIDDEN_FIELDS' => $s_hidden_fields,
|
||||
|
||||
|
|
|
@ -2006,6 +2006,12 @@ function cache_moderators()
|
|||
|
||||
foreach ($hold_ary as $user_id => $forum_id_ary)
|
||||
{
|
||||
// Do not continue if user does not exist
|
||||
if (!isset($usernames_ary[$user_id]))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($forum_id_ary as $forum_id => $auth_ary)
|
||||
{
|
||||
$sql_ary[] = array(
|
||||
|
@ -2047,6 +2053,12 @@ function cache_moderators()
|
|||
|
||||
foreach ($hold_ary as $group_id => $forum_id_ary)
|
||||
{
|
||||
// If there is no group, we do not assign it...
|
||||
if (!isset($groupnames_ary[$group_id]))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($forum_id_ary as $forum_id => $auth_ary)
|
||||
{
|
||||
$flag = false;
|
||||
|
|
|
@ -837,6 +837,8 @@ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_
|
|||
|
||||
$download_link = (!$force_physical && $attachment['attach_id']) ? append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&f=' . $forum_id) : $filename;
|
||||
|
||||
$download_link_full = (!$force_physical && $attachment['attach_id']) ? generate_board_url() . append_sid("/download.$phpEx", 'id=' . $attachment['attach_id'] . '&f=' . $forum_id) : generate_board_url() . $filename;
|
||||
|
||||
switch ($display_cat)
|
||||
{
|
||||
// Images
|
||||
|
@ -865,53 +867,51 @@ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_
|
|||
case ATTACHMENT_CATEGORY_WM:
|
||||
$l_downloaded_viewed = $user->lang['VIEWED'];
|
||||
|
||||
// The download link is slightly different, because somehow phpBB is not able to get the correct results if called
|
||||
// within the wmp object (cookies are not present).
|
||||
// $download_link = (!$force_physical && $attachment['attach_id']) ? generate_board_url() . append_sid("/download.$phpEx", 'id=' . $attachment['attach_id'] . '&f=' . $forum_id, false, $user->session_id) : $filename;
|
||||
|
||||
// Giving the filename directly because within the wm object all variables are in local context making it impossible
|
||||
// to validate against a valid session (all params can differ)
|
||||
$download_link = $filename;
|
||||
|
||||
$block_array += array(
|
||||
'U_FORUM' => generate_board_url(),
|
||||
'S_WM_FILE' => true,
|
||||
);
|
||||
|
||||
// Viewed/Heared File ... update the download count (download.php is not called here)
|
||||
// Viewed/Heared File ... update the download count
|
||||
$update_count[] = $attachment['attach_id'];
|
||||
break;
|
||||
|
||||
// Real Media Streams
|
||||
case ATTACHMENT_CATEGORY_RM:
|
||||
case ATTACHMENT_CATEGORY_QUICKTIME:
|
||||
$l_downloaded_viewed = $user->lang['VIEWED'];
|
||||
|
||||
$block_array += array(
|
||||
'S_RM_FILE' => true,
|
||||
'S_RM_FILE' => ($display_cat == ATTACHMENT_CATEGORY_RM) ? true : false,
|
||||
'S_QUICKTIME_FILE' => ($display_cat == ATTACHMENT_CATEGORY_QUICKTIME) ? true : false,
|
||||
'U_FORUM' => generate_board_url(),
|
||||
'ATTACH_ID' => $attachment['attach_id'],
|
||||
);
|
||||
|
||||
// Viewed/Heared File ... update the download count (download.php is not called here)
|
||||
// Viewed/Heared File ... update the download count
|
||||
$update_count[] = $attachment['attach_id'];
|
||||
break;
|
||||
|
||||
/* // Macromedia Flash Files
|
||||
case SWF_CAT:
|
||||
list($width, $height) = swf_getdimension($filename);
|
||||
// Macromedia Flash Files
|
||||
case ATTACHMENT_CATEGORY_FLASH:
|
||||
list($width, $height) = @getimagesize($filename);
|
||||
|
||||
$l_downloaded_viewed = $user->lang['VIEWED'];
|
||||
$download_link = $filename;
|
||||
|
||||
$block_array += array(
|
||||
'S_SWF_FILE' => true,
|
||||
'S_FLASH_FILE' => true,
|
||||
'WIDTH' => $width,
|
||||
'HEIGHT' => $height,
|
||||
);
|
||||
|
||||
// Viewed/Heared File ... update the download count (download.php is not called here)
|
||||
// Viewed/Heared File ... update the download count
|
||||
$update_count[] = $attachment['attach_id'];
|
||||
break;
|
||||
*/
|
||||
|
||||
default:
|
||||
$l_downloaded_viewed = $user->lang['DOWNLOADED'];
|
||||
|
||||
|
|
|
@ -256,9 +256,9 @@ class p_master
|
|||
// If no category or module selected, go active for first module in first category
|
||||
if (
|
||||
(($item_ary['name'] === $id || $item_ary['id'] === (int) $id) && (($item_ary['mode'] == $mode && !$item_ary['cat']) || ($icat && $item_ary['cat']))) ||
|
||||
($item_ary['parent'] === $category && !$item_ary['cat'] && !$icat) ||
|
||||
($item_ary['parent'] === $category && !$item_ary['cat'] && !$icat && $item_ary['display']) ||
|
||||
(($item_ary['name'] === $id || $item_ary['id'] === (int) $id) && !$mode && !$item_ary['cat']) ||
|
||||
(!$id && !$mode && !$item_ary['cat'])
|
||||
(!$id && !$mode && !$item_ary['cat'] && $item_ary['display'])
|
||||
)
|
||||
{
|
||||
if ($item_ary['cat'])
|
||||
|
|
|
@ -111,7 +111,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
|||
$ids = array($ids);
|
||||
}
|
||||
|
||||
$update_sql = $empty_forums = array();
|
||||
$update_sql = $empty_forums = $not_empty_forums = array();
|
||||
|
||||
if (sizeof($ids) == 1)
|
||||
{
|
||||
|
@ -139,9 +139,14 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
|||
}
|
||||
|
||||
if ($type == 'forum')
|
||||
{
|
||||
$not_empty_forums[] = $row['forum_id'];
|
||||
|
||||
if (empty($row['last_post_id']))
|
||||
{
|
||||
$empty_forums[] = $row['forum_id'];
|
||||
}
|
||||
}
|
||||
|
||||
$last_post_ids[] = $row['last_post_id'];
|
||||
}
|
||||
|
@ -149,7 +154,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
|||
|
||||
if ($type == 'forum')
|
||||
{
|
||||
$empty_forums = array_diff($ids, $empty_forums);
|
||||
$empty_forums = array_merge($empty_forums, array_diff($ids, $not_empty_forums));
|
||||
|
||||
foreach ($empty_forums as $void => $forum_id)
|
||||
{
|
||||
|
|
|
@ -344,7 +344,7 @@ function user_delete($mode, $user_id, $post_username = false)
|
|||
break;
|
||||
}
|
||||
|
||||
$table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE);
|
||||
$table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE, MODERATOR_CACHE_TABLE);
|
||||
|
||||
foreach ($table_ary as $table)
|
||||
{
|
||||
|
@ -353,6 +353,8 @@ function user_delete($mode, $user_id, $post_username = false)
|
|||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
$cache->destroy('sql', MODERATOR_CACHE_TABLE);
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
|
||||
|
||||
// Remove any undelivered mails...
|
||||
|
@ -1241,13 +1243,23 @@ function validate_email($email)
|
|||
/**
|
||||
* Remove avatar
|
||||
*/
|
||||
function avatar_delete($id)
|
||||
function avatar_delete($mode, $row)
|
||||
{
|
||||
global $phpbb_root_path, $config, $db, $user;
|
||||
|
||||
if (file_exists($phpbb_root_path . $config['avatar_path'] . '/' . basename($id)))
|
||||
// Check if the users avatar is actually *not* a group avatar
|
||||
if ($mode == 'user')
|
||||
{
|
||||
@unlink($phpbb_root_path . $config['avatar_path'] . '/' . basename($id));
|
||||
if (strpos($row['user_avatar'], 'g' . $row['group_id'] . '_') === 0 || strpos($row['user_avatar'], $row['user_id'] . '_') !== 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (file_exists($phpbb_root_path . $config['avatar_path'] . '/' . basename($row[$mode . '_avatar'])))
|
||||
{
|
||||
@unlink($phpbb_root_path . $config['avatar_path'] . '/' . basename($row[$mode . '_avatar']));
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -1616,7 +1628,7 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
|
|||
*/
|
||||
function group_delete($group_id, $group_name = false)
|
||||
{
|
||||
global $db;
|
||||
global $db, $phpbb_root_path, $phpEx;
|
||||
|
||||
if (!$group_name)
|
||||
{
|
||||
|
@ -1668,6 +1680,11 @@ function group_delete($group_id, $group_name = false)
|
|||
$db->sql_query($sql);
|
||||
|
||||
// Re-cache moderators
|
||||
if (!function_exists('cache_moderators'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
}
|
||||
|
||||
cache_moderators();
|
||||
|
||||
add_log('admin', 'LOG_GROUP_DELETE', $group_name);
|
||||
|
@ -2056,7 +2073,7 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal
|
|||
if (in_array('user_avatar', array_keys($sql_ary)))
|
||||
{
|
||||
// Ok, get the original avatar data from users having an uploaded one (we need to remove these from the filesystem)
|
||||
$sql = 'SELECT user_id, user_avatar
|
||||
$sql = 'SELECT user_id, group_id, user_avatar
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('user_id', $user_id_ary) . '
|
||||
AND user_avatar_type = ' . AVATAR_UPLOAD;
|
||||
|
@ -2064,7 +2081,7 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal
|
|||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
avatar_delete($row['user_avatar']);
|
||||
avatar_delete('user', $row);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
@ -2073,6 +2090,8 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal
|
|||
WHERE ' . $db->sql_in_set('user_id', $user_id_ary);
|
||||
$db->sql_query($sql);
|
||||
|
||||
if (in_array('user_colour', array_keys($sql_ary)))
|
||||
{
|
||||
// Update any cached colour information for these users
|
||||
$sql = 'UPDATE ' . FORUMS_TABLE . " SET forum_last_poster_colour = '" . $db->sql_escape($sql_ary['user_colour']) . "'
|
||||
WHERE " . $db->sql_in_set('forum_last_poster_id', $user_id_ary);
|
||||
|
@ -2086,6 +2105,7 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal
|
|||
WHERE " . $db->sql_in_set('topic_last_poster_id', $user_id_ary);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get group name
|
||||
|
@ -2224,6 +2244,10 @@ function group_update_listings($group_id)
|
|||
|
||||
if ($mod_permissions)
|
||||
{
|
||||
if (!function_exists('cache_moderators'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
}
|
||||
cache_moderators();
|
||||
}
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ class fulltext_native extends search_backend
|
|||
{
|
||||
if ($row['word_common'])
|
||||
{
|
||||
$this->common_words[] = $row['wort_text'];
|
||||
$this->common_words[] = $row['word_text'];
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -496,7 +496,7 @@ class ucp_groups
|
|||
{
|
||||
if (isset($group_row['group_avatar']) && $group_row['group_avatar'])
|
||||
{
|
||||
avatar_delete($group_row['group_avatar']);
|
||||
avatar_delete('group', $group_row);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -597,11 +597,7 @@ class ucp_profile
|
|||
// Delete old avatar if present
|
||||
if ($user->data['user_avatar'] && $filename != $user->data['user_avatar'] && $user->data['user_avatar_type'] != AVATAR_GALLERY)
|
||||
{
|
||||
// Check if the users avatar is actually a group avatar
|
||||
if (strpos($user->data['user_avatar'], 'g' . $user->data['group_id'] . '_') !== 0 && strpos($user->data['user_avatar'], $user->data['user_id'] . '_') === 0)
|
||||
{
|
||||
avatar_delete($user->data['user_avatar']);
|
||||
}
|
||||
avatar_delete('user', $user->data);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,9 @@ class ucp_register
|
|||
$user->lang_path = $phpbb_root_path . 'language/' . $lang . '/';
|
||||
$user->lang = array();
|
||||
$user->add_lang(array('common', 'ucp'));
|
||||
|
||||
// Setting back agreed to let the user view the agreement in his/her language
|
||||
$agreed = (empty($_GET['change_lang'])) ? 0 : $agreed;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -61,6 +64,8 @@ class ucp_register
|
|||
//
|
||||
if (!$agreed)
|
||||
{
|
||||
$add_lang = ($change_lang) ? '&change_lang=' . urlencode($change_lang) : '';
|
||||
|
||||
if ($coppa === false && $config['coppa_enable'])
|
||||
{
|
||||
$now = getdate();
|
||||
|
@ -71,11 +76,12 @@ class ucp_register
|
|||
'L_COPPA_NO' => sprintf($user->lang['UCP_COPPA_BEFORE'], $coppa_birthday),
|
||||
'L_COPPA_YES' => sprintf($user->lang['UCP_COPPA_ON_AFTER'], $coppa_birthday),
|
||||
|
||||
'U_COPPA_NO' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register&coppa=0'),
|
||||
'U_COPPA_YES' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register&coppa=1'),
|
||||
'U_COPPA_NO' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register&coppa=0' . $add_lang),
|
||||
'U_COPPA_YES' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register&coppa=1' . $add_lang),
|
||||
|
||||
'S_SHOW_COPPA' => true,
|
||||
'S_REGISTER_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'))
|
||||
'S_HIDDEN_FIELDS' => ($confirm_id) ? '<input type="hidden" name="confirm_id" value="' . $confirm_id . '" />' : '',
|
||||
'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register' . $add_lang))
|
||||
);
|
||||
}
|
||||
else
|
||||
|
@ -85,7 +91,8 @@ class ucp_register
|
|||
|
||||
'S_SHOW_COPPA' => false,
|
||||
'S_REGISTRATION' => true,
|
||||
'S_REGISTER_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'))
|
||||
'S_HIDDEN_FIELDS' => ($confirm_id) ? '<input type="hidden" name="confirm_id" value="' . $confirm_id . '" />' : '',
|
||||
'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register' . $add_lang))
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -93,6 +100,16 @@ class ucp_register
|
|||
return;
|
||||
}
|
||||
|
||||
// Try to manually determine the timezone
|
||||
$timezone = date('Z') / 3600;
|
||||
$is_dst = date('I');
|
||||
$timezone = ($is_dst) ? $timezone - 1 : $timezone;
|
||||
|
||||
if (!isset($user->lang['tz_zones'][(string) $timezone]))
|
||||
{
|
||||
$timezone = $config['board_timezone'];
|
||||
}
|
||||
|
||||
$var_ary = array(
|
||||
'username' => (string) '',
|
||||
'password_confirm' => (string) '',
|
||||
|
@ -101,8 +118,8 @@ class ucp_register
|
|||
'email' => (string) '',
|
||||
'email_confirm' => (string) '',
|
||||
'confirm_code' => (string) '',
|
||||
'lang' => (string) $config['default_lang'],
|
||||
'tz' => (float) $config['board_timezone'],
|
||||
'lang' => (string) $user->lang_name,
|
||||
'tz' => (float) $timezone,
|
||||
);
|
||||
|
||||
// If we change the language inline, we do not want to display errors, but pre-fill already filled out values
|
||||
|
@ -263,6 +280,7 @@ class ucp_register
|
|||
'user_email' => $email,
|
||||
'group_id' => (int) $group_id,
|
||||
'user_timezone' => (float) $tz,
|
||||
'user_dst' => $is_dst,
|
||||
'user_lang' => $lang,
|
||||
'user_type' => $user_type,
|
||||
'user_actkey' => $user_actkey,
|
||||
|
@ -351,7 +369,7 @@ class ucp_register
|
|||
|
||||
if (sizeof($admin_ary))
|
||||
{
|
||||
$where_sql .= ' OR ' . $db->sql_in_set('user_id', $admin_ary[0]['a_user']);
|
||||
$where_sql .= ' OR ' . $db->sql_in_set('user_id', $admin_ary);
|
||||
}
|
||||
|
||||
$sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type
|
||||
|
@ -472,7 +490,7 @@ class ucp_register
|
|||
$pass_char_ary = array('.*' => 'PASS_TYPE_ANY', '[a-zA-Z]' => 'PASS_TYPE_CASE', '[a-zA-Z0-9]' => 'PASS_TYPE_ALPHA', '[a-zA-Z\W]' => 'PASS_TYPE_SYMBOL');
|
||||
|
||||
$lang = (isset($lang)) ? $lang : $config['default_lang'];
|
||||
$tz = (isset($tz)) ? $tz : $config['board_timezone'];
|
||||
$tz = (isset($tz)) ? $tz : $timezone;
|
||||
|
||||
//
|
||||
$template->assign_vars(array(
|
||||
|
|
|
@ -1394,6 +1394,21 @@ class install_install extends module
|
|||
$_module->move_module_by($row, 'move_up', 5);
|
||||
}
|
||||
|
||||
if ($module_class == 'ucp')
|
||||
{
|
||||
// Move attachment module 4 down...
|
||||
$sql = 'SELECT *
|
||||
FROM ' . MODULES_TABLE . "
|
||||
WHERE module_basename = 'attachments'
|
||||
AND module_class = 'ucp'
|
||||
AND module_mode = 'attachments'";
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$_module->move_module_by($row, 'move_down', 4);
|
||||
}
|
||||
|
||||
// And now for the special ones
|
||||
// (these are modules which appear in multiple categories and thus get added manually to some for more control)
|
||||
if (isset($this->module_extras[$module_class]))
|
||||
|
|
|
@ -635,8 +635,11 @@ INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mo
|
|||
INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Archives', 0, 1, 1, '', 0, '');
|
||||
INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Plain Text', 0, 0, 1, '', 0, '');
|
||||
INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Documents', 0, 0, 1, '', 0, '');
|
||||
INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Real Media', 3, 0, 2, '', 0, '');
|
||||
INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Real Media', 3, 0, 1, '', 0, '');
|
||||
INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Windows Media', 2, 0, 1, '', 0, '');
|
||||
INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Flash Files', 5, 0, 1, '', 0, '');
|
||||
INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Quicktime Media', 6, 0, 1, '', 0, '');
|
||||
INSERT INTO phpbb_extension_groups (group_name, cat_id, allow_group, download_mode, upload_icon, max_filesize, allowed_forums) VALUES ('Downloadable Files', 0, 0, 1, '', 0, '');
|
||||
|
||||
# -- extensions
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'gif');
|
||||
|
@ -644,19 +647,32 @@ INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'png');
|
|||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'jpeg');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'jpg');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'tif');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'tiff');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (1, 'tga');
|
||||
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'gtar');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'gz');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'tar');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'zip');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'rar');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'ace');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'torrent');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'tgz');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, 'bz2');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (2, '7z');
|
||||
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'txt');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'c');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'h');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'cpp');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'hpp');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'diz');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'csv');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'ini');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'log');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'js');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (3, 'xml');
|
||||
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'xls');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'doc');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'dot');
|
||||
|
@ -664,8 +680,32 @@ INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'pdf');
|
|||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'ai');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'ps');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'ppt');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'odg');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'odp');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'ods');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'odt');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (4, 'rtf');
|
||||
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (5, 'rm');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (5, 'ram');
|
||||
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (6, 'wma');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (6, 'wmv');
|
||||
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (7, 'swf');
|
||||
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'mov');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'm4v');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'm4a');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'mp4');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, '3gp');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, '3g2');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (8, 'qt');
|
||||
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'mpeg');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'mpg');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'mp3');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogg');
|
||||
INSERT INTO phpbb_extensions (group_id, extension) VALUES (9, 'ogm');
|
||||
|
||||
# POSTGRES COMMIT #
|
|
@ -59,7 +59,9 @@ $lang = array_merge($lang, array(
|
|||
'ATTACH_QUOTA_EXPLAIN' => 'Maximum drive space available for attachments in total, 0 is unlimited.',
|
||||
'ATTACH_TO_POST' => 'Attach file to post',
|
||||
|
||||
'CAT_FLASH_FILES' => 'Flash Files',
|
||||
'CAT_IMAGES' => 'Images',
|
||||
'CAT_QUICKTIME_FILES' => 'Quicktime Media',
|
||||
'CAT_RM_FILES' => 'Real Media Streams',
|
||||
'CAT_WM_FILES' => 'Window Media Streams',
|
||||
'CREATE_GROUP' => 'Create new group',
|
||||
|
|
|
@ -396,7 +396,7 @@ $lang = array_merge($lang, array(
|
|||
'SMTP_DIGEST_MD5' => 'DIGEST-MD5',
|
||||
'SMTP_LOGIN' => 'LOGIN',
|
||||
'SMTP_PASSWORD' => 'SMTP Password',
|
||||
'SMTP_PASSWORD_EXPLAIN' => 'Only enter a password if your smtp server requires it.',
|
||||
'SMTP_PASSWORD_EXPLAIN' => 'Only enter a password if your SMTP server requires it.',
|
||||
'SMTP_PLAIN' => 'PLAIN',
|
||||
'SMTP_POP_BEFORE_SMTP' => 'POP-BEFORE-SMTP',
|
||||
'SMTP_PORT' => 'SMTP Server Port',
|
||||
|
|
|
@ -362,6 +362,7 @@ $lang = array_merge($lang, array(
|
|||
|
||||
'PAGE_OF' => 'Page <strong>%1$d</strong> of <strong>%2$d</strong>',
|
||||
'PASSWORD' => 'Password',
|
||||
'PLAY_QUICKTIME_FILE' => 'Play quicktime file',
|
||||
'PM' => 'PM',
|
||||
'POSTING_MESSAGE' => 'Posting message in %s',
|
||||
'POST' => 'Post',
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF _file.S_WM_FILE -->
|
||||
<object id="wmp" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
|
||||
<param name="FileName" value="{_file.U_DOWNLOAD_LINK}">
|
||||
<object classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
|
||||
<param name="FileName" VALUE="{_file.U_DOWNLOAD_LINK}">
|
||||
<param name="ShowControls" value="1">
|
||||
<param name="ShowDisplay" value="0">
|
||||
<param name="ShowStatusBar" value="1">
|
||||
|
@ -38,30 +38,46 @@
|
|||
<param name="Visible" value="1">
|
||||
<param name="AnimationStart" value="0">
|
||||
<param name="Loop" value="0">
|
||||
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows95/downloads/contents/wurecommended/s_wufeatured/mediaplayer/default.asp" src="{_file.U_DOWNLOAD_LINK}" name=MediaPlayer2 showcontrols=1 showdisplay=0 showstatusbar=1 autosize=1 autostart=0 visible=1 animationatstart=0 loop=0></embed>
|
||||
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows/windowsmedia/download/AllDownloads.aspx/" filename="{_file.U_DOWNLOAD_LINK}" src="{_file.U_DOWNLOAD_LINK}" name="MediaPlayer" ShowControls="1" ShowDisplay="0" ShowStatusBar="1" AutoSize="1" AutoStart="0" Visible="1" AnimationStart="0" Loop="0"></embed>
|
||||
</object>
|
||||
<br />
|
||||
<span class="gensmall">{_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOADED_VIEWED} {_file.L_DOWNLOAD_COUNT} ]</span>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF _file.S_RM_FILE -->
|
||||
<object id=rmstream_{_file.ATTACH_ID} classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="200" height="50">
|
||||
<param name="src" value="{_file.U_FORUM}/{_file.U_DOWNLOAD_LINK}">
|
||||
<!-- ELSEIF _file.S_FLASH_FILE -->
|
||||
<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{_file.WIDTH}" height="{_file.HEIGHT}">
|
||||
<param name="movie" value="{_file.U_DOWNLOAD_LINK}" />
|
||||
<param name="play" value="true" />
|
||||
<param name="loop" value="true" />
|
||||
<param name="quality" value="high" />
|
||||
<param name="allowScriptAccess" value="never" />
|
||||
<embed src="{_file.U_DOWNLOAD_LINK}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{_file.WIDTH}" height="{_file.HEIGHT}" play="true" loop="true" quality="high" allowscriptaccess="never"></embed>
|
||||
</object>
|
||||
<!-- ELSEIF _file.S_QUICKTIME_FILE -->
|
||||
<object id="qtstream_{_file.ATTACH_ID}" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0" width="0" height="16">
|
||||
<param name="src" value="{_file.U_DOWNLOAD_LINK}">
|
||||
<param name="controller" value="true">
|
||||
<param name="autoplay" value="false" />
|
||||
<param name="type" value="video/quicktime">
|
||||
<embed name="qtstream_{_file.ATTACH_ID}" src="{_file.U_DOWNLOAD_LINK}" pluginspage="http://www.apple.com/quicktime/download/" enablejavascript="true" controller="true" width="0" height="16" type="video/quicktime" autoplay="false">
|
||||
</object>
|
||||
<!-- ELSEIF _file.S_RM_FILE -->
|
||||
<object id="rmstream_{_file.ATTACH_ID}" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="200" height="50">
|
||||
<param name="src" value="{_file.U_DOWNLOAD_LINK}">
|
||||
<param name="autostart" value="false">
|
||||
<param name="controls" value="ImageWindow">
|
||||
<param name="console" value="{_file.U_DOWNLOAD_LINK}">
|
||||
<param name="prefetch" value="true">
|
||||
<embed name=rmstream_{_file.ATTACH_ID} type="audio/x-pn-realaudio-plugin" src="{_file.U_FORUM}/{_file.U_DOWNLOAD_LINK}" width="0" height="0" autostart="false" controls="ImageWindow" console="video" prefetch="true"></embed>
|
||||
<param name="console" value="ctrls_{_file.ATTACH_ID}">
|
||||
<param name="prefetch" value="false">
|
||||
<embed name="rmstream_{_file.ATTACH_ID}" type="audio/x-pn-realaudio-plugin" src="{_file.U_DOWNLOAD_LINK}" width="0" height="0" autostart="false" controls="ImageWindow" console="ctrls_{_file.ATTACH_ID}" prefetch="false"></embed>
|
||||
</object>
|
||||
<br />
|
||||
<object id=ctrls_{_file.ATTACH_ID} classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="0" height="36">
|
||||
<object id="ctrls_{_file.ATTACH_ID}" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="0" height="36">
|
||||
<param name="controls" value="ControlPanel">
|
||||
<param name="console" value="{_file.U_DOWNLOAD_LINK}">
|
||||
<embed name=ctrls_{_file.ATTACH_ID} type="audio/x-pn-realaudio-plugin" width="200" height="36" controls="ControlPanel" console="video"></embed>
|
||||
<param name="console" value="ctrls_{_file.ATTACH_ID}">
|
||||
<embed name="ctrls_{_file.ATTACH_ID}" type="audio/x-pn-realaudio-plugin" width="200" height="36" controls="ControlPanel" console="ctrls_{_file.ATTACH_ID}"></embed>
|
||||
</object>
|
||||
|
||||
<script language="Javascript">
|
||||
<!--
|
||||
if (document.rmstream_{_file.ATTACH_ID}.GetClipWidth)
|
||||
{
|
||||
while (!document.rmstream_{_file.ATTACH_ID}.GetClipWidth())
|
||||
{
|
||||
}
|
||||
|
@ -72,9 +88,14 @@
|
|||
document.rmstream_{_file.ATTACH_ID}.width = width;
|
||||
document.rmstream_{_file.ATTACH_ID}.height = height;
|
||||
document.ctrls_{_file.ATTACH_ID}.width = width;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF _file.S_WM_FILE or _file.S_RM_FILE or _file.S_FLASH_FILE or _file.S_QUICKTIME_FILE -->
|
||||
<br />
|
||||
<!-- IF _file.S_QUICKTIME_FILE --><a href="javascript:play_qt_file(document.qtstream_{_file.ATTACH_ID});">[ {L_PLAY_QUICKTIME_FILE} ]</a> <!-- ENDIF -->
|
||||
<span class="gensmall">{_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOADED_VIEWED} {_file.L_DOWNLOAD_COUNT} ]</span>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
|
|
@ -50,10 +50,12 @@
|
|||
</td>
|
||||
</tr>
|
||||
<!-- IF S_DISPLAY_FULL_LOGIN -->
|
||||
<!-- IF S_AUTOLOGIN_ENABLED -->
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><input type="checkbox" class="radio" name="autologin" tabindex="3" /> <span class="gensmall">{L_LOG_ME_IN}</span></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><input type="checkbox" class="radio" name="viewonline" tabindex="4" /> <span class="gensmall">{L_HIDE_ME}</span></td>
|
||||
|
|
|
@ -75,6 +75,44 @@ function marklist(id, name, state)
|
|||
}
|
||||
}
|
||||
|
||||
<!-- IF ._file -->
|
||||
|
||||
/**
|
||||
* Play quicktime file by determining it's width/height
|
||||
* from the displayed rectangle area
|
||||
*
|
||||
* Only defined if there is a file block present.
|
||||
*/
|
||||
function play_qt_file(obj)
|
||||
{
|
||||
var rectangle = obj.GetRectangle();
|
||||
|
||||
if (rectangle)
|
||||
{
|
||||
rectangle = rectangle.split(',')
|
||||
var x1 = parseInt(rectangle[0]);
|
||||
var x2 = parseInt(rectangle[2]);
|
||||
var y1 = parseInt(rectangle[1]);
|
||||
var y2 = parseInt(rectangle[3]);
|
||||
|
||||
var width = (x1 < 0) ? (x1 * -1) + x2 : x2 - x1;
|
||||
var height = (y1 < 0) ? (y1 * -1) + y2 : y2 - y1;
|
||||
}
|
||||
else
|
||||
{
|
||||
var width = 200;
|
||||
var height = 0;
|
||||
}
|
||||
|
||||
obj.width = width;
|
||||
obj.height = height + 16;
|
||||
|
||||
obj.SetControllerVisible(true);
|
||||
|
||||
obj.Play();
|
||||
}
|
||||
<!-- ENDIF -->
|
||||
|
||||
//-->
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
<td>
|
||||
<span class="genmed"><br />{L_TERMS_OF_USE}<br /><br /></span>
|
||||
<div align="center">
|
||||
<input class="btnlite" type="submit" name="agreed" value="{L_AGREE}"><br /><br />
|
||||
<input class="btnlite" type="submit" name="not_agreed" value="{L_NOT_AGREE}">
|
||||
<input class="btnlite" type="submit" name="agreed" value="{L_AGREE}" /><br /><br />
|
||||
<input class="btnlite" type="submit" name="not_agreed" value="{L_NOT_AGREE}" />
|
||||
</div>
|
||||
</td>
|
||||
<!-- ENDIF -->
|
||||
|
@ -28,7 +28,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{S_HIDDEN_FIELDS}
|
||||
</form>
|
||||
|
||||
<!-- ELSEIF S_AGREEMENT -->
|
||||
|
|
Loading…
Add table
Reference in a new issue