Показать сообщение отдельно
isp_28 вне форума      Старый #5  
Аватара для isp_28
isp_28
Новенький
Регистрация: 28.09.2006
Сообщения: 10


Пожаловаться на это сообщениеОтветить с цитированием

Посмотреть профиль Отправить персональное сообщение для isp_28 Найти все сообщения от isp_28 Добавить isp_28 в список друзей  
05.09.2007, 19:27

Вот решение проблемы с коментами - окно коментариев отображается на той же странице где и новость.. ловите !!!

Находим в файле modules/News/commets.php следующую функцию:

function navbar($sid, $title, $thold, $mode, $order) {


..........
..........
..........
..........
..........
..........
..........



CloseTable();
if ($anonpost == 0 AND !is_user($user)) {
echo "<br>";
OpenTable();
echo "<center>"._NOANONCOMMENTS."</center>";
CloseTable();
}
}


меняем всё это на следующую :



function navbar($sid, $title, $thold, $mode, $order) {
global $prefix, $module_name, $user, $cookie, $datetime, $bgcolor1, $bgcolor2, $bgcolor3, $db, $anonpost, $anonymous, $admin;
cookiedecode($user);
getusrinfo($user);
$sid = intval($sid);
$pid = intval($pid);
if ($anonpost == 0 AND !is_user($user)) {

} else {
if ($pid != 0) {
$row = $db->sql_fetchrow($db->sql_query("SELECT date, name, email, subject, comment, score FROM ".$prefix."_comments WHERE tid='$pid'"));
$date = $row['date'];
$name = filter($row['name'], "nohtml");
$email = filter($row['email'], "nohtml");
$subject = filter($row['subject'], "nohtml");
$comment = filter($row['comment']);
$score = intval($row['score']);
} else {
$row2 = $db->sql_fetchrow($db->sql_query("SELECT time, title, hometext, bodytext, informant, notes FROM ".$prefix."_stories WHERE sid='$sid'"));
$date = $row2['time'];
$subject = filter($row2['title'], "nohtml");
$temp_comment = filter($row2['hometext']);
$comment2 = filter($row2['bodytext']);
$name = filter($row2['informant'], "nohtml");
$notes = filter($row2['notes']);
}
if(empty($comment)) {
$comment = $temp_comment."<br><br>$comment2";
}



echo "<br>";
OpenTable();
echo "<form action=\"modules.php?name=$module_name&amp;file=comments\" method=\"post\">";
echo "<font class=option><b>"._YOURNAME.":</b></font> ";
if (is_user($user)) {
cookiedecode($user);
echo "<a href=\"modules.php?name=Your_Account\">$cookie[1]</a> <font class=\"content\">[ <a href=\"modules.php?name=Your_Account&amp;op=logout\">"._LOGOUT."</a> ]</font><br><br>";
} else {
echo "<font class=\"content\">$anonymous";
echo " [ <a href=\"modules.php?name=Your_Account\">"._NEWUSER."</a> ]<br><br>";
}
echo "<font class=\"option\"><b>"._SUBJECT.":</b></font><br>";
if (!stripos_clone($subject,"Re:")) $subject = "Re: ".substr($subject,0,81)."";
echo "<input type=\"text\" name=\"subject\" size=\"50\" maxlength=\"85\" value=\"$subject\"><br><br>";
echo "<font class=\"option\"><b>"._UCOMMENT.":</b></font><br>"
."<textarea wrap=\"virtual\" cols=\"70\" rows=\"15\" name=\"comment\"></textarea><br>";
if ($nuke_editor == 0) {
echo "<font class=\"content\">"._ALLOWEDHTML."<br>";
while (list($key,) = each($AllowableHTML)) echo " &lt;".$key."&gt;";
echo "</font><br><br>";
} else {
echo ""._HTMLNOTALLOWED."</font><br><br>";
}
if (is_user($user) AND ($anonpost == 1)) { echo "<input type=\"checkbox\" name=\"xanonpost\"> "._POSTANON."<br>"; }
if (!isset($mode) OR empty($mode)) {
if(isset($userinfo['umode'])) {
$mode = $userinfo['umode'];
} else {
$mode = "thread";
}
}
if (!isset($order) OR empty($order)) {
if(isset($userinfo['uorder'])) {
$order = $userinfo['uorder'];
} else {
$order = 0;
}
}
if (!isset($thold) OR empty($thold)) {
if(isset($userinfo['thold'])) {
$thold = $userinfo['thold'];
} else {
$thold = 0;
}
}

echo "<input type=\"hidden\" name=\"pid\" value=\"$pid\">\n"
."<input type=\"hidden\" name=\"sid\" value=\"$sid\">\n"
."<input type=\"hidden\" name=\"mode\" value=\"$mode\">\n"
."<input type=\"hidden\" name=\"order\" value=\"$order\">\n"
."<input type=\"hidden\" name=\"thold\" value=\"$thold\">\n"
."<input type=\"submit\" name=\"op\" value=\""._PREVIEW."\">\n"
."<input type=\"submit\" name=\"op\" value=\""._OK."\"> "._GOBACK."\n"
."</font></form>\n";
CloseTable();

}
if ($anonpost == 0 AND !is_user($user)) {
echo "<br>";
OpenTable();
echo "<center>"._NOANONCOMMENTS."</center>";
CloseTable();

}
}