Магазин
Правила Ответы на вопросы Конфиденциальность
Магазин
Правила Ответы на вопросы Конфиденциальность
  • Быстрые действия Ярлыки
    Общие действия
    Связаться с администрацией
    • Бот

       

BB2Spoiler/BB3Spoiler

  • Список форумов
  • phpBB 3.0
  • Другие моды для phpBB3
  • BB2Spoiler/BB3Spoiler

Проблемы с которыми столкнулся после установки..

Мод спойлера на аяксе для форума phpBB3
8 сообщений
 • Страница 1 из 1
Просмотры: 1549 • 
Nico
Пользователь
Сообщения: 8
Зарегистрирован: 11 ноя 2009, 08:23
Сообщение 11 ноя 2009, 08:39
1. Ошибка IE8
Столкнулся с такой проблемой >>

Последний раз редактировалось Nico 11 ноя 2009, 09:21, всего редактировалось 1 раз.
Nico
Nico
Пользователь
Сообщения: 8
Зарегистрирован: 11 ноя 2009, 08:23
Сообщение 11 ноя 2009, 08:52
2. Recent.php
- Мод создан с целью выводить сообщения на главной странице вашего сайта....
К сожелению на главной странице сайта у меня теперь ошибка и ничего не выводица :(

Вот код:
<?php

/**
* @ignore
*/

/* Config section */
$cfg_ignore_forums = ''; // ids of forums you don't want to display, separated by commas or empty
$cfg_only_forums = ''; // ids of forums you only want to display, separated by commas or empty
$cfg_nm_topics = 12; // number of topics to output
$cfg_max_topic_length = 120; // max topic length, if more, title will be shortened
$cfg_show_replies = true; // show number of replies to topics
$cfg_show_first_post = false; // show first posts of the recent topics
$cfg_show_attachments = false; // show attachments in the first posts of recent topics
/* End of config */

define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);

