Muradiye Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Aşağa gitmek
BaRaN
BaRaN

FLood Koruması 1210
Erkek Yay
Yılan
Mesaj Sayısı : 873
Doğum tarihi : 02/12/89
Yaş : 34
Nerden : güneşin doğduğu yer(DOĞUBEYAZIT)
İş/Hobi : cep telefonu
Bilgi : <center><font color="blue"><marquee direction="left" style="background:white">Muradiye Forum Bilgi Paylaşım Platformu</marquee></font></center
Rep Gücü : 0
Rep Puan : 8
Kayıt tarihi : 20/12/08
http://muradiyeforum.net

FLood Koruması Empty FLood Koruması

Perş. Şub. 05, 2009 12:19 pm
üye art arda mesaj yasamamktadır belirli bi süre tabi







Includes/Functions_Newpost.php Dosyasını acın ve aLttaki kodu buLun

Kod:
= ->save();<****>aşağı dali ile değiştirin


Kod:
// ########### Xenon\\\\\\\\\\\\\\\'s prevent doublepost hack #########
= array(
\\\\\\\\\\\\\\\'timespan\\\\\\\\\\\\\\\' => 3600 * 24,// how many
seconds after the last post the new post is defined as doublepost
\\\\\\\\\\\\\\\'spacer\\\\\\\\\\\\\\\' => "\n\n", // What should be
between the old post and the new one (default: two empty lines)
\\\\\\\\\\\\\\\'editedbymsg\\\\\\\\\\\\\\\' =>
\\\\\\\\\\\\\\\'Automerged Doublepost\\\\\\\\\\\\\\\', // If left blank
no edited by will appear
);

= false;
= Array[\\\\\\\\\\\\\\\'message\\\\\\\\\\\\\\\'];

if ( != \\\\\\\\\\\\\\\'thread\\\\\\\\\\\\\\\'
AND [\\\\\\\\\\\\\\\'lastpost\\\\\\\\\\\\\\\'] > TIMENOW - [\\\\\\\\\\\\\\\'timespan\\\\\\\\\\\\\\\']
AND [\\\\\\\\\\\\\\\'lastposter\\\\\\\\\\\\\\\'] == ->userinfo[\\\\\\\\\\\\\\\'username\\\\\\\\\\\\\\\'])
{
// we are here, so we may have a doublepost -> do more exact checkings
= ->db->query_first("
SELECT post.*
FROM " . TABLE_PREFIX . "post AS post
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog
ON(deletionlog.primaryid = post.postid AND type =
\\\\\\\\\\\\\\\'post\\\\\\\\\\\\\\\')
WHERE threadid =
AND dateline > " . (TIMENOW - [\\\\\\\\\\\\\\\'timespan\\\\\\\\\\\\\\\']) . "
AND visible = 1 AND deletionlog.primaryid IS NULL
ORDER BY dateline DESC
LIMIT 1
");

if ([\\\\\\\\\\\\\\\'userid\\\\\\\\\\\\\\\'] == ->userinfo[\\\\\\\\\\\\\\\'userid\\\\\\\\\\\\\\\'])
{
// we truely have a doublepost, now check if the merged post still fits the rules!
=& datamanager_init(\\\\\\\\\\\\\\\'Post\\\\\\\\\\\\\ \\', ,
ERRTYPE_ARRAY, \\\\\\\\\\\\\\\'threadpost\\\\\\\\\\\\\\\');
->set_existing();
Array[\\\\\\\\\\\\\\\'message\\\\\\\\\\\\\\\'] =
[\\\\\\\\\\\\\\\'pagetext\\\\\\\\\\\\\\\'] .
[\\\\\\\\\\\\\\\'spacer\\\\\\\\\\\\\\\'] .
Array[\\\\\\\\\\\\\\\'message\\\\\\\\\\\\\\\'];

// set info
->set_info(\\\\\\\\\\\\\\\'preview\\\\\\\\\\\\\\\ ', Array[\\\\\\\\\\\\\\\'preview\\\\\\\\\\\\\\\']);
->set_info(\\\\\\\\\\\\\\\'parseurl\\\\\\\\\\\\\\\' , Array[\\\\\\\\\\\\\\\'parseurl\\\\\\\\\\\\\\\']);
->set_info(\\\\\\\\\\\\\\\'posthash\\\\\\\\\\\\\\\' , Array[\\\\\\\\\\\\\\\'posthash\\\\\\\\\\\\\\\']);
->set_info(\\\\\\\\\\\\\\\'forum\\\\\\\\\\\\\\\', );
->set_info(\\\\\\\\\\\\\\\'thread\\\\\\\\\\\\\\\' , );

// set options
->setr(\\\\\\\\\\\\\\\'showsignature\\\\\\\\\\\\\\\ ', Array[\\\\\\\\\\\\\\\'signature\\\\\\\\\\\\\\\']);
->setr(\\\\\\\\\\\\\\\'allowsmilie\\\\\\\\\\\\\\\ ', Array[\\\\\\\\\\\\\\\'enablesmilies\\\\\\\\\\\\\\\']);

// set data
->setr(\\\\\\\\\\\\\\\'pagetext\\\\\\\\\\\\\\\', Array[\\\\\\\\\\\\\\\'message\\\\\\\\\\\\\\\']);
->setr(\\\\\\\\\\\\\\\'iconid\\\\\\\\\\\\\\\', Array[\\\\\\\\\\\\\\\'iconid\\\\\\\\\\\\\\\']);

->pre_save();
if (!->errors)
{
// merged post is ok, so do merging
= true;
unset();
=& ;
Array[\\\\\\\\\\\\\\\'postid\\\\\\\\\\\\\\\'] = [\\\\\\\\\\\\\\\'postid\\\\\\\\\\\\\\\'];
}
else
{
// merging will produce errors so keep it as a single post..
= false;
}
}
}

if ()
{
= [\\\\\\\\\\\\\\\'postid\\\\\\\\\\\\\\\'];
->save();

//now add edited by
if ([\\\\\\\\\\\\\\\'editedbymsg\\\\\\\\\\\\\\\'] != \\\\\\\\\\\\\\\'\\\\\\\\\\\\\\\')
{
->db->query_write("
REPLACE INTO " . TABLE_PREFIX . "editlog (postid, userid, username, dateline, reason)
VALUES (, " . ->userinfo[\\\\\\\\\\\\\\\'userid\\\\\\\\\\\\\\\'] .
", \\\\\\\\\\\\\\\'" .
addslashes(->userinfo[\\\\\\\\\\\\\\\'username\\\\\\\\\\\\\\\']) .
"\\\\\\\\\\\\\\\', " . TIMENOW . ", \\\\\\\\\\\\\\\'" .
addslashes([\\\\\\\\\\\\\\\'editedbymsg\\\\\\\\\\\\\\\']) .
"\\\\\\\\\\\\\\\')
");
}
}
else
{
// no doublepost so save as new post
Array[\\\\\\\\\\\\\\\'message\\\\\\\\\\\\\\\'] = ;
= ->save();
}<****>
Sayfa başına dön
Bu forumun müsaadesi var:
Bu forumdaki mesajlara cevap veremezsiniz