Как исправить это?
Постов не видно.помогите.
http://vensoft.keo.su/forum/in ... d=192
Как исправить это?
Постов не видно.помогите.
http://vensoft.keo.su/forum/in ... d=192
вообще редирект на главную идет
ErA_KZ, накосячил что-то в /forum/index.php
После вывода иконки пользователя ошибку ищи.
что изменялось на форуме?
seg0ro (20.08.2012/09:48)А лучше пусть выложит файл...
что изменялось на форуме?
MyZik, если тыбудешь копаться то велком. А проще пусть заьлет индекс форума из оф пакета
seg0ro, возможно у него там есть изменения которых бы ему не хотелось терять. Если нужно я поищу и если найду, устраню ошибку. А файл нужен для наглядности так сказать...
<?php
/**
* @package JohnCMS
* @link http://johncms.com
* @copyright Copyright (C) 2008-2011 JohnCMS Community
* @license LICENSE.txt (see attached file)
* @version VERSION.txt (see attached file)
* @author http://johncms.com/about
*/
define('_IN_JOHNCMS', 1);
require('../incfiles/core.php');
$lng_forum = core::load_lng('forum');
if (isset($_SESSION['ref']))
unset($_SESSION['ref']);
/*
-----------------------------------------------------------------
Настройки форума
-----------------------------------------------------------------
*/
$set_forum = $user_id && !empty($datauser['set_forum']) ? unserialize($datauser['set_forum']) : array(
'farea' => 0,
'upfp' => 0,
'preview' => 1,
'postclip' => 1,
'postcut' => 2
);
/*
-----------------------------------------------------------------
Список расширений файлов, разрешенных к выгрузке
-----------------------------------------------------------------
*/
// Файлы архивов
$ext_arch = array(
'zip',
'rar',
'7z',
'tar',
'gz'
);
// Звуковые файлы
$ext_audio = array(
'mp3',
'amr'
);
// Файлы документов и тексты
$ext_doc = array(
'txt',
'pdf',
'doc',
'rtf',
'djvu',
'xls'
);
// Файлы Java
$ext_java = array(
'jar',
'jad'
);
// Файлы картинок
$ext_pic = array(
'jpg',
'jpeg',
'gif',
'png',
'bmp'
);
// Файлы SIS
$ext_sis = array(
'sis',
'sisx'
);
// Файлы видео
$ext_video = array(
'3gp',
'avi',
'flv',
'mpeg',
'mp4'
);
// Файлы Windows
$ext_win = array(
'exe',
'msi'
);
// Другие типы файлов (что не перечислены выше)
$ext_other = array('wmf');
/*
-----------------------------------------------------------------
Ограничиваем доступ к Форуму
-----------------------------------------------------------------
*/
$error = '';
if (!$set['mod_forum'] && $rights < 7)
$error = $lng_forum['forum_closed'];
elseif ($set['mod_forum'] == 1 && !$user_id)
$error = $lng['access_guest_forbidden'];
if ($error) {
require('../incfiles/head.php');
echo '<div class="rmenu"><p>' . $error . '</p></div>';
require('../incfiles/end.php');
exit;
}
$headmod = $id ? 'forum,' . $id : 'forum';
/*
-----------------------------------------------------------------
Заголовки страниц форума
-----------------------------------------------------------------
*/
if (empty($id)) {
$textl = '' . $lng['forum'] . '';
} else {
$req = mysql_query("SELECT `text` FROM `forum` WHERE `id`= '" . $id . "'");
$res = mysql_fetch_assoc($req);
$hdr = strtr($res['text'], array(
'"' => '',
'&' => '',
'<' => '',
'>' => '',
''' => ''
));
$hdr = mb_substr($hdr, 0, 30);
$hdr = functions::checkout($hdr);
$textl = mb_strlen($res['text']) > 30 ? $hdr . '...' : $hdr;
}
/*
-----------------------------------------------------------------
Переключаем режимы работы
-----------------------------------------------------------------
*/
$mods = array(
'addfile',
'addvote',
'close',
'deltema',
'delvote',
'editpost',
'editvote',
'file',
'files',
'filter',
'loadtem',
'massdel',
'moders',
'new',
'nt',
'per',
'post',
'ren',
'restore',
'say',
'tema',
'users',
'vip',
'vote',
'who'
);
if ($act && ($key = array_search($act, $mods)) !== false && file_exists('includes/' . $mods[$key] . '.php')) {
require('includes/' . $mods[$key] . '.php');
} else {
require('../incfiles/head.php');
/*
-----------------------------------------------------------------
Если форум закрыт, то для Админов выводим напоминание
-----------------------------------------------------------------
*/
if (!$set['mod_forum']) echo '<div class="alarm">' . $lng_forum['forum_closed'] . '</div>';
elseif ($set['mod_forum'] == 3) echo '<div class="rmenu">' . $lng['read_only'] . '</div>';
if (!$user_id) {
if (isset($_GET['newup']))
$_SESSION['uppost'] = 1;
if (isset($_GET['newdown']))
$_SESSION['uppost'] = 0;
}
if ($id) {
/*
-----------------------------------------------------------------
Определяем тип запроса (каталог, или тема)
-----------------------------------------------------------------
*/
$type = mysql_query("SELECT * FROM `forum` WHERE `id`= '$id'");
if (!mysql_num_rows($type)) {
// Если темы не существует, показываем ошибку
echo functions::display_error($lng_forum['error_topic_deleted'], '<a href="index.php">' . $lng['to_forum'] . '</a>');
require('../incfiles/end.php');
exit;
}
$type1 = mysql_fetch_assoc($type);
/*
-----------------------------------------------------------------
Фиксация факта прочтения Топика
----------------------------------------------------
Вот выложил.
это не все! кинь файл в зипе (что за привычка копипастить
)