//
// Let's prevent caching
//
if (!empty($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache/2'))
{
header ('Cache-Control: no-cache, pre-check=0, post-check=0');
}
else
{
header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
}
header('Content-type: text/html; charset=Windows-1251');
header('Expires: 0');
header('Pragma: no-cache');

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('common');

//
// Building URL
//
$board_path = generate_board_url();
$viewtopic_url = $board_path . '/viewtopic.' . $phpEx;
$view_topic_url = $board_path . '/viewtopic.' . $phpEx;

// Fetching forums that should not be displayed
$forums = implode(',', array_keys($auth->acl_getf('!f_read', true)));
$cfg_ignore_forums = (!empty($cfg_ignore_forums) && !empty($forums)) ? $cfg_ignore_forums . ',' . $forums : ((!empty($forums)) ? $forums : ((!empty($cfg_ignore_forums)) ? $cfg_ignore_forums : ''));

// Building sql for forums that should not be displayed
$sql_ignore_forums = (!empty($cfg_ignore_forums)) ? ' AND t.forum_id NOT IN(' . $cfg_ignore_forums .') ' : '';

// Building sql for forums that should only be displayed
$sql_only_forums = (!empty($cfg_only_forums)) ? ' AND t.forum_id IN(' . $cfg_only_forums .') ' : '';

// Fetching topics of public forums
$sql = 'SELECT t.*,
p.post_id, p.post_text, p.bbcode_uid, p.bbcode_bitfield, p.post_attachment, p.post_approved
FROM ' . TOPICS_TABLE . ' AS t, ' . POSTS_TABLE . ' AS p, ' . FORUMS_TABLE . " AS f
WHERE t.forum_id = f.forum_id
$sql_ignore_forums
$sql_only_forums
AND p.post_id = t.topic_first_post_id
AND t.topic_moved_id = 0
ORDER BY t.topic_last_post_id DESC LIMIT $cfg_nm_topics";

$result = $db->sql_query($sql);

$recent_topics = $db->sql_fetchrowset($result);

//
// BEGIN ATTACHMENT DATA
//
if($cfg_show_first_post && $cfg_show_attachments)
{
$attach_list = $update_count = array();
foreach ($recent_topics as $post_attachment)
{
if ($post_attachment['post_attachment'] && $config['allow_attachments'])
{
$attach_list[] = $post_attachment['post_id'];

if ($post_attachment['post_approved'])
{
$has_attachments = true;
}
}
}

// Pull attachment data
if (sizeof($attach_list))
{
if ($auth->acl_get('u_download') )
{
$sql_attach = 'SELECT *
FROM ' . ATTACHMENTS_TABLE . '
WHERE ' . $db->sql_in_set('post_msg_id', $attach_list) . '
AND in_message = 0
ORDER BY filetime DESC, post_msg_id ASC';
$result_attach = $db->sql_query($sql_attach);

while ($row_attach = $db->sql_fetchrow($result_attach))
{
$attachments[$row_attach['post_msg_id']][] = $row_attach;
}
$db->sql_freeresult($result_attach);
}
else
{
$display_notice = true;
}
}
}
//
// END ATTACHMENT DATA
//

foreach ( $recent_topics as $row )
{
$topic_title = censor_text($row['topic_title']);
$topic_title = (utf8_strlen($topic_title) > $cfg_max_topic_length) ? utf8_substr($topic_title, 0, $cfg_max_topic_length) . '&hellip;' : $topic_title;
$topic_title = str_replace(array("\r\n", "\r", "\n"), '<br />', $topic_title);
$topic_title = addslashes($topic_title);
$user_colour = ($row['topic_last_poster_colour']) ? ' style="color:#' . $row['topic_last_poster_colour'] . '" class="username-coloured"' : '';

// Replies
$replies = ($auth->acl_get('m_approve', $row['forum_id'])) ? $row['topic_replies_real'] : $row['topic_replies'];

// font color="#ffcc00"
if ($replies == 0)
{
$color_empty_topic_beg = '<b>';
$color_empty_topic_end = '</b>';
}
else
{
$color_empty_topic_beg = '';
$color_empty_topic_end = '';
}

// Instantiate BBCode if need be
if ($row['bbcode_bitfield'] !== '')
{
$bbcode = new bbcode(base64_encode($row['bbcode_bitfield']));
}

$message = $row['post_text'];

// Parse the message
$message = censor_text($message);

// Second parse bbcode here
if ($row['bbcode_bitfield'])
{
$bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
}

$message = str_replace("\n", '<br />', $message);

// Always process smilies after parsing bbcodes
$message = smiley_text($message);

// Parse attachments
if ($cfg_show_first_post && $cfg_show_attachments && !empty($attachments[$row['post_id']]))
{
parse_attachments($row['forum_id'], $message, $attachments[$row['post_id']], $update_count);
}

$message = str_replace(array("\r\n", "\r", "\n"), '<br />', $message);
$message = addslashes($message);
$message = str_replace('./', $board_path . '/', $message);
$tags = array('dl', 'dt', 'dd');
$message = strip_selected_tags($message, $tags);

$template->assign_block_vars('topicrow', array(
'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
'U_NEWEST_POST' => $view_topic_url . '?f=' . $row['forum_id'] . '&t=' . $row['topic_id'] . '&view=unread#unread',
'U_TOPIC' => $viewtopic_url . '?f=' . $row['forum_id'] . '&t=' . $row['topic_id'] . '&view=unread#unread',
'U_TOPIC_AUTHOR' => get_username_string('profile', iconv("UTF-8", "cp1251", $row['topic_poster']), iconv("UTF-8", "cp1251", $row['topic_first_poster_name']), $row['topic_first_poster_colour']),
'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], addslashes($row['topic_last_poster_name']), $row['topic_last_poster_colour']),
'TOPIC_TITLE' => iconv("UTF-8", "cp1251", $topic_title), $color_empty_topic_beg . $topic_title . $color_empty_topic_end,
'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time'],"H:i"),
'TOPIC_REPLIES' => ($cfg_show_replies) ? 'ответов: <font color="#978453"> ' . $replies . '</font>' : '',
'S_HAS_ATTACHMENTS' => ($cfg_show_first_post && $cfg_show_attachments && !empty($attachments[$row['post_id']])) ? true : false,
'POSTER_LAST_POST' => get_username_string('full', iconv("UTF-8", "cp1251", $row['topic_last_poster_id']), addslashes(iconv("UTF-8", "cp1251", $row['topic_last_poster_name'])), $row['topic_last_poster_colour']),
// 'POSTER_LAST_POST' => '<font color="#' . $row['topic_last_poster_colour'] . '">' . $last_post_poster . '</font>',
));

if ($cfg_show_first_post)
{
$template->assign_block_vars('topicrow.first_post_text', array(
'TOPIC_FIRST_POST_TEXT' => ($cfg_show_first_post) ? iconv("UTF-8", "cp1251", $message) : ''
));
}

// Display not already displayed Attachments for this post, we already parsed them. ;)
if ($cfg_show_first_post && $cfg_show_attachments && !empty($attachments[$row['post_id']]))
{
foreach ($attachments[$row['post_id']] as $attachment)
{
$attachment = str_replace(array("\r\n", "\r", "\n"), '<br />', $attachment);
$attachment = str_replace('"./', '"' . $board_path . '/', $attachment);
$tags = array('span', 'dt', 'dd', 'dl');
$attachment = strip_selected_tags($attachment, $tags);

$template->assign_block_vars('topicrow.first_post_text.attachment', array(
'DISPLAY_ATTACHMENT' => iconv("UTF-8", "cp1251", $attachment))
);
}
}

}
$db->sql_freeresult($result);

