Ziyaretçiler Mesajın ilk X Karakterini Görebilsin

tertunc

Dekan
Emektar
Katılım
18 Ağustos 2007
Mesajlar
7,204
Reaksiyon puanı
21
Puanları
218
Display.template.php dosyasını açınız.

Kod:
', $message['body'], '

Kod:
';
								if($context['user']['is_guest'] && $modSettings['enable-hide-characters'] == 1)
								{
									$message['body']=shorten_subject($message['body'], $modSettings['hide-characters']);
									echo $message['body'].'<br />'.$txt['other-hiding-characters-login-logout'];
								}
								else
								{
									echo $message['body'];
								}
								echo '




ModSettings.turkish.php dosyasını açınız. [Diğer diller için ilgili dosyayı açınız]
Kod:
?>

Kod:
$txt['enable-hide-characters'] = 'Ziyaretçilere sınırlı mesaj gösterilsin mi?';
$txt['hide-characters'] = 'Ziyaretçilere gösterilecek karakter sayısı sınırı';
?>




ModSettings.php dosyasını açınız.
Kod:
			array('text', 'default_personalText'),
			array('int', 'max_signatureLength'),
		'',

Kod:
			array('text', 'default_personalText'),
			array('int', 'max_signatureLength'),
		'',
			array('check', 'enable-hide-characters'),
			array('int', 'hide-characters'),
		'',




index.turkish.php dosyasını açınız. [Diğer diller için ilgili dosyayı açınız]
Kod:
?>
Kod:
$txt['other-hiding-characters-login-logout'] = '[<font color="red">Bu mesajın devamını görebilmek için <a href="'.$scripturl.'?action=register" target="_self">kayıt olun</a> ya da <a href="'.$scripturl.'?action=login" target="_self">giriş yapın</a></font>]';
?>





Eğer sadece ilk mesajda gerçekleşmesini istiyorsanız şunları yapınız. (Önce yukarıdaki kodları uygulayınız)
cakal93 dedi ki:
Kod:
if($context['user']['is_guest'] && $modSettings['enable-hide-characters'] == 1)
Kod:
if($context['user']['is_guest'] && $message['id'] == $context['first_message'] && $modSettings['enable-hide-characters'] == 1)


[red]Not:[/red]Eklentiyi kullanabilmek için Admin --> Forum Seçenekleri sekmesinden ilgili yeri aktif edin ve karakter sayısını yazınız.


http://www.simplemachines.org/community/index.php?topic=211473.0#quickreply
 
Üst