Üyeler Ard Ard'a 2 Mesaj Açamasın

Bu konuyu okuyanlar

Stickcombat

Öğrenci
Katılım
28 Nisan 2013
Mesajlar
5
Reaksiyon puanı
0
Puanları
1
kimse ard arda 2 mesaj atmasın diosanız bunu yapın.

ftp>>includes>>functions_newpost.php mizde alttaki kodlari buluyoruz

PHP:
 $DB_site->query("
INSERT INTO " . TABLE_PREFIX . "post
(threadid, parentid, title, username, userid, dateline, pagetext, allowsmilie,
showsignature, ipaddress, iconid, visible, attach)
VALUES
($threadinfo[threadid], $parentid, '" . addslashes($post['title']) . "',
'" . addslashes($post['postusername']) . "', $bbuserinfo[userid], " . TIMENOW . ",
'" . addslashes($post['message']) . "', $post[enablesmilies], $post[signature],
'" . addslashes($post['ipaddress']) . "', $post[iconid], $post[visible], $totalattachments)
");
$post['postid'] = $DB_site->insert_id();


bunun heeepsini alttakilerle deiştirin


PHP:
// ########### Xenon's prevent doublepost hack #########
$dp_settings = array(
'dobump' => true, // change this to false if you don't want doubleposts changing post's dateline
'timespan' => 3600, // 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)
'addeditedby' => false, // Should a edited by author be added when a post is merged
);

$isdoublepost = false;
if ($type != 'thread' AND $threadinfo['lastpost'] > TIMENOW - $dp_settings['timespan'] AND $threadinfo['lastposter'] == $post['postusername'])
{
// we are here, so we may have a doublepost -> do more exact checkings
$doublepost = $DB_site->query_first("
SELECT postid, pagetext, post.title, post.userid, post.attach
FROM " . TABLE_PREFIX . "post AS post
LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post')
WHERE threadid = $threadinfo[threadid]
AND dateline > " . (TIMENOW - $dp_settings['timespan']) . "
AND visible = 1 AND deletionlog.primaryid IS NULL
ORDER BY dateline DESC
LIMIT 1
");

if ($doublepost['userid'] == $bbuserinfo['userid'])
{
// we truely have a doublepost, now check if the merged post fits the rules!
$oldmsg = $post['message'];
$olderrors = $errors;

$post['message'] = $doublepost['pagetext'] . $dp_settings['spacer'] . $post['message'];
verify_post_errors($type, $post, $errors);
if (sizeof($errors) == 0 AND !($vboptions['attachlimit'] AND $totalattachments + $doublepost['attach'] > $vboptions['attachlimit']))
{
// merged post is ok, so do merging
$isdoublepost = true;
$post['postid'] = $doublepost['postid'];
}
else
{
// merging will produce errors so keep it as a single post..
$isdoublepost = false;
$post['message'] = $oldmsg;
}
unset($oldmsg);
$errors = $olderrors;
unset($olderrors);
}
}

if ($isdoublepost)
{
// Yes we have a doublepost, so do unindexing
require_once('./includes/functions_databuild.php');
delete_post_index($doublepost['postid'], $doublepost['title'], $doublepost['pagetext']);
unset($doublepost);

// Update DB
$DB_site->query("
UPDATE " . TABLE_PREFIX . "post
SET pagetext = '" . addslashes($post['message']) . "',
" . iif($dp_settings['dobump'], 'dateline = ' . TIMENOW . ',', '') . "
attach = attach + $totalattachments
WHERE postid = $post[postid]
");

//Delete Eventually parsed cached post
$DB_site->query("DELETE FROM " . TABLE_PREFIX . "post_parsed WHERE postid = " . $post['postid']);

if ($totalattachments > 0 OR $dp_settings['dobump'])
{
$DB_site->query("
UPDATE " . TABLE_PREFIX . "thread
SET " . iif($dp_settings['dobump'], 'lastpost = ' . TIMENOW . ',', '') . "
attach = attach + $totalattachments
WHERE threadid = $threadinfo[threadid]
");
}

//Update forum if postdate has changed.
if ($dp_settings['dobump'])
{
$DB_site->query("
UPDATE " . TABLE_PREFIX . "forum
SET lastpost = " . TIMENOW . ",
lastposter = '" . addslashes($post['postusername']) . "',
lastthread = '" . addslashes($threadinfo['title']) . "',
lastthreadid = $threadinfo[threadid],
lasticonid = " . iif($threadinfo['pollid'], -1, $threadinfo['iconid']) . "
WHERE forumid = $foruminfo[forumid]
");
}

// Add edited by if wanted
if ($dp_settings['addeditedby'])
{
$DB_site->query("
REPLACE INTO " . TABLE_PREFIX . "editlog (postid, userid, username, dateline, reason)
VALUES ($post[postid], $bbuserinfo[userid], '" . addslashes($bbuserinfo['username']) . "', " . TIMENOW . ", 'Automerged Doublepost')

");
}

}
else
{
$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "post
(threadid, parentid, title, username, userid, dateline, pagetext, allowsmilie,
showsignature, ipaddress, iconid, visible, attach)
VALUES
($threadinfo[threadid], $parentid, '" . addslashes($post['title']) . "',
'" . addslashes($post['postusername']) . "', $bbuserinfo[userid], " . TIMENOW . ",
'" . addslashes($post['message']) . "', $post[enablesmilies], $post[signature],
'" . addslashes($post['ipaddress']) . "', $post[iconid], $post[visible], $totalattachments)
");
$post['postid'] = $DB_site->insert_id();
}
// ########### Xenon's prevent doublepost hack #########


bu işlem bittikten sora alltaki kodlari bulun

PHP:
// ### UPDATE SEARCH INDEX ###
require_once('./includes/functions_databuild.php');
build_post_index($post['postid'], $foruminfo, iif($type == 'thread', 1, 0));

altina alttaki kodlari ekliyin

PHP:
// Attachments and indexing done, if post was a doublepost, nothing more is needed
if ($isdoublepost)
{
return;
}

Onemli : Eklenti Kurmadan Once Kesinlikle Template ve php kopyalarini aliniz!!!...
 

friendly

Rektör
Katılım
19 Mart 2009
Mesajlar
11,874
Reaksiyon puanı
671
Puanları
113
Ard arda 2 mesaj olmuyor zaten. 2. mesajı aynı üye yazdığında ilk mesajı güncelleniyor otomatikman. Bugün üye olmuşsun hoşgeldin. Biraz gezeydin siteyi görecektin...
 

Korpe

Rektör
Katılım
2 Ağustos 2009
Mesajlar
10,169
Reaksiyon puanı
16
Puanları
0
Ard arda 2 mesaj olmuyor zaten. 2. mesajı aynı üye yazdığında ilk mesajı güncelleniyor otomatikman. Bugün üye olmuşsun hoşgeldin. Biraz gezeydin siteyi görecektin...


Abi sanırım Vbulletin kodlamasi ile alakalı
 

friendly

Rektör
Katılım
19 Mart 2009
Mesajlar
11,874
Reaksiyon puanı
671
Puanları
113
Abi sanırım Vbulletin kodlamasi ile alakalı

Tamam da o kodlamayı yapınca ard arda iki mesaj olmuyor diye yazınca bende bu sitede zaten öyle birşey olmadığını demek istediydim.
Acaba arkadaş farklı bir şey mi anlatmak istedi de biz ön yargılı davrandık. :)
 

smnfrkn

Profesör
Katılım
11 Temmuz 2012
Mesajlar
1,283
Reaksiyon puanı
11
Puanları
38
İki konu açmaktan bahsediyor sanırım. İki tabiri karıştırmış (Mesaj atmak:Konu açmak)
 

Korpe

Rektör
Katılım
2 Ağustos 2009
Mesajlar
10,169
Reaksiyon puanı
16
Puanları
0
Tamam da o kodlamayı yapınca ard arda iki mesaj olmuyor diye yazınca bende bu sitede zaten öyle birşey olmadığını demek istediydim.
Acaba arkadaş farklı bir şey mi anlatmak istedi de biz ön yargılı davrandık. :)

bence o kodlamayı sitede paylasmıs ki vbulltin kullanan yada admın olan kısıler kullansın diye (admın site sahıbı falan)
 

friendly

Rektör
Katılım
19 Mart 2009
Mesajlar
11,874
Reaksiyon puanı
671
Puanları
113
bence o kodlamayı sitede paylasmıs ki vbulltin kullanan yada admın olan kısıler kullansın diye (admın site sahıbı falan)

Bi sitemiz olaydı da üyelerim ard arda istedikleri kadar mesaj atabilirlerdi... :)
 

Stickcombat

Öğrenci
Katılım
28 Nisan 2013
Mesajlar
5
Reaksiyon puanı
0
Puanları
1
vBulletin dilinde mesaj konudur.....
 

Son mesajlar

Üst