//
// Load template
//
$template->set_filenames(array(
'body' => 'recent_body.html')
);

//
// Output
//
$template->display('body');

/**
* Works like PHP function strip_tags, but it only removes selected tags.
* Example: * strip_selected_tags('<b>Person:</b> <strong>Larcher</strong>', 'strong') => <b>Person:</b> Larcher
* by Matthieu Larcher
* http://ru2.php.net/manual/en/function.s ... .php#76045
*/
function strip_selected_tags($text, $tags = array())
{
$args = func_get_args();
$text = array_shift($args);
$tags = (func_num_args() > 2) ? array_diff($args,array($text)) : (array)$tags;
foreach ($tags as $tag)
{
while(preg_match('/<'.$tag.'(|\W[^>]*)>(.*)<\/'. $tag .'>/iusU', $text, $found))
{
$text = str_replace($found[0],$found[2],$text);
}
}

return preg_replace('/(<('.join('|',$tags).')(|\W.*)\/>)/iusU', '', $text);
}
?>
Может кто поможет ? пологаю в него нужно дописать чего-то....
Nico
Аватара пользователя
PPK
Администратор
Сообщения: 10514
Зарегистрирован: 21 мар 2009, 17:13
Сообщение 11 ноя 2009, 10:48
Nico писал(а):1. Ошибка IE8
Столкнулся с такой проблемой >>

Только на главной? ;) или это везде? (и что стоит в этом файле первой строчкой?)
PPK
Nico
Пользователь
Сообщения: 8
Зарегистрирован: 11 ноя 2009, 08:23
Сообщение 11 ноя 2009, 18:44
to PPK решил проблему после 6 часов мороки, потом ещё не мог вотий в админку слетела ссеия не мог зачистить кэш пришлось все переустанавливать хорошо что был бэкап базы....

Щас всё работает >>> http://forum.nicosoft.ru
Если не редактировал файлы языка если их редактируешь такие ошибки не только на главной но и в админке.
По этому спойлер остался Hide Text и.т.п... :lol:

