Jump to content
View in the app

A better way to browse. Learn more.

IPBMafia.ru - поддержка Invision Community, релизы, темы, плагины и приложения

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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

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

  • 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;
	}

Edited by usergeuv1

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

Edited by Bapxammep

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

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

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

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

Edited by usergeuv1

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.