Add Message-ID search bar to header.
This commit is contained in:
parent
1cc18961d9
commit
c05b4ab308
|
@ -90,11 +90,8 @@ if (isset($user)) {
|
||||||
echo 'login';
|
echo 'login';
|
||||||
}
|
}
|
||||||
echo '</a>';
|
echo '</a>';
|
||||||
?>
|
echo '</td></tr>';
|
||||||
</td>
|
echo '</table>';
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
include($config_dir.'/fortunes.conf');
|
include($config_dir.'/fortunes.conf');
|
||||||
|
|
||||||
|
@ -122,6 +119,18 @@ foreach ($menulist as $menu) {
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
}
|
}
|
||||||
echo '</tr></table></p><p>';
|
echo '</tr></table></p><p>';
|
||||||
|
|
||||||
|
if($OVERRIDES['disable_msgid_search'] != true) {
|
||||||
|
echo '<table align="right">';
|
||||||
|
echo '<form name="form1" method="get" action="article-flat.php">';
|
||||||
|
echo '<tr>';
|
||||||
|
echo '<td>Message-ID: ';
|
||||||
|
echo '<input name="id" type="text" id="id" size="40" maxlength="120"> ';
|
||||||
|
echo '<input type="submit" name="Submit" value="Lookup"></form></td>';
|
||||||
|
echo '</tr>';
|
||||||
|
echo '</table><br />';
|
||||||
|
}
|
||||||
|
|
||||||
echo '<table cellpadding="0" cellspacing="0" class="np_header_bar_small"><tr>';
|
echo '<table cellpadding="0" cellspacing="0" class="np_header_bar_small"><tr>';
|
||||||
if ($unread) {
|
if ($unread) {
|
||||||
$motd = '<center>*** You have unread mail. <a href="../spoolnews/mail.php">Click Here</a> ***</center>';
|
$motd = '<center>*** You have unread mail. <a href="../spoolnews/mail.php">Click Here</a> ***</center>';
|
||||||
|
|
|
@ -22,22 +22,9 @@ if (isset($_COOKIE['mail_name'])) {
|
||||||
$id = $_REQUEST["id"];
|
$id = $_REQUEST["id"];
|
||||||
$group = _rawurldecode($_REQUEST["group"]);
|
$group = _rawurldecode($_REQUEST["group"]);
|
||||||
|
|
||||||
// Switch to correct section in case group has been moved and link is to old section
|
|
||||||
$findsection = get_section_by_group($group);
|
|
||||||
if (trim($findsection) !== $config_name) {
|
|
||||||
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')
|
|
||||||
$link = "https";
|
|
||||||
else
|
|
||||||
$link = "http";
|
|
||||||
$link .= "://";
|
|
||||||
$link .= $_SERVER['HTTP_HOST'];
|
|
||||||
$link .= $_SERVER['REQUEST_URI'];
|
|
||||||
$newurl = preg_replace("|/$config_name/|", "/$findsection/", $link);
|
|
||||||
header("Location:$newurl");
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
if (strpos($id, '@') !== false) {
|
if (strpos($id, '@') !== false) {
|
||||||
if ($CONFIG['article_database'] == '1') {
|
if ($CONFIG['article_database'] == '1') {
|
||||||
|
$id = '<'.trim($id, '<> ').'>';
|
||||||
$database = $spooldir . '/articles-overview.db3';
|
$database = $spooldir . '/articles-overview.db3';
|
||||||
$articles_dbh = overview_db_open($database);
|
$articles_dbh = overview_db_open($database);
|
||||||
$articles_query = $articles_dbh->prepare('SELECT * FROM overview WHERE msgid=:messageid');
|
$articles_query = $articles_dbh->prepare('SELECT * FROM overview WHERE msgid=:messageid');
|
||||||
|
@ -53,13 +40,28 @@ if (strpos($id, '@') !== false) {
|
||||||
}
|
}
|
||||||
$dbh = null;
|
$dbh = null;
|
||||||
if ($found) {
|
if ($found) {
|
||||||
$newurl = 'article-flat.php?id=' . $id . '&group=' . $group . '#' . $id;
|
$newurl = 'article-flat.php?id=' . $id . '&group=' . $row['newsgroup'] . '#' . $id;
|
||||||
header("Location: $newurl");
|
header("Location: $newurl");
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Switch to correct section in case group has been moved and link is to old section
|
||||||
|
$findsection = get_section_by_group($group);
|
||||||
|
if (($findsection) && trim($findsection) !== $config_name) {
|
||||||
|
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')
|
||||||
|
$link = "https";
|
||||||
|
else
|
||||||
|
$link = "http";
|
||||||
|
$link .= "://";
|
||||||
|
$link .= $_SERVER['HTTP_HOST'];
|
||||||
|
$link .= $_SERVER['REQUEST_URI'];
|
||||||
|
$newurl = preg_replace("|/$config_name/|", "/$findsection/", $link);
|
||||||
|
header("Location:$newurl");
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($_REQUEST["first"]))
|
if (isset($_REQUEST["first"]))
|
||||||
$first = $_REQUEST["first"];
|
$first = $_REQUEST["first"];
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,32 @@ include "$file_newsportal";
|
||||||
$id = $_REQUEST["id"];
|
$id = $_REQUEST["id"];
|
||||||
$group = _rawurldecode($_REQUEST["group"]);
|
$group = _rawurldecode($_REQUEST["group"]);
|
||||||
|
|
||||||
|
if (strpos($id, '@') !== false) {
|
||||||
|
if ($CONFIG['article_database'] == '1') {
|
||||||
|
$id = '<'.trim($id, '<> ').'>';
|
||||||
|
$database = $spooldir . '/articles-overview.db3';
|
||||||
|
$articles_dbh = overview_db_open($database);
|
||||||
|
$articles_query = $articles_dbh->prepare('SELECT * FROM overview WHERE msgid=:messageid');
|
||||||
|
$articles_query->execute([
|
||||||
|
'messageid' => $id
|
||||||
|
]);
|
||||||
|
$found = 0;
|
||||||
|
while ($row = $articles_query->fetch()) {
|
||||||
|
$id = $row['number'];
|
||||||
|
$group = $row['newsgroup'];
|
||||||
|
$found = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$dbh = null;
|
||||||
|
if ($found) {
|
||||||
|
$findsection = get_section_by_group($row['newsgroup']);
|
||||||
|
$newurl = '/' . $findsection . '/article.php?id=' . $id . '&group=' . $row['newsgroup'] . '#' . $id;
|
||||||
|
header("Location: $newurl");
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$thread_show["replies"] = true;
|
$thread_show["replies"] = true;
|
||||||
$thread_show["lastdate"] = false;
|
$thread_show["lastdate"] = false;
|
||||||
$thread_show["threadsize"] = false;
|
$thread_show["threadsize"] = false;
|
||||||
|
|
|
@ -7,8 +7,23 @@ return [
|
||||||
'maxarticles_per_run' => 100,
|
'maxarticles_per_run' => 100,
|
||||||
'maxfirstrequest' => 100,
|
'maxfirstrequest' => 100,
|
||||||
|
|
||||||
|
// Disable spoolnews if less than this num in Gb free for spool
|
||||||
|
'min_spool_disk_space' => 5,
|
||||||
|
|
||||||
|
// If your remote_server is already filtered, enable this
|
||||||
|
'disable_spamassassin_spooling' => true,
|
||||||
|
|
||||||
// Display short view of headers (only subject, name, date)
|
// Display short view of headers (only subject, name, date)
|
||||||
'short_headers' => false,
|
'short_headers' => true,
|
||||||
|
|
||||||
|
// Log posts?
|
||||||
|
'enable_post_log' => false,
|
||||||
|
|
||||||
|
// Disable name/email spoof option in Configuration
|
||||||
|
'disable_change_name' => false,
|
||||||
|
|
||||||
|
// Disable Message-ID search in header
|
||||||
|
'disable_msgid_search' => false,
|
||||||
|
|
||||||
// Just leave this here to avoid comma errors
|
// Just leave this here to avoid comma errors
|
||||||
'comma' => true
|
'comma' => true
|
||||||
|
|
Loading…
Reference in New Issue