Перейти к контенту
  • 0

Модераторские теги для 2.3


-Cross-

Вопрос

Ищу мод. теги для 2.3, которые были как для 2.1:

http://www.ibresource.ru/db/845/

Может кто переделает.

 

Есть альтернативный вариант для 2.2 и 2.3, но он что-то не очень дружит с формой расширенной от Sannis'а и он всё равно не то, что надо...

Ссылка на комментарий
Поделиться на других сайтах

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

  • 0

Вот даже тут выкладываю инструкцию от 2.1

//--------------------------------------
// Модераторские теги для 2.1.х
//--------------------------------------

Выполнить SQL запрос к базе:
ALTER TABLE ibf_posts ADD has_modcomment TINYINT(1) DEFAULT '0' NULL;

Открыть /source/classes/bbcode/class_bbcode.php

//Найти

		//-----------------------------------------
		// Auto parse URLs
		//-----------------------------------------

//Выше добавить

	if ($this->ipsclass->member['g_is_supmod'] == 1 || $this->ipsclass->member['is_mod'] == 1)
	{
		$txt = preg_replace( "#\[mod\](.+?)\[/mod\]#ies", "\$this->regex_mod_tag(array('name' => '', 'txt' => '\\1'))", $txt );
		$txt = preg_replace( "#\[mod=(.+?)\](.+?)\[/mod\]#ies", "\$this->regex_mod_tag(array('name' => '\\1', 'txt' => '\\2'))", $txt );
		$txt = preg_replace( "#\[ex\](.+?)\[/ex\]#ies", "\$this->regex_exclaime_tag(array('name' => '', 'txt' => '\\1'))", $txt );
		$txt = preg_replace( "#\[ex=(.+?)\](.+?)\[/ex\]#ies", "\$this->regex_exclaime_tag(array('name' => '\\1', 'txt' => '\\2'))", $txt );
	}
		else {
 					  $txt = preg_replace( "#\[(mod|ex)(=.+?)?\](.+?)\[/(mod|ex)\]#is", '\\3', $txt);
 		 }

//Найти

		//-----------------------------------------
		// New quote
		//-----------------------------------------

//Выше добавить


		//-----------------------------------------
		// Mod and ex tags
		//-----------------------------------------

		$txt = preg_replace( "#<!--mod1-->(.+?)<!--name_st-->(.+?)<!--name_end-->(.+?)<!--emod1-->#", '[mod=\\2]', $txt);
		$txt = preg_replace( "#<!--mod2-->(.+?)<!--emod2-->#", '[/mod]', $txt);

		$txt = preg_replace( "#<!--excl1-->(.+?)<!--name_st-->(.+?)<!--name_end-->(.+?)<!--eexcl1-->#", '[ex=\\2]', $txt);
		$txt = preg_replace( "#<!--excl2-->(.+?)<!--eexcl2-->#", '[/ex]'  , $txt );

//Найти

/*-------------------------------------------------------------------------*/
// OVERWRITE DEFAULT: convert_emoticon:
/*-------------------------------------------------------------------------*/

