Şöyle simplemachines'in mod bölümünü dolaşıyordum bu modu buldum :D belki işinize yarar ;)
Mod Sahibi : Dragooon
Türkçe çevirisi bana aittir ;)
Bu mod belirlediğiniz üye grupları dışındakilerin art arda mesaj atmasını engelliyor. (süreyi gün olarak belirleyebiliyorsunuz.)
Mod sayfası: http://custom.simplemachines.org/mods/index.php?mod=1018
Mod linki: http://custom.simplemachines.org/mods/index.php?action=download;mod=1018;id=43999
Ben bunu yüklemedim uğraşıp manuelini çöz(dür)düm :D manuelini yükledim gayet güzel çalışıyor isteyenler için onu da vereyim
$sourcedir/Post.php
bul
function Post()
{
sonrasına ekle
// Double Post Stopper change - Start
if(bumpAttempt())
fatal_lang_error('double_post_attempt');
// End
bul
function Post2()
{
sonrasına ekle
// Double Post Stopper change - Start
if(bumpAttempt())
fatal_lang_error('double_post_attempt');
// End
bul
?>
öncesine ekle
function bumpAttempt() {
// This function here is for the Mod : Double Post Stopper, Made by Dragooon.
// It Checks weather the Poster is trying to bump the topic or not.
global $db_prefix, $ID_MEMBER, $topic, $modSettings;
if(isset($topic)) {
// Do the Query to grab the stuff for checking.
$result = db_query("SELECT
t.ID_TOPIC, t.ID_LAST_MSG, m.ID_MSG, m.ID_MEMBER, m.posterTime
FROM
{$db_prefix}topics AS t, {$db_prefix}messages AS m
WHERE
t.ID_LAST_MSG = m.ID_MSG
AND m.ID_TOPIC = $topic
AND m.ID_MEMBER = $ID_MEMBER
LIMIT 1"
,__FILE__,__LINE__);
$row = mysql_fetch_assoc($result);
// Check it if its a Bump Attempt
// The Poster Time assigned to the variable
$lpt = $row['posterTime'];
$timeTHold = $modSettings['doublePostThold'] * 60 * 60 * 24;
// Declare it false in begginning. If some conditions gets true, It turns into true, else it goes as false.
$bumpAttempt = false;
// Time Not set or it is 0? Declare it as true then
if(empty($modSettings['doublePostThold']))
$bumpAttempt = true;
// Is it set? Do some crazy stuff to check it :p
elseif ($lpt + $timeTHold > time())
$bumpAttempt = true;
// And finally go with the returning stuff.
if(mysql_num_rows($result) > 0 && !isset($_REQUEST['msg']) && $bumpAttempt && !allowedTo('doublePost'))
return true;
else
return false;
} else {
return false;
}
mysql_free_result($result);
}
$languagedir/Modifications.english.php
bul
?>
öncesine ekle
// Double Post stopper strings
$txt['double_post_attempt'] = 'Sorry, but you are not allowed to double post. Please go back and edit your previous post.';
$txt['permissionname_doublePost'] = 'Allow them to Double post';
$txt['permissionhelp_doublePost'] = 'By Enabling this You will allow them to double post.';
$txt['doublePostAdmin_main'] = 'Time before the user is not allowed to double post';
$txt['doublePostHelp'] = 'Time(in Days) before double posting is considered as a bump attempt. A user is not allowed to post a continous second reply within the given time threshhold.';
$txt['doublePostAdmin_sub'] = 'Is set as in Days. Click on the "?" if you want more information. Leave Blank to prevent double posting always';
$sourcedir/ManagePermissions.php
bul
'report_any' => false,
sonrasına ekle
'doublePost' => false,
$sourcedir/ManagePosts.php
bul
'enableAllMessages' => empty($_POST['enableAllMessages']) ? '0' : (int) $_POST['enableAllMessages'],
'enablePreviousNext' => empty($_POST['enablePreviousNext']) ? '0' : '1',
sonrasına ekle
'doublePostThold' => $_POST['doublePostThold'],
$themedir/Admin.template.php
bul
<td valign="top">
<input type="checkbox" name="enablePreviousNext" id="enablePreviousNext_check"', empty($modSettings['enablePreviousNext']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr>
sonrasına ekle
<tr class="windowbg2">
<td colspan="2"><hr /></td>
</tr>
<tr class="windowbg2">
<th width="50%" align="right">
<label for="doublePostThold">', $txt['doublePostAdmin_main'] ,'</label> <span style="font-weight: normal;">(<a href="', $scripturl, '?action=helpadmin;help=doublePostHelp" onclick="return reqWin(this.href);">?</a>)</span>:
<div class="smalltext" style="font-weight: normal;">', $txt['doublePostAdmin_sub'] , '</div>
</th>
<td valign="top">
<input type="text" name="doublePostThold" id="doublePostThold" value="', $modSettings['doublePostThold'] ,'" size="5" /> ', $txt['manageposts_days'], '
</td>
</tr>
Türkçe için:
$languagedir/Modifications.turkish.php
bul
?>
öncesine ekle
// Double Post stopper strings Turkish
$txt['double_post_attempt'] = 'Aynı konuya ikinci bir ileti göndermeye yetkiniz yok. Lütfen geri dönüp önceki iletinizi düzenleyiniz.';
$txt['permissionname_doublePost'] = 'Flood mesajlara izin ver';
$txt['permissionhelp_doublePost'] = 'Bunu seçerseniz flood mesajlara izin vermiş olursunuz.';
$txt['doublePostAdmin_main'] = 'Flood mesaj atabilmek için gereken süre';
$txt['doublePostHelp'] = 'Flood mesajların engelleneceği süre (gün olarak). Kullanıcı belirtilen zaman içinde ikinci bir mesajı gönderemez.';
$txt['doublePostAdmin_sub'] = 'Gün olarak belirlenir. Ayrıntılı bilgi için "?" tıklayınız. Flood mesajları sürekli engellemek istiyorsanız boş bırakınız.';
Bir süredir arıyordum ama bulamamıştım 1.1.4 sürümü ile uyumlu olanını. Şimdi kurdum ve düzgün bir şekilde çalışıyor.
Teşekkürler.
Quote from: navruz on December 07, 2007, 02:28:10 PM
Bir süredir arıyordum ama bulamamıştım 1.1.4 sürümü ile uyumlu olanını. Şimdi kurdum ve düzgün bir şekilde çalışıyor.
Teşekkürler.
Birşey değil kardeşim ;)
teşekkürler ;)
elinize sağlık arkadaşım.Peki süreyi nereye yazıyoruz pek anlıyamadım.Ve ben admin olrka deneme yaptım bende oldu diğer yöneticilerde yani g.mod. böyle birşey olucakmıdır.
Quote from: the lord on February 10, 2008, 06:16:06 PM
elinize sağlık arkadaşım.Peki süreyi nereye yazıyoruz pek anlıyamadım.Ve ben admin olrka deneme yaptım bende oldu diğer yöneticilerde yani g.mod. böyle birşey olucakmıdır.
Admin -> mesaj ve konula -> Flood süresi
Admin -> Üye izinleri -> burdaki grupların hangısınde bu özelliği pasif edeceksen Flood yapmasına iizn ver i işarelicksin
Bu mod flod mesaj yazmayı komple mi engelliyor yoksa Hüsmen'in mod'u gibi önceki ile birliştiriyormu ???
Belirlenen süre içinde art arda mesaj atmayı tamamen engelliyor
peki bunu gün değilde dakika hesabı nasıl yapabiliriz...
Quote from: Fth.61 on November 08, 2008, 05:02:21 AM
peki bunu gün değilde dakika hesabı nasıl yapabiliriz...
eski bir modifikasyon da mevcuttu ancak kaldırdıldı sanırsam.