mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
- some fixes/changes
git-svn-id: file:///svn/phpbb/trunk@5035 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
3c6c673476
commit
5ac4556ef1
9 changed files with 31 additions and 66 deletions
|
@ -147,6 +147,8 @@ $log_data = array();
|
||||||
$log_count = 0;
|
$log_count = 0;
|
||||||
view_log($mode, $log_data, $log_count, $config['topics_per_page'], $start, $forum_id, 0, 0, $sql_where, $sql_sort);
|
view_log($mode, $log_data, $log_count, $config['topics_per_page'], $start, $forum_id, 0, 0, $sql_where, $sql_sort);
|
||||||
|
|
||||||
|
$row_class = '';
|
||||||
|
|
||||||
if ($log_count)
|
if ($log_count)
|
||||||
{
|
{
|
||||||
for ($i = 0; $i < sizeof($log_data); $i++)
|
for ($i = 0; $i < sizeof($log_data); $i++)
|
||||||
|
@ -165,7 +167,7 @@ if ($log_count)
|
||||||
|
|
||||||
foreach (array('viewtopic', 'viewlogs', 'viewforum') as $check)
|
foreach (array('viewtopic', 'viewlogs', 'viewforum') as $check)
|
||||||
{
|
{
|
||||||
if ($log_data[$i][$check])
|
if (isset($log_data[$i][$check]) && $log_data[$i][$check])
|
||||||
{
|
{
|
||||||
$data[] = '<a href="' . $log_data[$i][$check] . '">' . $user->lang['LOGVIEW_' . strtoupper($check)] . '</a>';
|
$data[] = '<a href="' . $log_data[$i][$check] . '">' . $user->lang['LOGVIEW_' . strtoupper($check)] . '</a>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
class acm
|
class acm
|
||||||
{
|
{
|
||||||
var $vars = '';
|
var $vars = array();
|
||||||
var $var_expires = array();
|
var $var_expires = array();
|
||||||
var $is_modified = FALSE;
|
var $is_modified = FALSE;
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ class acm
|
||||||
|
|
||||||
if (file_exists($this->cache_dir . 'data_global.' . $phpEx))
|
if (file_exists($this->cache_dir . 'data_global.' . $phpEx))
|
||||||
{
|
{
|
||||||
if (!is_array($this->vars))
|
if (!sizeof($this->vars))
|
||||||
{
|
{
|
||||||
$this->load();
|
$this->load();
|
||||||
}
|
}
|
||||||
|
@ -190,7 +190,7 @@ class acm
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!is_array($this->vars))
|
if (!sizeof($this->vars))
|
||||||
{
|
{
|
||||||
$this->load();
|
$this->load();
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@ class bbcode
|
||||||
if ($bbcode_bitfield !== false)
|
if ($bbcode_bitfield !== false)
|
||||||
{
|
{
|
||||||
$this->bbcode_bitfield = $bbcode_bitfield;
|
$this->bbcode_bitfield = $bbcode_bitfield;
|
||||||
|
|
||||||
// Init those added with a new bbcode_bitfield (already stored codes will not get parsed again)
|
// Init those added with a new bbcode_bitfield (already stored codes will not get parsed again)
|
||||||
$this->bbcode_cache_init();
|
$this->bbcode_cache_init();
|
||||||
}
|
}
|
||||||
|
@ -112,7 +113,7 @@ class bbcode
|
||||||
|
|
||||||
if ($this->bbcode_bitfield & $user->theme['primary']['bbcode_bitfield'])
|
if ($this->bbcode_bitfield & $user->theme['primary']['bbcode_bitfield'])
|
||||||
{
|
{
|
||||||
$style = (file_exists($phpbb_root_path . 'styles/templates/' . $user->theme['primary']['template_path'] . '/bbcode.html')) ? 'primary' : 'secondary';
|
$style = (file_exists($phpbb_root_path . 'styles/' . $user->theme['primary']['template_path'] . '/template/bbcode.html')) ? 'primary' : 'secondary';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -500,11 +500,17 @@ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_
|
||||||
$attachment_tpl = array();
|
$attachment_tpl = array();
|
||||||
|
|
||||||
// Generate Template
|
// Generate Template
|
||||||
// TODO: secondary template
|
$style = 'primary';
|
||||||
$template_filename = $phpbb_root_path . 'styles/' . $user->theme['primary']['template_path'] . '/template/attachment.html';
|
|
||||||
|
if (!empty($user->theme['secondary']))
|
||||||
|
{
|
||||||
|
$style = (file_exists($phpbb_root_path . 'styles/' . $user->theme['primary']['template_path'] . '/template/attachment.html')) ? 'primary' : 'secondary';
|
||||||
|
}
|
||||||
|
|
||||||
|
$template_filename = $phpbb_root_path . 'styles/' . $user->theme[$style]['template_path'] . '/template/attachment.html';
|
||||||
if (!($fp = @fopen($template_filename, 'rb')))
|
if (!($fp = @fopen($template_filename, 'rb')))
|
||||||
{
|
{
|
||||||
trigger_error('Could not load attachment template');
|
trigger_error('Could not load template file "' . $template_filename . '"');
|
||||||
}
|
}
|
||||||
$attachment_template = fread($fp, filesize($template_filename));
|
$attachment_template = fread($fp, filesize($template_filename));
|
||||||
@fclose($fp);
|
@fclose($fp);
|
||||||
|
|
|
@ -11,13 +11,6 @@
|
||||||
//
|
//
|
||||||
// -------------------------------------------------------------
|
// -------------------------------------------------------------
|
||||||
|
|
||||||
/*
|
|
||||||
TODO list for M-3:
|
|
||||||
- add other languages to syntax highlighter
|
|
||||||
- better (and unified, wrt other pages such as registration) validation for urls, emails, etc...
|
|
||||||
- need size limit checks on img/flash tags ... probably warrants some discussion
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (!defined('IN_PHPBB'))
|
if (!defined('IN_PHPBB'))
|
||||||
{
|
{
|
||||||
exit;
|
exit;
|
||||||
|
@ -718,6 +711,7 @@ class parse_message extends bbcode_firstpass
|
||||||
if ($config['max_' . $mode . '_urls'] && $num_urls > $config['max_' . $mode . '_urls'])
|
if ($config['max_' . $mode . '_urls'] && $num_urls > $config['max_' . $mode . '_urls'])
|
||||||
{
|
{
|
||||||
$this->warn_msg[] = sprintf($user->lang['TOO_MANY_URLS'], $config['max_' . $mode . '_urls']);
|
$this->warn_msg[] = sprintf($user->lang['TOO_MANY_URLS'], $config['max_' . $mode . '_urls']);
|
||||||
|
return $this->warn_msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$update_this_message)
|
if (!$update_this_message)
|
||||||
|
@ -729,7 +723,6 @@ class parse_message extends bbcode_firstpass
|
||||||
|
|
||||||
$this->message_status = 'parsed';
|
$this->message_status = 'parsed';
|
||||||
return;
|
return;
|
||||||
//return implode('<br />', $this->warn_msg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Formatting text for display
|
// Formatting text for display
|
||||||
|
|
|
@ -157,7 +157,7 @@ class template
|
||||||
trigger_error("template->_tpl_load(): No file specified for handle $handle", E_USER_ERROR);
|
trigger_error("template->_tpl_load(): No file specified for handle $handle", E_USER_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!file_exists($this->files[$handle]))
|
if (!file_exists($this->files[$handle]) && !empty($user->theme['secondary']))
|
||||||
{
|
{
|
||||||
$this->tpl = 'secondary';
|
$this->tpl = 'secondary';
|
||||||
$this->files[$handle] = $phpbb_root_path . 'styles/' . $user->theme['secondary']['template_path'] . '/template/' . $this->filename[$handle];
|
$this->files[$handle] = $phpbb_root_path . 'styles/' . $user->theme['secondary']['template_path'] . '/template/' . $this->filename[$handle];
|
||||||
|
|
|
@ -15,7 +15,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $phpEx, $SID, $user, $template, $auth, $config, $db;
|
global $phpbb_root_path, $phpEx, $SID, $user, $template, $auth, $config, $db;
|
||||||
|
|
||||||
$user->add_lang('viewtopic');
|
$user->add_lang(array('viewtopic', 'memberlist'));
|
||||||
|
|
||||||
$msg_id = (int) $msg_id;
|
$msg_id = (int) $msg_id;
|
||||||
$folder_id = (int) $folder_id;
|
$folder_id = (int) $folder_id;
|
||||||
|
@ -412,6 +412,8 @@ function get_user_informations($user_id, $user_row)
|
||||||
$user_row['avatar'] = '<img src="' . $avatar_img . '" width="' . $user_row['user_avatar_width'] . '" height="' . $user_row['user_avatar_height'] . '" border="0" alt="" />';
|
$user_row['avatar'] = '<img src="' . $avatar_img . '" width="' . $user_row['user_avatar_width'] . '" height="' . $user_row['user_avatar_height'] . '" border="0" alt="" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$user_row['rank_title'] = $user_row['rank_image'] = '';
|
||||||
|
|
||||||
if (!empty($user_row['user_rank']))
|
if (!empty($user_row['user_rank']))
|
||||||
{
|
{
|
||||||
$user_row['rank_title'] = $ranks['special'][$user_row['user_rank']]['rank_title'];
|
$user_row['rank_title'] = $ranks['special'][$user_row['user_rank']]['rank_title'];
|
||||||
|
|
|
@ -144,12 +144,12 @@ $lang += array(
|
||||||
'LOG_PRUNE' => '<b>Pruned forums</b><br />» %s',
|
'LOG_PRUNE' => '<b>Pruned forums</b><br />» %s',
|
||||||
'LOG_AUTO_PRUNE' => '<b>Auto-pruned forums</b><br />» %s',
|
'LOG_AUTO_PRUNE' => '<b>Auto-pruned forums</b><br />» %s',
|
||||||
|
|
||||||
'LOG_BAN_EXCLUDE_USER' => '<b>Excluded user from ban</b> for reason %s<br />» %s ',
|
'LOG_BAN_EXCLUDE_USER' => '<b>Excluded user from ban</b> for reason "<i>%s</i>"<br />» %s ',
|
||||||
'LOG_BAN_EXCLUDE_IP' => '<b>Excluded ip from ban</b> for reason %s<br />» %s ',
|
'LOG_BAN_EXCLUDE_IP' => '<b>Excluded ip from ban</b> for reason "<i>%s</i>"<br />» %s ',
|
||||||
'LOG_BAN_EXCLUDE_EMAIL' => '<b>Excluded email from ban</b> for reason %s<br />» %s ',
|
'LOG_BAN_EXCLUDE_EMAIL' => '<b>Excluded email from ban</b> for reason "<i>%s</i>"<br />» %s ',
|
||||||
'LOG_BAN_USER' => '<b>Banned User</b> for reason %s<br />» %s ',
|
'LOG_BAN_USER' => '<b>Banned User</b> for reason "<i>%s</i>"<br />» %s ',
|
||||||
'LOG_BAN_IP' => '<b>Banned ip</b> for reason %s<br />» %s',
|
'LOG_BAN_IP' => '<b>Banned ip</b> for reason "<i>%s</i>"<br />» %s',
|
||||||
'LOG_BAN_EMAIL' => '<b>Banned email</b> for reason %s<br />» %s',
|
'LOG_BAN_EMAIL' => '<b>Banned email</b> for reason "<i>%s</i>"<br />» %s',
|
||||||
'LOG_UNBAN_USER' => '<b>Unbanned user</b><br />» %s',
|
'LOG_UNBAN_USER' => '<b>Unbanned user</b><br />» %s',
|
||||||
'LOG_UNBAN_IP' => '<b>Unbanned ip</b><br />» %s',
|
'LOG_UNBAN_IP' => '<b>Unbanned ip</b><br />» %s',
|
||||||
'LOG_UNBAN_EMAIL' => '<b>Unbanned email</b><br />» %s',
|
'LOG_UNBAN_EMAIL' => '<b>Unbanned email</b><br />» %s',
|
||||||
|
|
|
@ -52,52 +52,14 @@
|
||||||
<table class="tablebg" width="100%" cellspacing="1" cellpadding="0">
|
<table class="tablebg" width="100%" cellspacing="1" cellpadding="0">
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th width="150" nowrap="nowrap">{L_AUTHOR}</th>
|
|
||||||
<th nowrap="nowrap">{L_MESSAGE}</th>
|
<th nowrap="nowrap">{L_MESSAGE}</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
|
<td class="spacer" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr class="row1">
|
<tr class="row1">
|
||||||
<td valign="top">
|
|
||||||
|
|
||||||
<div align="center">
|
|
||||||
|
|
||||||
<b class="postauthor">{AUTHOR_NAME}</b><br /><br />
|
|
||||||
|
|
||||||
<table cellspacing="4" align="center">
|
|
||||||
<!-- IF ONLINE_IMG -->
|
|
||||||
<tr>
|
|
||||||
<td>{ONLINE_IMG}</td>
|
|
||||||
</tr>
|
|
||||||
<!-- ENDIF -->
|
|
||||||
<!-- IF AUTHOR_RANK -->
|
|
||||||
<tr>
|
|
||||||
<td class="postdetails">{AUTHOR_RANK}</td>
|
|
||||||
</tr>
|
|
||||||
<!-- ENDIF -->
|
|
||||||
<!-- IF RANK_IMAGE -->
|
|
||||||
<tr>
|
|
||||||
<td>{RANK_IMAGE}</td>
|
|
||||||
</tr>
|
|
||||||
<!-- ENDIF -->
|
|
||||||
<!-- IF AUTHOR_AVATAR -->
|
|
||||||
<tr>
|
|
||||||
<td>{AUTHOR_AVATAR}</td>
|
|
||||||
</tr>
|
|
||||||
<!-- ENDIF -->
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<span class="postdetails">
|
|
||||||
<!-- IF AUTHOR_POSTS --><br /><b>{L_JOINED}:</b> {AUTHOR_JOINED}<!-- ENDIF -->
|
|
||||||
<!-- IF AUTHOR_POSTS --><br /><b>{L_POSTS}:</b> {AUTHOR_POSTS}<!-- ENDIF -->
|
|
||||||
<!-- IF AUTHOR_FROM --><br /><b>{L_LOCATION}:</b> {AUTHOR_FROM}<!-- ENDIF -->
|
|
||||||
</span>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td valign="top"><table width="100%" cellspacing="5">
|
<td valign="top"><table width="100%" cellspacing="5">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
@ -153,12 +115,11 @@
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr class="row1">
|
<tr class="row1">
|
||||||
<td></td>
|
|
||||||
<td><div class="gensmall" style="float:left"> <!-- IF U_AUTHOR_PROFILE --><a href="{U_AUTHOR_PROFILE}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF U_EMAIL --><a href="{U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF --> </div> <div class="gensmall" style="float:right"><!-- IF U_QUOTE --><a href="{U_QUOTE}">{QUOTE_IMG}</a> <!-- ENDIF --> <!-- IF U_POST_REPLY_PM --><a href="{U_POST_REPLY_PM}">{REPLY_IMG}</a><!-- ENDIF --> <!-- IF U_EDIT --><a href="{U_EDIT}">{EDIT_IMG}</a> <!-- ENDIF --> </div></td>
|
<td><div class="gensmall" style="float:left"> <!-- IF U_AUTHOR_PROFILE --><a href="{U_AUTHOR_PROFILE}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF U_EMAIL --><a href="{U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF --> </div> <div class="gensmall" style="float:right"><!-- IF U_QUOTE --><a href="{U_QUOTE}">{QUOTE_IMG}</a> <!-- ENDIF --> <!-- IF U_POST_REPLY_PM --><a href="{U_POST_REPLY_PM}">{REPLY_IMG}</a><!-- ENDIF --> <!-- IF U_EDIT --><a href="{U_EDIT}">{EDIT_IMG}</a> <!-- ENDIF --> </div></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
|
<td class="spacer" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue