Перейти к содержанию

Хайд для ipb 3.3.4


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

да думал прокатит... подскажите, есть что-то такое же для 3.3.1? Шикарный хук, но блин не подходит... может можно передалать или типа того.

может,это типо перейти на новую версию,не?

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

pharaoncheg, хук работает на версиях 3.3.3 и 3.3.4 проверял, версии выше не поддерживаются.... отображаются BB-коды 

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

  • 1 месяц спустя...

А как сделать, что бы администратор мог всегда видеть хайд, не важно какие в нём указаны параметры?

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

  • 2 недели спустя...

При вводи опций 

msg-10339-0-00209100-1375826474.png

Появляются непонятные знаки с каким хайд не работает 

msg-10339-0-66550500-1375826481_thumb.pn

 

Может ошибаюсь, но я так понял, что проблема с этим файлом "ritsu_hide_text.php" 

 

 

class bbcode_hide extends bbcode_parent_class implements bbcodePlugin

{

/**

* Constructor

*

* @access public

* @param object Registry object

* @return void

*/

public function __construct( ipsRegistry $registry )

{

$this->currentBbcode = 'hide';

parent::__construct( $registry );

}

public function preDbParse( $txt )

{

return parent::preDbParse( $txt );

}

public function preDisplayParse( $txt )

{

return parent::preDisplayParse( $txt );

}

/**

* Do the actual replacement

*

* @access protected

* @param string $txt Parsed text from database to be edited

* @return string BBCode content, ready for editing

*/

protected function _replaceText( $txt )

{

$_tags = $this->_retrieveTags();

foreach( $_tags as $_tag )

{

$open_tag = '[' . $_tag;

$close_tag = '[/' . $_tag . ']';

while( ( $this->end_pos = stripos( $txt, $close_tag, $this->end_pos ) ) !== false )

{

$this->cur_pos = $this->end_pos;

while( $this->cur_pos > 0 )

{

$this->cur_pos = $this->cur_pos - 1;

if( $this->cur_pos < 0 )

{

break;

}

if( stripos( $txt, $open_tag, $this->cur_pos ) === $this->cur_pos )

{

$open_length = strlen($open_tag);

$_option = '';

$quoteOptions = array();

if( substr( $txt, $this->cur_pos + strlen($open_tag), 1 ) == ' ' )

{

$open_length += 1;

$_option = substr( $txt, $this->cur_pos + $open_length, (strpos( $txt, ']', $this->cur_pos ) - ($this->cur_pos + $open_length)) );

$quoteOptions = $this->_extractSurgicallyTehOptions( $_option );

}

else if( (strpos( $txt, ']', $this->cur_pos ) - ( $this->cur_pos + $open_length )) !== 0 )

{

continue;

}

$_content = substr( $txt, ($this->cur_pos + $open_length + strlen($_option) + 1), (stripos( $txt, $close_tag, $this->cur_pos ) - ($this->cur_pos + $open_length + strlen($_option) + 1)) );

$_content = IPSText::br2nl( $_content );

$_content = trim( $_content );

$_content = nl2br( $_content );

$txt = substr_replace( $txt, $this->_buildOutput( $_content, $quoteOptions ? $quoteOptions : '' ), $this->cur_pos, (stripos( $txt, $close_tag, $this->cur_pos ) + strlen($close_tag) - $this->cur_pos) );

break;

}

}

$this->end_pos += 1;

if( $this->end_pos > strlen($txt) )

{

$this->end_pos = 0;

break;

}

}

}

return $txt;

}

/**

* Raw options string

*

* @access private

* @param string $string The options submitted with the post as a string

* @return array Key => value Option pairs

*/

private function _extractSurgicallyTehOptions( $options='' )

{

if( !$options )

{

return array();

}

/**

* Strip tags removes any added tags

* @see __community.inv...te-starter-tag/

*/

$options = str_replace( ''', "'", strip_tags($options) );

$options = str_replace( '"', '"', $options );

$finalOpts = array();

// Need to push through string, pulling out keys/options

$pos = 0;

$options = trim($options);

$key = '';

$value = '';

$inKey = true;

$inValue = false;

while( $pos < strlen($options) )

{

if( $options{$pos} == ' ' AND !$inKey AND !$inValue )

{

$key = '';

$value = '';

$inKey = true;

}

else if( $options{$pos} == "'" OR $options{$pos} == '"' )

{

if( $inKey )

{

$inKey = false;

$inValue = true;

}

else

{

$inValue = false;

$finalOpts[ trim($key) ] = $value;

}

}

else

{

if( $inKey )

{

if( $options{$pos} != '=' )

{

$key .= $options{$pos};

}

}

else if( $inValue )

{

$value .= $options{$pos};

}

}

$pos++;

}

return $finalOpts;

}

/**

* Build the actual output to show

*

* @access private

* @param integer $option Font size

* @param string $content Text

* @return string Content to replace bbcode with

*/

private function _buildOutput( $content, $options=array() )

{

//-----------------------------------------

// Strip the optional quote delimiters

//-----------------------------------------

$condition = array (

'auth' => '1',

'thank' => '0',

'rep' => '0',

'reply' => '0',

'posts' => '0',

'group' => array('any'),

'nick' => array('any')

);

if(is_array($options))

while(list($key, $val) = each($condition))

{

if(array_key_exists($key, $options))

{

switch($key)

{

case 'auth': case 'thank': case 'reply':

$condition[$key] = ($options[$key] == "1") ? "1": "0";

break;

case 'rep': case 'posts':

$val = intval($options[$key]);

if($val > 0 && $val < 1000000) $condition[$key] = $val;

break;

case 'nick':

$in = explode(",", $options[$key]);

while(list($key, $val) = each($in)) $in[$key] = $this->DB->addSlashes( strtolower( $in[$key] ) );

$out = array( );

if(sizeof($in) > 0)

{

$this->DB->build( array(

'select' => "m.member_id",

'from' => array('members' => 'm'),

'where' => 'lower(name) IN("'.implode('", "', $in).'")'

) );

$query = $this->DB->execute();

while($member = $this->DB->fetch($query))

{

$out[] = $member["member_id"];

}

}

if(sizeof($out) > 0)

$condition['nick'] = $out;

break;

case 'group':

$in = explode(",", $options[$key]);

while(list($key, $val) = each($in)) $in[$key] = $this->DB->addSlashes( strtolower( $in[$key] ) );

$out = array( );

if(sizeof($in) > 0)

{

$this->DB->build( array(

'select' => "g.g_id",

'from' => array('groups' => 'g'),

'where' => 'lower(g.g_title) IN("'.implode('", "', $in).'")'

) );

$query = $this->DB->execute();

while($group = $this->DB->fetch($query))

{

$out[] = $group["g_id"];

}

}

if(sizeof($out) > 0)

$condition['group'] = $out;

break;

}

}

}

$condition_serialized = serialize( $condition );

$hash = md5($content.$condition_serialized);

$this->DB->build( array(

'select' => "r.*",

'from' => array('ritsu_hide_text' => 'r'),

'where' => 'r.key = "'.$hash.'"'

) );

$query = $this->DB->execute();

$exists = false;

while($block = $this->DB->fetch($query))

{

if( ( $block["condition"] == $condition_serialized ) && ( $block["data"] == $content ) )

{

$key = $block["key"];

$exists = true;

}

}

if(!$exists)

{

$key = $hash;

$block = array(

'key' => $hash,

'condition' => $condition_serialized,

'data' => $content

);

$this->DB->insert( 'ritsu_hide_text', $block );

}

return "

Загрузка...

";

}

}

 

 

Помогите убрать ошибку 

Прикрепленные файлы
  • rar.gif  Hide.rar   8,88К   Количество загрузок: 0

 

 

Наверное вот тут ошибка,  Как убрать

 


	 * Raw options string
	 *
	 * @access	private
	 * @param	string		$string		The options submitted with the post as a string
	 * @return	array					Key => value Option pairs
	 */
	private function _extractSurgicallyTehOptions( $options='' )
	{
		if( !$options )
		{
			return array();
		}

		/**
		 * Strip tags removes any added tags
		 * @see	__community.invisionpower.com/tracker/issue-19960-problem-when-tags-is-put-inside-quote-starter-tag/
		 */
		$options	= str_replace( '&#39;', "'", strip_tags($options) );
		$options	= str_replace( '&quot;', '"', $options );
		
		$finalOpts	= array();

		// Need to push through string, pulling out keys/options
		
		$pos		= 0;
		$options	= trim($options);
		$key		= '';
		$value		= '';
		$inKey		= true;
		$inValue	= false;
		
		while( $pos < strlen($options) )
		{
			if( $options{$pos} == ' ' AND !$inKey AND !$inValue )
			{
				$key				= '';
				$value				= '';
				$inKey				= true;
			}
			else if( $options{$pos} == "'" OR $options{$pos} == '"' )
			{
				if( $inKey )
				{
					$inKey		= false;
					$inValue	= true;
				}
				else
				{
					$inValue	= false;

					$finalOpts[ trim($key) ]	= $value;
				}
			}
			else
			{
				if( $inKey )
				{
					if( $options{$pos} != '=' )
					{
						$key .= $options{$pos};
					}
				}
				else if( $inValue )
				{
					$value .= $options{$pos};
				}
			}
			
			$pos++;
		}

		return $finalOpts;
	}
Изменено пользователем usergeuv1
Ссылка на комментарий
Поделиться на другие сайты

usergeuv1, не, не будет никого. Такое только за деньги ковырять.

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

После установки увеличился шрифт на главной странице в приложении Unreal Portal, после удаления файла "ritsu_hide_text.php" всё стало норм, помогите пожалуйста решить данную проблему..

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

я вообще не понял...

Выбираю текст для скрытия например "скачать" - нажимаю специальный бб коды  - нахожу "Скрытый текст" - клацаю на него - появляется меню - в вкладке опция ввожу "rep="N" - потом ок - результат [hide='rep="N"']скачать[/hide] , а нужно для нормальной роботы так [hide rep="N"]скачать[/hide], то есть убрать появления этих знаков [hide='rep="N"']скачать[/hide]

usergeuv1, не, не будет никого. Такое только за деньги ковырять.

Зачем неполноценный хайд нужен, можно решить проблему в этой теми ,ведь на 100% у всех такая проблема. мы с вами понимаемым, что убрав лишении знаки, будет нормально работать , а пользователи наших форумов откуда могут знать о баге. 

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

  • 1 год спустя...

на 3.3.1 пойдет? 

лучше попробуйте, возможно подойдет 

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

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

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

Гость
Ответить в этой теме...

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

  Разрешено использовать не более 75 эмодзи.

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

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

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

  • Последние посетители   0 пользователей онлайн

    • Ни одного зарегистрированного пользователя не просматривает данную страницу
×
×
  • Создать...