//Выше добавить

	/**************************************************/
	// regex_mod_tag: Builds this code tag HTML
	//
	/**************************************************/

	function regex_mod_tag($in = array()) {
		  if ($in['txt'] == '') return;
					  /*
			// Take a stab at removing most of the common
			// smilie characters.

			//$txt = str_replace( "&" , "&", $txt );
			$txt = preg_replace( "#<#"   , "<", $txt );
			$txt = preg_replace( "#>#"   , ">", $txt );
			$txt = preg_replace( "#"#" , """, $txt );
			$txt = preg_replace( "#:#"	  , ":", $txt );
			$txt = preg_replace( "#\[#"	 , "[", $txt );
			$txt = preg_replace( "#\]#"	 , "]", $txt );
			$txt = preg_replace( "#\)#"	 , ")", $txt );
			$txt = preg_replace( "#\(#"	 , "(", $txt );
			$txt = preg_replace( "#\r#"	 , "<br>", $txt );
			$txt = preg_replace( "#\n#"	 , "<br>", $txt );
			$txt = preg_replace( "#\s{1};#" , ";", $txt );

			// Ensure that spacing is preserved

			$txt = preg_replace( "#\s{2}#", "  ", $txt ); */
		if ($in['name'] == '')
	$in['name'] = $this->ipsclass->member['members_display_name'];

	return "<!--mod1--><div style='width:100%;'><div class='mod_up'>Сообщение от модератора <b><!--name_st-->".$in['name']."<!--name_end--></b></div><div class='mod_down'><!--emod1-->".$in['txt']."<!--mod2--></div></div><!--emod2-->";

	}

   /**************************************************/
	// regex_exclaime_tag: Builds this code tag HTML
	//
	/**************************************************/

	function regex_exclaime_tag($ix = array()) {
			if ($ix['txt'] == '') return;

			// Take a stab at removing most of the common
			// smilie characters.

			//$txt = str_replace( "&" , "&", $txt );
			$txt = preg_replace( "#<#"   , "<", $txt );
			$txt = preg_replace( "#>#"   , ">", $txt );
			$txt = preg_replace( "#"#" , """, $txt );
			$txt = preg_replace( "#:#"	  , ":", $txt );
			$txt = preg_replace( "#\[#"	 , "[", $txt );
			$txt = preg_replace( "#\]#"	 , "]", $txt );
			$txt = preg_replace( "#\)#"	 , ")", $txt );
			$txt = preg_replace( "#\(#"	 , "(", $txt );
			$txt = preg_replace( "#\r#"	 , "<br>", $txt );
			$txt = preg_replace( "#\n#"	 , "<br>", $txt );
			$txt = preg_replace( "#\s{1};#" , ";", $txt );

			// Ensure that spacing is preserved
			$txt = preg_replace( "#\s{2}#", "  ", $txt );
		if ($ix['name'] == '')
	$ix['name'] = $this->ipsclass->member['members_display_name'];

	return "<!--excl1--><div style='width:100%;'><div class='ex_up'>Строгое предупреждение от модератора <b><!--name_st-->".$ix['name']."<!--name_end--></b></div><div class='ex_down'><!--eexcl1-->".$ix['txt']."<!--excl2--></div></div><!--eexcl2-->";
	}


Открыть /source/classes/post/class_post_edit.php


//Найти

	if ( ($this->orig_post['author_id'] == $this->ipsclass->member['id']) and ($this->ipsclass->member['g_edit_posts']))

//Заменить на

			if ( ($this->orig_post['author_id'] == $this->ipsclass->member['id']) and ($this->ipsclass->member['g_edit_posts']) and !$this->orig_post['has_modcomment'] or $this->ipsclass->member['is_mod'] == 1)


//Найти

	//-----------------------------------------
	// Update the database (ib_forum_post)
	//-----------------------------------------

	$this->post['append_edit'] = 1;

	if ( $this->ipsclass->member['g_append_edit'] )
	{
		if ( $this->ipsclass->input['add_edit'] != 1 )
		{
			$this->post['append_edit'] = 0;
		}
	}

//Ниже добавить

			if (strpos($this->post['post'], '<!--mod1-->')!==FALSE || strpos($this->post['post'], '<!--excl1-->')!==FALSE)
			{
				$this->post['has_modcomment'] = 1;
			} else {
				$this->post['has_modcomment'] = 0;
			}



//В админке в CSS добавить

.mod_up {
background: #E4EAF2 url(<#IMG_DIR#>/mod.gif) no-repeat right;
border: 1px solid #0084FF;
border-left: 4px solid #0084FF;
color: #000;
border-bottom: 0;
font-size: 10px;
line-height: 40px;
padding-left:10px;
vertical-align: middle;
}

.mod_down {
background: #FAFCFE;
border: 1px solid #0084FF;
border-left: 4px solid #0084FF;
border-top: 0;
color: #0084FF;
font-weight: bold;
padding: 4px;
}

.ex_up {
background: #E4EAF2 url(<#IMG_DIR#>/ex.gif) no-repeat right;
border: 1px solid red;
border-left: 4px solid red;
color: #000;
border-bottom: 0;
font-size: 10px;
line-height: 40px;
padding-left:10px;
vertical-align: middle;
}

.ex_down {
background: #FAFCFE;
border: 1px solid red;
border-left: 4px solid red;
border-top: 0;
color: red;
font-weight: bold;
padding: 4px;
}

//Загрузить картинки в style_images/#название скина#/

Помогите под 2.3 переделать :cry:

Изменено пользователем -Cross-
Ссылка на комментарий
Поделиться на других сайтах

  • 0

руки крюки значит...

кстати они уже оптимизированы под третью версию

| > Exclaim Tags Module

| > Module written by Vic'er

из файлового архива качал

Ссылка на комментарий
Поделиться на других сайтах

  • 0

сорре тогда :D

------------------------------

посмотрел твой мод

по функционалу вроде тоже самое ...

Изменено пользователем Vilz
Ссылка на комментарий
Поделиться на других сайтах

  • 0

Просто в моде, линк на который Вы давали:

1) Был совершенно другой шаблон

2) Не писался ник того, кто выдал предупреждение или написал сообщение модератора.

Ссылка на комментарий
Поделиться на других сайтах

  • 0

Уже не актуально :D

По моей просьбе Sannis переделал мод под 2.3 за что ему спасибо.

Внешний вид тегов сделал я (кнопки, фоны, css).

Все, кому нужна версия под 2.3, идём СЮДА.

Ссылка на комментарий
Поделиться на других сайтах

Присоединиться к обсуждению

Вы можете ответить сейчас, а зарегистрироваться позже. Если у вас уже есть аккаунт, войдите, чтобы ответить от своего имени.

Гость
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Ответить на вопрос...

×   Вы вставили отформатированный текст.   Удалить форматирование

  Допустимо не более 75 смайлов.

×   Ваша ссылка была автоматически заменена на медиа-контент.   Отображать как ссылку

×   Ваши публикации восстановлены.   Очистить редактор

×   Вы не можете вставить изображения напрямую. Загрузите или вставьте изображения по ссылке.

Зарузка...
×
×
  • Создать...

Важная информация

Находясь на нашем сайте, вы соглашаетесь на использование файлов cookie, а также с нашим положением о конфиденциальности Политика конфиденциальности и пользовательским соглашением Условия использования.