Перейти к содержимому
Открыть в приложении

Удобный способ просмотра. Узнать больше.

Дизайн и модификация Invision Community

Полноэкранное приложение на главном экране с push-уведомлениями, медалями и многим другим.

Чтобы установить это приложение на iOS и iPadOS
  1. Нажмите иконку «Поделиться» в Safari
  2. Прокрутите меню и нажмите На экран «Домой».
  3. Нажмите Добавить в правом верхнем углу.
Чтобы установить это приложение на Android
  1. Нажмите меню из трёх точек (⋮) в правом верхнем углу браузера.
  2. Нажмите Добавить на главный экран или Установить приложение.
  3. Подтвердите, нажав Установить.
Русский язык для Invision Community 5

Куратор/модератор темы

Имя файла: Куратор/модератор темы

Владелец файла: andaril

Файл размещен: 14 май 2007

Файл обновлен: 14 фев 2011

Категория файла: Mods/Моды

 

Эта модификация позволяет добавить куратора для темы.

 

+---------------------------------------------------------------------

| Invision Power Board v2.1.x

| =================================================================

| При поддержке ipbskins.ru

| =================================================================

+---------------------------------------------------------------------

|

| > Мод "Куратор/Модератор одной темы"

| > Автор fr0z3n aka andar!l

|

| > Автор оригинального мода для версий 2.0.х Пухыч

| > Версия: 1.0

| > Дата: 19.02.2007

|

+---------------------------------------------------------------------

|

| > Эта модификация позволяет добавить куратора для темы.

| > Куратор может удалять, и редактировать сообщения в пределах одной

| > темы. Добавлять куратора может супермодератор

|

+---------------------------------------------------------------------

|

| > Автор не несет ответственности за проблемы в связи с

| > использованием этой модификации

| > Используйте мод на свой страх и риск.

|

| > Author is not responsible for any consequences of using this

| > forum modification, including those caused by this module

| > Use at your own risk

|

+---------------------------------------------------------------------

 

Нажмите сюда, чтобы скачать этот файл

Изменено пользователем andaril

Рекомендованные сообщения

andaril, к сожалению доступ на форум имеют только клиенты провайдера "Алтайтелеком" :)

  • Автор

так-с...

выложите сюда весь код skin_forum -> render_forum_row

<!-- Begin Topic Entry {$data['tid']} -->
<tr> 
<td align="center" class="$class2" id='tid-folder-{$data['tid']}' onclick='return topic_toggle_folder("{$data['tid']}");'>{$data['folder_img']}</td>
<td align="center" class="$class2">{$data['topic_icon']}</td>
<td class="$class2" valign="middle">
	<div style='float:right'>{$data['_rate_img']}</div>
	<div>
		{$data['go_new_post']}{$data['prefix']} {$data['attach_img']}<span id='tid-span-{$data['tid']}'><a id="tid-link-{$data['tid']}" href="{ipb.script_url}showtopic={$data['tid']}" title="{ipb.lang['topic_started_on']} {$data['start_date']}">{$data['title']}</a></span> {$data[PAGES]}
		<div class="desc"><span onclick='return span_desc_to_input("{$data['tid']}");' id='tid-desc-{$data['tid']}'>{$data['description']}</span><span class="forumdesc"><if="$data['curator']"><i>{$data['curator']}</i></if></span></div>
	</div>
</td>
<td align='center' class="$classposts">
 {$data['posts']}
<if="data['_hasqueued'] == 1 and inforum == 1">
 <a href="{ipb.script_url}showtopic={$data['tid']}&modfilter=invisible_posts"><{BC_QUEUED_POSTS}></a>
</if>

</td>
<td align="center" class="$class1">{$data['starter']}</td>
<td align="center" class="$class1">{$data['views']}</td>
<td class="$class1"><span class="lastaction">{$data['last_post']}<br /><a href="{ipb.script_url}showtopic={$data['tid']}&view=getlastpost">{$data['last_text']}</a> <b>{$data['last_poster']}</b></span></td>
<if="ipb.member['is_mod'] == 1 and inforum == 1 and data['tidon'] == 1">
<td align="center" class="$class1"><a href="#" title="{ipb.lang['click_for_mod']}" onclick="forum_toggle_tid('{$data['real_tid']}'); return false;"><img name="img{$data['real_tid']}" src="{ipb.vars['img_url']}/topic_selected.gif" /></a></td>
</if>
<if="ipb.member['is_mod'] == 1 and inforum == 1 and data['tidon'] == 0">
<td align="center" class="$class1"><a href="#" title="{ipb.lang['click_for_mod']}" onclick="forum_toggle_tid('{$data['real_tid']}'); return false;"><img name="img{$data['real_tid']}" src="{ipb.vars['img_url']}/topic_unselected.gif" /></a></td>
</if>

</tr>
<!-- End Topic Entry {$data['tid']} -->

  • Автор
######################################################################
./sources/action_public/forums.php
======================================================================
НАЙТИ
----------------------------------------------------------------------
if ($this->pinned_print == 0)
		{
			// we've a pinned topic, but we've not printed the pinned
			// starter row, so..

			$show	= $this->announce_out ? 1 : 0;
			$p_start = $this->ipsclass->compiled_templates['skin_forum']->render_pinned_start( $show );

			$this->pinned_print = 1;
		}
----------------------------------------------------------------------
ДОБАВИТЬ НИЖЕ
----------------------------------------------------------------------
//curator
$list = unserialize(stripslashes($topic['curator_id']));
if ($list['id'])
{
$topic['curator']='Куратор темы: <a href="./index.php?showuser='.$list['id'].'">'.$list['members_display_name']."</a>";
}
//curator
----------------------------------------------------------------------
НАЙТИ
----------------------------------------------------------------------
if ($this->pinned_print == 1)
		{
			//-----------------------------------------
			// Nope, so..
			//-----------------------------------------

			$p_end = $this->ipsclass->compiled_templates['skin_forum']->render_pinned_end();

			$this->pinned_print = 0;
		}
----------------------------------------------------------------------
ДОБАВИТЬ НИЖЕ
----------------------------------------------------------------------
//curator
$list = unserialize(stripslashes($topic['curator_id']));
if ($list['id'])
{
$topic['curator']='Куратор темы: <a href="./index.php?showuser='.$list['id'].'">'.$list['members_display_name']."</a>";
}
//curator
======================================================================

вы точно вставили это? Проверьте 3 раза, если все ок, скиньте мне ваш forums.php в личку

вы точно вставили это? Проверьте 3 раза, если все ок, скиньте мне ваш forums.php в личку

Проверил все на 10 раз, все в норме, делал как написано в инструкции :) forums.php отправил в личку

  • Автор
Проверил все на 10 раз, все в норме, делал как написано в инструкции :) forums.php отправил в личку

просто залейте этот файл куда-нибудь, т.к. он не весь пришел.

 

И больше не выкладывайте содержимое файла....

  • Автор

а вы во всех скинах сделали изменения?)

скин всего один :)

  • Автор

куратор то в теме есть? странно просто, что не отображается. Сделать вот так

######################################################################
./sources/action_public/forums.php
======================================================================
НАЙТИ
----------------------------------------------------------------------
if ($this->pinned_print == 0)
		{
			// we've a pinned topic, but we've not printed the pinned
			// starter row, so..

			$show	= $this->announce_out ? 1 : 0;
			$p_start = $this->ipsclass->compiled_templates['skin_forum']->render_pinned_start( $show );

			$this->pinned_print = 1;
		}
----------------------------------------------------------------------
ДОБАВИТЬ НИЖЕ
----------------------------------------------------------------------
		//curator
		if ( $topic['curator_id'] )
		{
			$list = unserialize(stripslashes($topic['curator_id']));
			$topic['curator']='<br />Куратор темы: '.$this->ipsclass->make_profile_link($list['name'], $list['id']);
		}
		//curator
----------------------------------------------------------------------
НАЙТИ
----------------------------------------------------------------------
if ($this->pinned_print == 1)
		{
			//-----------------------------------------
			// Nope, so..
			//-----------------------------------------

			$p_end = $this->ipsclass->compiled_templates['skin_forum']->render_pinned_end();

			$this->pinned_print = 0;
		}
----------------------------------------------------------------------
ДОБАВИТЬ НИЖЕ
----------------------------------------------------------------------
		//curator
		if ( $topic['curator_id'] )
		{
			$list = unserialize(stripslashes($topic['curator_id']));
			$topic['curator']='<br />Куратор темы: '.$this->ipsclass->make_profile_link($list['name'], $list['id']);
		}
		//curator
======================================================================

а старые изменения файла уберите.

andaril, естественно есть, причем все работает, просто не отображается строчка "куратор темы: <ник куратора>"

способ выше не помогает :)

  • Автор

сделайте бэкап бд и файлов форума. Поставьте себе на локалхост.

найдите в файле forums.php

	function render_entry($topic)
{
	$topic = $this->parse_data( $topic );

и ниже добавьте

echo "<pre>";
print_r($topic);
echo "<hr/>";
print_r($topic['curator_id']);
echo "<hr/>";
print_r(unserialize(stripslashes($topic['curator_id'])));
echo "</pre>";

потом найдите

		//-----------------------------------------
	// Show meh the topics!
	//-----------------------------------------

	foreach( $topic_array as $tid => $topic )
	{
		if ( $topic['pinned'] )
		{
			$this->pinned_topic_count++;
		}

		$this->output .= $this->render_entry( $topic );

		$total_topics_printed++;
	}

и ниже добавьте

exit();

 

и откройте форум где есть темы с куратором. Что вам напишется там

Array
(
[tid] => 2
[title] => gggggggggg
[description] => gggggggggggg
[state] => open
[posts] => 0
[starter_id] => 1
[start_date] => Сегодня, 16:21
[last_poster_id] => 1
[last_post] => Сегодня, 16:26
[icon_id] => 0
[starter_name] => admin
[last_poster_name] => admin
[poll_state] => 0
[last_vote] => 0
[views] => 7
[forum_id] => 2
[approved] => 1
[author_mode] => 1
[pinned] => 0
[moved_to] => 
[total_votes] => 0
[topic_hasattach] => 0
[topic_firstpost] => 22
[topic_queuedposts] => 0
[topic_open_time] => 0
[topic_close_time] => 0
[topic_rating_total] => 0
[topic_rating_hits] => 0
[curator_id] => a:2:{s:4:\"name\";s:5:\"11111\";s:2:\"id\";s:1:\"2\";}
[author_id] => 1
[db_read] => 1203870370
[real_tid] => 2
[_last_post] => 1203870369
[last_text] => Посл. сообщение:
[last_poster] => admin
[starter] => admin
[folder_img] => <{B_NORM_DOT}>
[topic_icon] =>  
[go_new_post] => 
[_rate_img] => 
)
a:2:{s:4:\"name\";s:5:\"11111\";s:2:\"id\";s:1:\"2\";}
Array
(
[name] => 11111
[id] => 2
)
Array
(
[tid] => 1
[title] => Добро пожаловать
[description] => 
[state] => open
[posts] => 19
[starter_id] => 1
[start_date] => 30.1.2008, 17:05
[last_poster_id] => 1
[last_post] => 21.2.2008, 19:52
[icon_id] => 0
[starter_name] => admin
[last_poster_name] => admin
[poll_state] => 0
[last_vote] => 0
[views] => 397
[forum_id] => 2
[approved] => 1
[author_mode] => 0
[pinned] => 0
[moved_to] => 0
[total_votes] => 0
[topic_hasattach] => 3
[topic_firstpost] => 1
[topic_queuedposts] => 0
[topic_open_time] => 0
[topic_close_time] => 0
[topic_rating_total] => 0
[topic_rating_hits] => 0
[curator_id] => a:2:{s:4:\"name\";s:5:\"admin\";s:2:\"id\";s:1:\"1\";}
[author_id] => 1
[db_read] => 1203870370
[real_tid] => 1
[_last_post] => 1203623553
[attach_img] => <{ATTACH_ICON}>
[last_text] => Посл. сообщение:
[last_poster] => admin
[starter] => admin
[folder_img] => <{B_HOT_NN_DOT}>
[topic_icon] =>  
[go_new_post] => 
[_rate_img] => 
)
a:2:{s:4:\"name\";s:5:\"admin\";s:2:\"id\";s:1:\"1\";}
Array
(
[name] => admin
[id] => 1
)

  • Автор

и еще, довьте ниже

echo "<pre>";
print_r($topic);
echo "<hr/>";
print_r($topic['curator_id']);
echo "<hr/>";

код

//curator
		if ( $topic['curator_id'] )
		{
			$list = unserialize(stripslashes($topic['curator_id']));
			$topic['curator']='<br />Куратор темы: '.$this->ipsclass->make_profile_link($list['name'], $list['id']);
		}
		//curator
echo $topic['curator'];

что напишет

 

и еще. Перестройте кэш стилей... Может я зря стараюсь.

Кеш обновил

Array
(
[tid] => 2
[title] => gggggggggg
[description] => gggggggggggg
[state] => open
[posts] => 0
[starter_id] => 1
[start_date] => Сегодня, 16:21
[last_poster_id] => 1
[last_post] => Сегодня, 16:26
[icon_id] => 0
[starter_name] => admin
[last_poster_name] => admin
[poll_state] => 0
[last_vote] => 0
[views] => 7
[forum_id] => 2
[approved] => 1
[author_mode] => 1
[pinned] => 0
[moved_to] => 
[total_votes] => 0
[topic_hasattach] => 0
[topic_firstpost] => 22
[topic_queuedposts] => 0
[topic_open_time] => 0
[topic_close_time] => 0
[topic_rating_total] => 0
[topic_rating_hits] => 0
[curator_id] => a:2:{s:4:\"name\";s:5:\"11111\";s:2:\"id\";s:1:\"2\";}
[author_id] => 1
[db_read] => 1203870370
[real_tid] => 2
[_last_post] => 1203870369
[last_text] => Посл. сообщение:
[last_poster] => admin
[starter] => admin
[folder_img] => <{B_NORM_DOT}>
[topic_icon] =>  
[go_new_post] => 
[_rate_img] => 
)
a:2:{s:4:\"name\";s:5:\"11111\";s:2:\"id\";s:1:\"2\";}

Куратор темы: 11111Array
(
[name] => 11111
[id] => 2
)
Array
(
[tid] => 1
[title] => Добро пожаловать
[description] => 
[state] => open
[posts] => 19
[starter_id] => 1
[start_date] => 30.1.2008, 17:05
[last_poster_id] => 1
[last_post] => 21.2.2008, 19:52
[icon_id] => 0
[starter_name] => admin
[last_poster_name] => admin
[poll_state] => 0
[last_vote] => 0
[views] => 397
[forum_id] => 2
[approved] => 1
[author_mode] => 0
[pinned] => 0
[moved_to] => 0
[total_votes] => 0
[topic_hasattach] => 3
[topic_firstpost] => 1
[topic_queuedposts] => 0
[topic_open_time] => 0
[topic_close_time] => 0
[topic_rating_total] => 0
[topic_rating_hits] => 0
[curator_id] => a:2:{s:4:\"name\";s:5:\"admin\";s:2:\"id\";s:1:\"1\";}
[author_id] => 1
[db_read] => 1203870370
[real_tid] => 1
[_last_post] => 1203623553
[attach_img] => <{ATTACH_ICON}>
[last_text] => Посл. сообщение:
[last_poster] => admin
[starter] => admin
[folder_img] => <{B_HOT_NN_DOT}>
[topic_icon] =>  
[go_new_post] => 
[_rate_img] => 
)
a:2:{s:4:\"name\";s:5:\"admin\";s:2:\"id\";s:1:\"1\";}

Куратор темы: adminArray
(
[name] => admin
[id] => 1
)

  • Автор

ладно. удалите все изменения из файла forums.php и вставьте после

	function render_entry($topic)
{
	$topic = $this->parse_data( $topic );

код

//curator
		if ( $topic['curator_id'] )
		{
			$list = unserialize(stripslashes($topic['curator_id']));
			$topic['curator']='<br />Куратор темы: '.$this->ipsclass->make_profile_link($list['name'], $list['id']);
		}
		//curator

не появилась надпись?

Создайте аккаунт или войдите в него для комментирования

Аккаунт

Навигация

Поиск

Поиск

Настроить push-уведомления браузера

Chrome (Android)
  1. Нажмите на иконку замка рядом с адресной строкой.
  2. Нажмите Права доступа -> Уведомления.
  3. Измените свои настройки.
Chrome (компьютер)
  1. Нажмите на иконку замка в адресной строке.
  2. Выберите Настройки сайта.
  3. Найдите Уведомления и измените свои настройки.