Хотелось бы узнать есть ли подобные >http://www.hiveworkshop.com/forums/trig ... er-112247/ модификации...
В окне функция (trigger GUI) щелкаем по ней она подобно спойлеру, напоминает дерево
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
открывает значение if
Данный хак на их форуме для воблы
Последний раз редактировалось Nico 11 ноя 2009, 18:56, всего редактировалось 1 раз.
Nico
Аватара пользователя
PPK
Администратор
Сообщения: 10514
Зарегистрирован: 21 мар 2009, 17:13
Сообщение 11 ноя 2009, 18:46
Подозреваю что файл сохраняется с BOM'ом .. каким редатором?
PPK
Nico
Пользователь
Сообщения: 8
Зарегистрирован: 11 ноя 2009, 08:23
Сообщение 11 ноя 2009, 18:58
PPK писал(а):Подозреваю что файл сохраняется с BOM'ом .. каким редатором?
Да редактор хреновый обычный ворд пад всё не как руки не дайдут Нотерпад++ поставить щас попробую и отредактирую в нём....
Nico
Всеволод
Пользователь
Сообщения: 4
Зарегистрирован: 26 мар 2010, 04:30
Сообщение 26 мар 2010, 13:40
после установки видимо возник конфликт тегов.
на форуме стоял тег, который был создан через админку в панели ббкодов (он возвращает картинку в формате .gif, на основе введенного текста внутри тегов). Если писать новые сообщения то тег работает хорошо, а вот в старых работать перестал.
Пробовал синхронизацию в админке - не получилось, кеш чистый...

еще, похоже сам тег spoiler не работает, хотя появился в кнопках. Но не возвращает раздвигающегося окошка, просто текст.
Где я мог ошибиться?
Всеволод
Аватара пользователя
PPK
Администратор
Сообщения: 10514
Зарегистрирован: 21 мар 2009, 17:13
Сообщение 27 мар 2010, 17:04
мм.. так он до сих пор там стоит, или был удалён и добавлен заново?
PPK
8 сообщений
 • Страница 1 из 1

Вернуться в «BB2Spoiler/BB3Spoiler»

Time: 0.000s | Queries: 0 | Peak Memory Usage: 0.00 МБ | GZIP: Unknown | SQL Explain
  • Список форумов
2018, made with by ThemeKita Создано на основе phpBB® Forum Software © phpBB Limited Русская поддержка phpBB (C) 2009-2025 @ PPK
  • Часовой пояс: UTC+04:00
Участники темы
Список форумов Участники темы
Перейти
Сайт ↳   Новости по сайту ↳   Новости обновлений ↳   Вопросы по сайту ↳   Non-russian speakers forum phpBB 3.1-3.3 ↳   Вопросы по phpBB 3.1-3.3 ↳   Расширения для phpBB 3.1-3.3 ↳   Условно-бесплатные расширения ↳   Платные расширения ↳   Расширения для подписчиков ↳   Расширения в разработке ↳   База расширений ↳   Стили для phpBB 3.1-3.3 ↳   Переводы расширений для phpBB3.1-3.3 ↳   Поиск и запросы расширений ↳   Запросы расширений, функционала и переводов для подписчиков ppkBB3cker ↳   Новости по трекеру и обновлениям ↳   Ошибки, проблемы, недочёты ↳   Предложения по новым функциям и возможностям ↳   Вопросы, ответы и примеры решений ↳   Моды и стили для трекера ↳   Готовые стили для трекера ↳   Запросы стилей для трекера ↳   Стили в разработке ↳   Готовые моды для трекера ↳   Запросы модов для трекера ↳   Моды в разработке ↳   Остальное ↳   F.A.Q. ↳   Ваши трекеры ↳   Оффтопик xbtBB3cker ↳   Новости по трекеру и обновлениям ↳   Вопросы, ответы, ошибки и обсуждение phpBB 3.0 ↳   Другие моды для phpBB3 ↳   Минимоды и хаки для phpBB3 ↳   Вопросы по phpBB3 ↳   phpBB3 ppkBB3cker Edition ↳   Платные услуги, моды, стили ↳   BB2Spoiler/BB3Spoiler ↳   BB3Topics ↳   BB3Sape ↳   BB3UserAgentInfo