форум vBSupport.ru > vBulletin > vBulletin 3.8.x > Хаки, моды и скрипты 3.8
  • »
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
 
 
 
 
AntiPiton
Эксперт
 
AntiPiton's Avatar
Thumbs up Show First Post Only To Unregistered User / Guest
9

Show First Post Only To Unregistered User / Guest - Показывать только первый пост гостям

Когда то попал на такой форум с таким хаком, сегодня случайно увидел его на орге, тут вроде не было, поэтому выкладываю.

Автор хака: Raptor
Тестировался на vB: 3.8.1/3.8.2 (портирован с версии 3.7.0)

Установка:

1. Правим шаблон postbit_legacy или postbit, в зависимости от того, который вы используете.

Находим:

Code:
<!-- message -->
<div id="post_message_$post[postid]">
	$post[message]
</div>
<!-- / message -->
Меняем на:

Code:
<!-- message -->

<if condition="$show['member']">
		<div id="post_message_$post[postid]">
                $post[message]
		</div>				
		<else />				
		<if condition="$post[postcount] == 1">
		<div id="post_message_$post[postid]">
                $post[message]</div>
		</if>
		<else />
		<if condition="$show['guest']">
		<if condition="$post[postcount] != 1">
		<br><br>You Must be a registered member and logged in to view this response.  To Register <a href=register.php>Please Click Here</a>
		<br><br>
		</if></if></if>

<!-- / message -->
Результат:



=-=-=-=-=-=-=-=-=-=-=-=-=-

Немного модифицированная версия:

1. Загрузить Warn.png в images/misc/
2. Стили и шаблоны - Управление стилями - Вперед - Дополнительные определения CSS (практически в самом низу):
Code:
.warning-box,
{
	color: #000;
	border: 1px solid #000;
	-moz-border-radius: 5px;
	background-color: #defee3;
	padding: 6px;
	text-align:left;
}

.warning-box img,
{
	float:left;
	margin-top: 10px;
	margin-right: 5px;
	vertical-align:middle;
	border: 0px;
}

.warning-box h2,
.warning-box p,
{
	padding: 0px;
	margin:  0px;
	margin-left: 60px;
}

.warning-box h2,
{
	padding-bottom: 4px;
	font-size: 14px;
	border-bottom: 1px solid #000;
}

.warning-box h1,
{
	padding: 0px;
	margin:  0px;
	margin-left: 60px;
	font-size: 12px;
        font-weight:normal;
}

.warning-box h6,
{
	margin:  20px;
	padding: 0px;
	margin-left: 60px;
	font-size: 12px;
        font-weight:normal;
}

.warning-box
{
	background-color: #FFCCCC;
}

.warning-box ul,
{
	margin-left: 30px;
}
В Postbit или Postbit_Legacy находим:

Code:
<!-- message -->
<div id="post_message_$post[postid]">
	$post[message]
</div>
<!-- / message -->
Меняем на:

Code:
<!-- message -->

<if condition="$show['member']">
		<div id="post_message_$post[postid]">
                $post[message]
		</div>				
		<else />				
		<if condition="$post[postcount] == 1">
		<div id="post_message_$post[postid]">
                $post[message]</div>
		</if>
		<else />
		<if condition="$show['guest']">
		<if condition="$post[postcount] != 1">


<div class='warning-box'>
<img src='images/misc/warn.png' alt='Warning' />
<h2><strong>Warning</strong></h2>
<h1><font color="#000000">

<br><br>You Must be a registered member and logged in to view this response.  To Register <a href=register.php>Please Click Here</a>

</font></h1>
<br /><br /></div>

<br><br>
</if></if></if>

<!-- / message -->
Получаем:
Attached Images
 
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
StenLi
На доске почёта
Пожизненный блэк
 
banned nax
Default
0

AntiPiton, Спасибо)

ПС. Настоятельно рекомендую задуматься, перед установкой, тем, у кого основной трафф с поисковых систем.
Т.к. по дефолту - Боты сирчсустемс - тоже гости
 
 
Luvilla
Гость
Default

Quote:
Originally Posted by StenLi View Post
сирчсустемс

"сирч" - ну ещё туды-сюды... но "сустемс"... О_о... есть у меня знакомый, он произносит "стулус" - мы оооочень долго пытались понять, что ето за зверь
 
 
kerk
k0t
 
kerk's Avatar
Default
2

Quote:
Originally Posted by Luvilla View Post
он произносит "стулус"
"стулус жидкус"?
 
 
Smalesh
В Черном списке
Default
0

Quote:
Originally Posted by StenLi View Post
Настоятельно рекомендую задуматься, перед установкой, тем, у кого основной трафф с поисковых систем.
Угу. Хак ммеет смысл, если доработать и привязать к определенным разделам.
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT +4. The time now is 09:24 PM.


Powered by vBulletin® Version 3.6.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Loading...