Skip to content

Commit

Permalink
Various forums updates;
Browse files Browse the repository at this point in the history
  • Loading branch information
Bigjoos committed Oct 9, 2016
1 parent 6a61e40 commit b147d00
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion forums.php
Expand Up @@ -46,7 +46,7 @@
ini_set("upload_max_filesize", $Multi_forum['configs']['maxfilesize']);
$Multi_forum['configs']['attachment_dir'] = ROOT_DIR."uploads";
$Multi_forum['configs']['forum_width'] = '100%';
$Multi_forum['configs']['allowed_file_extensions'] = array('rar', 'zip');
$Multi_forum['configs']['allowed_file_extensions'] = array('rar', 'zip', 'gz');
$Multi_forum['configs']['maxsubjectlength'] = 80;
$Multi_forum['configs']['postsperpage'] = (empty($CURUSER['postsperpage']) ? 10 : (int)$CURUSER['postsperpage']);
$Multi_forum['configs']['use_flood_mod'] = true;
Expand Down
1 change: 1 addition & 0 deletions forums/forum_whodownloaded.php
Expand Up @@ -54,6 +54,7 @@
<meta name='generator' content='u-232.servebeer.com' />
<meta name='MSSmartTagsPreventParsing' content='TRUE' />
<title>Who Downloaded</title>
<link rel='stylesheet' href='{$INSTALLER09['baseurl']}/templates/{$CURUSER['stylesheet']}/{$CURUSER['stylesheet']}.css' type='text/css' />
</head>
<body>
<table width='100%' cellpadding='5' border='1'>
Expand Down
2 changes: 1 addition & 1 deletion forums/post_functions.php
Expand Up @@ -129,7 +129,7 @@ function insert_compose_frame($id, $newtopic = true, $quote = false, $attachment
/*<![CDATA[*/
function Preview()
{
document.compose.action = './forums/preview.php'
document.compose.action = './forums.php?action=preview'
document.compose.target = '_blank';
document.compose.submit();
return true;
Expand Down
8 changes: 3 additions & 5 deletions forums/preview.php
Expand Up @@ -36,18 +36,16 @@
echo $HTMLOUT;
exit();
}
$body = (isset($_POST['body']) ? htmlsafechars($_POST['body']) : '');
$HTMLOUT .= begin_main_frame();
$HTMLOUT .= begin_frame("Preview Post", true);
$HTMLOUT .='<form method="post" action="preview.php">
$HTMLOUT .='
<table width="80%" border="0" cellspacing="5" cellpadding="5" align="center">
<tr><td class="forum_head" colspan="2"><span style="font-weight: bold;">Preview</span></td></tr>
<tr><td width="80" valign="top" class="one">' . avatar_stuff($CURUSER) . '</td>
<td valign="top" align="left" class="two">' . format_comment($body) . '</td>
</tr></table><div align="center">
<input type="submit" class="btn" value="Preview" />
</div><br /><br />
</form>';
</div><br /><br />';
$HTMLOUT .= end_frame();
$HTMLOUT .= end_main_frame();
echo stdhead('Preview') . $HTMLOUT . stdfoot();
Expand Down
8 changes: 5 additions & 3 deletions forums/view_topic.php
Expand Up @@ -278,15 +278,17 @@ function srt($a, $b)
}
$topic_users_cache['topic_users'] = $topicusers;
$topic_users_cache['actcount'] = $actcount;
$mc1->cache_value($keys['now_viewing'], $topic_users_cache, $INSTALLER09['expires']['forum_users']);
$mc1->add_value($keys['now_viewing'], $topic_users_cache, $INSTALLER09['expires']['forum_users']);
}

if (!$topic_users_cache['topic_users'])
$topic_users_cache['topic_users'] = 'There have been no active users in the last 15 minutes.';
//$topic_users = '&nbsp;('.$topic_users_cache['actcount'].')';
//$forum_users = '&nbsp;('.$forum_users_cache['actcount'].')';
$topic_users = $topic_users_cache['topic_users'];
if ($topic_users != '') {
$topic_users = 'Currently viewing this topic: ' . $topic_users;
}

$HTMLOUT .= "<a href='forums.php?action=viewunread' class='button new_reply_button'><span>Show New</span></a>&nbsp;";
if ($maypost) {
$HTMLOUT .= "<a href='forums.php?action=reply&topicid=" . $topicid . "' class='button new_reply_button'><span>New Reply</span></a>&nbsp;";
Expand Down Expand Up @@ -457,7 +459,7 @@ function popitup(url) {
$body = (!empty($highlight) ? highlight(htmlsafechars(trim($highlight)), format_comment($arr['body'])) : format_comment($arr['body']));
if ($Multi_forum['configs']['use_attachment_mod'] && ((!empty($arr['at_filename']) && is_valid_id($arr['at_id'])) && $arr['at_postid'] == $postid)) {
foreach ($Multi_forum['configs']['allowed_file_extensions'] as $allowed_file_extension)
if (substr($arr['at_filename'], -3) == $allowed_file_extension)
if (substr($arr['at_filename'], -2) OR substr($arr['at_filename'], -3) == $allowed_file_extension)
$aimg = $allowed_file_extension;
$body .= "<div style='padding:6px'>
<fieldset class='fieldset'>
Expand Down
Binary file modified pic.tar.gz
Binary file not shown.

0 comments on commit b147d00

Please sign in to comment.