Skip to content
View in the app

A better way to browse. Learn more.

Дизайн и модификация 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.

Скрытие ссылок для гостей

Подскажите как в ipb 2.3.6 сделать так, чтобы гости не видели ссылок, чтобы для гостей ссылки отражались как скрытый текст. спасибо.

ЗЫ пользовался поиском - не нашел.

Featured Replies

Подскажите как в ipb 2.3.6 сделать так, чтобы гости не видели ссылок, чтобы для гостей ссылки отражались как скрытый текст. спасибо.

ЗЫ пользовался поиском - не нашел.

в выводе топика повешать регулярку, которая меняет ссылку на что хотите, если это гость

  • Author
в выводе топика повешать регулярку, которая меняет ссылку на что хотите, если это гость

 

а по подробнее можно - где - куда и что

vfnef, где то мод такой был - там вместо ссылки как раз и вешалось что угодно))

 

P.S. ставил когда то кому то - названия не помню.

а по подробнее можно - где - куда и что

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

  • 5 years later...

В /sources/action_public/topics.php

Найти:

 

//-----------------------------------------
	// Highlight...
	//-----------------------------------------

Добавить перед:

 

if (!$this->ipsclass->member['id'])
	{
		//-----------------------------------------
		// Clear links for guests
		//-----------------------------------------

		$row['post'] = preg_replace( "#<a href=[\"'].+?[\"'].+?>.+?</a>#", "<i>ссылка</i>", $row['post'] );
	}

 

В /sources/classes/post/class_post.php

Найти:

 

$extra = "";

					if ( $tmp_post )
					{
						$raw_post .= "[quote name='".$this->parser->make_quote_safe($tp['author_name'])."' date='".$this->parser->make_quote_safe($this->ipsclass->get_date( $tp['post_date'], 'LONG', 1 ))."' post='".$tp['pid']."']\n$tmp_post\n".$extra.'[/quote]'."\n\n\n";
					}

Добавить перед:

 

if (!$this->ipsclass->member['id'])
	{
		//-----------------------------------------
		// Clear links for guests
		//-----------------------------------------

		$tmp_post = preg_replace( "#\[url\](\S+?)\[/url\]#i", "[i]ссылка[/i]", $tmp_post );
		$tmp_post = preg_replace( "#\[url\s*=\s*\& quot\;\s*(\S+?)\s*\& quot\;\s*\](.*?)\[\/url\]#i" , "\\2", $tmp_post );
		$tmp_post = preg_replace( "#\[url\s*=\s*(\S+?)\s*\](.*?)\[\/url\]#i", "\\2", $tmp_post );
	}

Где "ссылка", является текстом для замены url

Edited by gerodot

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

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.