Kod: Tümünü seç
##############################################################
## MOD Title (EN): Limited character in posts for guests ( ACP )
## (TR): Ziyaretçilere Mesaj İçi Karakter Sınırlaması ( ACP )
##
## MOD Author: MegaPlatform < info@megaplatform.com > (Gökmen ŞEKER) http://www.megaplatform.com
##
## MOD Description (EN): This mod show some content of posts to guests. To read or view
## complete of posts guests must be login or register. You can enable or
## disable this option in ACP and you can set number of character for show
## content of posts to guests.
## (TR): Ziyaretçilere mesajın bir kısmını gösterir devamını görebilmek için
## kayıt olmasını veya giriş yapması gerekli oldugu yazar
## acp den bu özelliği açıp kapayabilirsiniz veya mesaj içinde ziyaretçiye
## gösterilecek karakter sayısını ayarlayabilirsiniz
##
## MOD Version: 1.2.1
##
## Installation Level: (easy/Kolay)
## Installation Time: 10 Minutes/dakika
## Files To Edit:
## viewtopic.php
## admin/admin_board.php,
## language/lang_english/lang_admin.php
## language/lang_english/lang_main.php
## language/lang_turkish/lang_admin.php
## language/lang_turkish/lang_main.php
## templates/subSilver/admin/board_config.tpl,
##
## Included Files: None
##
##
##############################################################
## Author Notes
## (EN): Remember, before adding this MOD to your forum, you
## should backup all files related to this MOD.
## (TR): Kurulum yapmadan önce mutlaka dosya yedeklerini alınız
##
##############################################################
## < www.phpbbturkey.com / www.phpbb.com.tr >
##############################################################
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## Copyright © MegaPlatform.com
##############################################################
#
#-----[ SQL ]------------------------------------------------
# bu sqli phpmyadminden sorgulatın veya db_update.php dosyasını çalıştırın
INSERT INTO phpbb_config (config_name, config_value) VALUES('guest_content', '5');
INSERT INTO phpbb_config (config_name, config_value) VALUES('guest_content_disable', '0');
#
#-----[ OPEN ]------------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------------
#
$user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid'];
#
#-----[ AFTER, ADD ]-----------------------------------------
#
// Ziyaretçilere mesaj içi karakter sınırlaması [ MegaPlatform ]
//
$lettercount = (strlen($message));
if ( ($userdata['username'] == 'Anonymous') && ($lettercount > 0) == 1 && $board_config['guest_content_disable']== 0 )
{
$template->assign_block_vars('switch_disable_guest_content', array());
$path = __FILE__;
$file = basename ($path);
if ($file != 'portal.php')
{
//first check if message has quote in it or a ot, quote box breaks forums layout.
$message = strtolower($message);
$message = str_replace("[quote", "[ quote", $message);
$message = substr(($message), 0, $board_config['guest_content']).'... <b>'.$lang['Guest_content_x'].'<a href="http://'.$board_config['server_name'].$board_config['script_path'].'profile.php?mode=register">'.$lang['Register'].'</a> '.$lang['or'].' <a href="http://'.$board_config['server_name'].$board_config['script_path'].'login.php?redirect=viewtopic.php?t='.$postrow[$i]['topic_id'].'">'.$lang['Login'].'</a> '.$lang['Guest_content_y'].'</b>';
}
}
//
// Ziyaretçilere mesaj içi karakter sınırlaması [ MegaPlatform ]
#
#-----[ OPEN ]------------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------------
#
$timezone_select = tz_select($new['board_timezone'], 'board_timezone');
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Ziyaretçilere mesaj içi karakter sınırlaması [ MegaPlatform ]
//
$guest_content_disable_yes = ( $new['guest_content_disable'] ) ? "checked=\"checked\"" : "";
$guest_content_disable_no = ( !$new['guest_content_disable'] ) ? "checked=\"checked\"" : "";
//
// Ziyaretçilere mesaj içi karakter sınırlaması [ MegaPlatform ]
#
#-----[ FIND ]------------------------------------------------
#
$new['site_desc'] = str_replace('"', '"', $new['site_desc']);
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Ziyaretçilere mesaj içi karakter sınırlaması [ MegaPlatform ]
//
$new['guest_content'] = str_replace('"', '"', $new['guest_content']);
//
// Ziyaretçilere mesaj içi karakter sınırlaması [ MegaPlatform ]
#
#-----[ FIND ]------------------------------------------------
#
"L_SITE_DESCRIPTION" => $lang['Site_desc'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Ziyaretçilere mesaj içi karakter sınırlaması [ MegaPlatform ]
//
"L_GUEST_CONTENT" => $lang['Guest_content'],
"L_GUEST_CONTENTS" => $lang['Guest_contents'],
"L_GUEST_CONTENT_EXPLAIN" => $lang['Guest_content_explain'],
//
// Ziyaretçilere mesaj içi karakter sınırlaması [ MegaPlatform ]
#
#-----[ FIND ]------------------------------------------------
#
"SITE_DESCRIPTION" => $new['site_desc'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Ziyaretçilere mesaj içi karakter sınırlaması [ MegaPlatform ]
//
"GUEST_CONTENT" => $new['guest_content'],
"S_DISABLE_GUEST_CONTENT_YES" => $guest_content_disable_yes,
"S_DISABLE_GUEST_CONTENT_NO" => $guest_content_disable_no,
//
// Ziyaretçilere mesaj içi karakter sınırlaması [ MegaPlatform ]
#
#-----[ OPEN ]------------------------------------------------
#
language/lang_turkish/lang_admin.php
#
#-----[ FIND ]------------------------------------------------
#
//
// That's all Folks!
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Ziyaretçilere mesaj içi karakter sınırlaması [ MegaPlatform ]
//
$lang['Guest_content'] = 'Mesaj İçinde Ziyaretçiye Gösterilecek Karakter Sayısı';
$lang['Guest_contents'] = 'Ziyaretçilere Mesajları Aç';
$lang['Guest_content_explain'] = 'Bu özelliği açarak ziyaretcilerin mesaj içeriğinin tamamını okumasını sağlayabilirsiniz';
//
// Ziyaretçilere mesaj içi karakter sınırlaması [ MegaPlatform ]
#
#-----[ OPEN ]------------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------------
#
//
// That's all Folks!
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Ziyaretçilere mesaj içi karakter sınırlaması [ MegaPlatform ]
//
$lang['Guest_content'] = 'Shown number of character in posts to guests';
$lang['Guest_contents'] = 'Enable content of posts for guests';
$lang['Guest_content_explain'] = 'You can enable this option for read content complete of posts to guests';
//
// Ziyaretçilere mesaj içi karakter sınırlaması [ MegaPlatform ]
#
#-----[ OPEN ]------------------------------------------------
#
language/lang_turkish/lang_main.php
#
#-----[ FIND ]------------------------------------------------
#
//
// That's all Folks!
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Ziyaretçilere mesaj içi karakter sınırlaması [ MegaPlatform ]
//
$lang['Guest_content_x'] = 'mesajın devamını görebilmek için ';
$lang['Guest_content_y'] = 'yapmalısınız';
$lang['or'] = 'olmalı veya';
//
// Ziyaretçilere mesaj içi karakter sınırlaması [ MegaPlatform ]
#
#-----[ OPEN ]------------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------------
#
//
// That's all Folks!
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Ziyaretçilere mesaj içi karakter sınırlaması [ MegaPlatform ]
//
$lang['Guest_content_x'] = '';
$lang['Guest_content_y'] = 'if you want to read the full posting';
$lang['or'] = 'or';
//
// Ziyaretçilere mesaj içi karakter sınırlaması [ MegaPlatform ]
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
<tr>
<td class="row1">{L_SITE_DESCRIPTION}</td>
<td class="row2"><input class="post" type="text" size="40" maxlength="255" name="site_desc" value="{SITE_DESCRIPTION}" /></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1">{L_GUEST_CONTENT}</td>
<td class="row2"><input class="post" type="text" name="guest_content" size="3" maxlength="5" value="{GUEST_CONTENT}"></td>
</tr>
<tr>
<td class="row1">{L_GUEST_CONTENTS}<br /><span class="gensmall">{L_GUEST_CONTENT_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="guest_content_disable" value="1" {S_DISABLE_GUEST_CONTENT_YES} /> {L_YES} <input type="radio" name="guest_content_disable" value="0" {S_DISABLE_GUEST_CONTENT_NO} /> {L_NO}</td>
</tr>
#
#-----[ SAVE/CLOSE ALL FILES ]---------------------------------
#
# EoM