vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Prevent Doubleposting (https://vborg.vbsupport.ru/showthread.php?t=96602)

lanc3lot 12-19-2005 02:28 PM

And what are the changes on this one u pointed out Shuvo?

Mudvayne 12-19-2005 05:43 PM

Quote:

Originally Posted by lanc3lot
And what are the changes on this one u pointed out Shuvo?

i dont get u :s

i told tht xenon's hack need code modification.. Kirby's dont.. Thats the point.. & i prefer importing product than modify code.. newayz drop it..

biggazillakilla 12-19-2005 07:18 PM

Quote:

Originally Posted by Shuvo
:).. https://vborg.vbsupport.ru/showpost....&postcount=157
u don hav to modify any code.. just upload the product.. kieby post it in this thread.. & i'm using it now.. working fine..

Thanks for the link. :)

I'm using Xenon's code (which requires editing files), but if there's a plugin, that would be much easier, especially since upgrades require overwriting the files.

Mudvayne 12-20-2005 12:01 AM

u r welcome :D

lanc3lot 12-20-2005 08:14 AM

Quote:

Originally Posted by biggazillakilla
Thanks for the link. :)

I'm using Xenon's code (which requires editing files), but if there's a plugin, that would be much easier, especially since upgrades require overwriting the files.


Ok now i got it:D

Thnx, its much better indeed

Sel 12-21-2005 02:11 PM

I've installed the plugin created by Andreas, works great. Just got a couple of questions:

1, Is there a way to disable the 'double post' plugin for admins and mods?

2, Is it possible to set no 'Minimum Time before Double Post'. So a user can never double post? At the moment I've just set the limit to a really high number.

Thanks

eoc_Jason 12-29-2005 06:22 PM

I'm working off the plugin by Andreas too, but trying to modify it some to force a page refresh if its a double post (if its from the quick reply box).

I'm having one issue if I do a double post via the advanced reply box, it refreshs then says "this forum is no longer accepting new posts" or something like that???

This would be great if it was a standard vB option, I think everyone gets annoyed by double-posters...

Update -

If I set the following in either of the postdata_xxx hooks, I can get the page to refresh after posting a quickreply (since ajax is enabled). However, the reply text shows up twice, and I have no idea why. I've peeled through the newreply.php, class_dm_threadpost.php, and functions_newpost.php files with no luck.

Code:

$this->registry->GPC['ajax'] = false;
Anyone have some help they want to give?

eoc_Jason 12-30-2005 02:58 PM

Eureka, I fixed the problem. :) I think it might have had to do with the redirect code being outside of the if() statement, not sure.

I've modified the code so that it will do a page refresh regardless if it's via the quick reply box or advanced reply page. The trick was to set ajax to false, and also I moved the redirect code where it edits the reason. I also modifed it to check just based on userids instead of names, then ids again...

I also had it update the post time when a double post occurs, so that the thread shows as new to people.

NOTE: I've stripped some bits of code out from Andreas' plugin, like the time checking. So compare the code before implmenting to make sure you have the features you want.

EDIT - I've had to remove the code, found a little gitch... will repost once its fixed.

EDIT AGAIN - Well, after trying many things out, I finally determined there is really no way to do it without editing some files or (partially) disabling AJAX.

I did find one little bug in the product xml...

The plugin for postdata_postsave

It shows $vbulletin->url for the redirect, but since its inside a class, it should use $this->registry->url instead. I believe that was my problem with it showing "this forum is not accepting new posts" error when you try to double post via the advanced reply.

beansbaxter 12-31-2005 05:05 AM

I am running 3.5.2 and it does not work with AJAX, very annoying. I really need/love this mod but I cant implement it unless this is fixed. I am clicking uninstall...

When can or should this be fixed???

Paul M 12-31-2005 06:48 AM

Fixes are in the thread if you care to read back a bit.

Snake 12-31-2005 01:08 PM

I guess he is too lazy to search for the link in this thread.

lanc3lot 01-03-2006 09:32 AM

Has someone found a fix on "prevent automerging for admins" yet?

It will be very usefull this one.

Also, it will be good if the timestamp of the thread, being updated when someone double post and his posts automerged

Thnx in advance :)

Snake 01-03-2006 11:32 AM

Paul has already implemented a fix for that. Do a search on this thread, it should be there somewhere. ;)

lanc3lot 01-03-2006 04:22 PM

Quote:

Originally Posted by Paul M
Hmm, well I installed this on my test forum last night, and yes, it has (had) two problems ;

1. The post dateline is not updated on a merge, so it doesn't get seen as unread.

2. The one everyone complains about - no ajax refresh (unless you alter the time stamp, then you get two versions of the same post).


So, since I wanted this on our forum I have fixed both locally - this is what I have done.


1. To fix the timestamp ;

Find ;

PHP Code:

// set info 

Add below it ;

PHP Code:

$dataman2->set('dateline'TIMENOW); 

2. To fix the ajax issue, use this nasty hack ;

Find ;

PHP Code:

    if ($isdoublepost)
    {
        
$id $doublepost['postid'];
        
$dataman->save();
        
        
//now add edited by
        
if ($dp_settings['editedbymsg'] != '')
        {
            
$vbulletin->db->query_write("
                REPLACE INTO " 
TABLE_PREFIX "editlog (postid, userid, username, dateline, reason)
                VALUES (
$id, " $vbulletin->userinfo['userid'] . ", '" addslashes($vbulletin->userinfo['username']) . "', " TIMENOW ", '" addslashes($dp_settings['editedbymsg']) . "')
            "
);
        }
    } 

Replace with ;

PHP Code:

    if ($isdoublepost)
    {
        
// Ugly hack added by Paul M to fix ajax merge //
        
if (!$vbulletin->GPC['ajax'])
        {
            
$id $doublepost['postid'];
            
$dataman->save();
        
            if (
$dp_settings['editedbymsg'] != '')
            {
                
$vbulletin->db->query_write("
                REPLACE INTO " 
TABLE_PREFIX "editlog (postid, userid, username, dateline, reason)
                VALUES (
$id, " $vbulletin->userinfo['userid'] . ", '" addslashes($vbulletin->userinfo['username']) . "', " TIMENOW ", '" addslashes($dp_settings['editedbymsg']) . "')
                "
);
            }
        }
        
$vbulletin->url 'showthread.php?' $vbulletin->session->vars['sessionurl'] . "p=$post[postid]#post$post[postid]";
        eval(
print_standard_redirect('redirect_postthanks'truefalse));
    } 

Seems to work okay for me, feel free to try it. :)


Apparently u point in this post...can u please tell me in which template / file i must do this edits? I searched the includes/functions_newpost.php but no luck:(

Also, PaulM, have u figured out any hint of how to prevent automerge for the Admin's Posts?

Thnx again:)

Snake 01-03-2006 04:25 PM

What do you mean no luck? It's working just fine on my forums. :)

lanc3lot 01-03-2006 04:33 PM

I meant, where i have to do the fileedits, in what file or template...

Paul M 01-03-2006 04:38 PM

Quote:

Originally Posted by lanc3lot
I meant, where i have to do the fileedits, in what file or template...

You edit the existing hacks code.

Quote:

Originally Posted by lanc3lot
Also, PaulM, have u figured out any hint of how to prevent automerge for the Admin's Posts?

I have never even looked at or thought about it, as I have no need of this. :)

lanc3lot 01-03-2006 04:41 PM

Damn, hope u find a little time and do so :(

lanc3lot 01-03-2006 04:50 PM

Update

Ok found it, i was using the one with the product, thats why i couldnt find it before:)

Thnx, hope it can be done for admins the one i said too :)


Update 2

PaulM, although i did the step one, the last post time, is not being updated in the time of the last post but stays with the time of the first one..

Any hints?

Puntoboy 01-03-2006 07:41 PM

any update on this? it is fully released yet?

will be good for the classifieds section to prevent people from bumping for sale posts.

i'm a total noob so any help will be greatly appreciated.

Saskia 01-06-2006 12:13 PM

Very nice hack! I have used Paul M's fix, but the time only changes on the post itself. So in "new post" searches it doesn't show up and the wrong time is still displayed on the "lastpostby" bit in the forumdisplays.

Anyone know how to change that so the automerged post will turn up as a new post in searches? Thank you. :)

shockx5 01-09-2006 04:48 PM

This is a great modification, but is there any way to disable it for certain forums, as some forums require double posting rapidly.

i dont know if anything has been posted in this thread about that, so if it has im sorry.

any help would be very much appreciated.

eoc_Jason 01-11-2006 05:43 PM

I used the code based off someone's plugin posted a few pages back. I removed the time checking so it would always merge their last post, however it would update all the times so it acted as if it was a new post in the thread.

In the postdata_presave I added the following with all the other set's:
PHP Code:

$this->set('dateline'TIMENOW); 

Here is all of my code in the postdata_postsave, you can see how you have to update both the thread time & forum time:
PHP Code:

if ($this->isdoublepost)
{
    
// Add Edited By Note
    
$this->dbobject->query_write("
        REPLACE INTO " 
TABLE_PREFIX "editlog (postid, userid, username, dateline, reason)
        VALUES (" 
$this->fetch_field('postid') . ", " $this->fetch_field('userid') . ", '" $this->dbobject->escape_string($this->fetch_field('username')) . "', " TIMENOW ", '" $this->dbobject->escape_string('Automerged Doublepost') . "')
    "
);

    
// Update Last Posted In Thread
    
$thread =& datamanager_init('Thread'$this->registryERRTYPE_SILENT'threadpost');
    
$thread->set_existing($this->info['thread']);

    
$thread->set('lastpost'TIMENOW);
    
$thread->set('lastposter'$this->fetch_field('username'));

    
$thread->save();

    
// Update Last Posted In Forum
    
$forumdata =& datamanager_init('Forum'$this->registryERRTYPE_SILENT);
    
$forumdata->set_existing($this->info['forum']);
    
$forumdata->set_info('disable_cache_rebuild'true);

    
$forumdata->set('lastpost'$this->fetch_field('dateline'));
    
$forumdata->set('lastposter'$this->fetch_field('username''post'));

    
$forumdata->set('lastthread'$this->info['thread']['title']);
    
$forumdata->set('lastthreadid'$this->info['thread']['threadid']);
    
$forumdata->set('lasticonid', ($this->info['thread']['pollid'] ? -$this->info['thread']['iconid']));

    
$forumdata->save();

    
// Set Redirect
    
$postid $this->fetch_field('postid');
    
$this->registry->url 'showthread.php?' $vbulletin->session->vars['sessionurl'] . "p=$postid#post$postid";
    eval(
print_standard_redirect('redirect_doublepost'truetrue));



The reason the forum & thread do not get updated is because an "edit" creates the $this->condition and thus the other two queries will not run automatically.

Hope this helps.

JohnBee 01-11-2006 06:01 PM

I have modified the code as follows:
Code:

$post['message'] = $doublepost['pagetext'] . $dp_settings['spacer'] . " $vbulletin->userinfo[username] added " . intval((TIMENOW - $doublepost[dateline]) / 60) . " minute(s) " . intval((TIMENOW - $doublepost[dateline]) % 60). " seconds later...\n\n" . $post['message'];
No matter what I try I cannot get it to display the username in the comment, can someone help me?

IrPr 01-11-2006 07:35 PM

PaulM ur fix not workin when upgraded to 3.5.3


Quote:

Fatal error: Call to undefined function: build_thread_counters() in c:\program files\easyphp1-8\www\forum\newreply.php(530) : eval()'d code on line 14

biggazillakilla 01-12-2006 04:44 AM

Quote:

Originally Posted by Andreas
Hmm, I can't reproduce such problems on my board.

But I think the SQL error is releated to thread/forum subscriptions, as the Datamanager won't return the postid.

Edit: Reproduced.

Actually, the database error causes the double merge:

The QR AJAX JS gets the database error and attempts a repost.

This one works in an interesting way, too. (Attachment link.) I've just tested it on my test board, and it merges all posts without paragraph breaks, which doesn't look too good.

I seem to recall that you're not developing this as a plugin, but just in case...

EasyTarget 01-12-2006 05:09 AM

you go to the vbulletin options and you can add linebreaks or whatever you want to do.

IrPr 01-12-2006 08:14 AM

any suggestion ?

Quote:

Fatal error: Call to undefined function: build_thread_counters() in forum/newreply.php(530) : eval()'d code on line 14
im got this fatal error when upgrade my board to 3.5.3 and do PaulM's code modifications

PersianImmortal 01-13-2006 01:44 AM

I got this to work on my 3.5.3 board (TweakGuides Forums) by using the original code, modifying as provided by Paul M, and also adding one new feature I think is very useful. This code works with AJAX (e.g. Quick Reply) without any problems, it automatically refreshes the page:

PHP Code:

// ########### Xenon Modified Prevent Doublepost Hack #########
    
$dp_settings = array(
        
'timespan' => 3600 24// how many seconds after the last post the new post is defined as doublepost (default: 24 hours)
        
'spacer' => "\n\n [b]Additional Comment:[/b] \n",    // What should be between the old post and the new one (default: two empty lines). Note: PersianImmortal has added [b]Additional Comment:[/b] \n to make it clear what is being added each time - can be removed if you wish.
        
'editedbymsg' => '[Automerged Doublepost]'// If left blank no edited by will appear
    
);
    
    
$isdoublepost false;
    
$oldmsg $post['message'];

    if (
$type != 'thread' 
        
AND $threadinfo['lastpost'] > TIMENOW $dp_settings['timespan'
        AND 
$threadinfo['lastposter'] == $vbulletin->userinfo['username'])
    {
        
// we are here, so we may have a doublepost -> do more exact checkings
        
$doublepost $vbulletin->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 = 
$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'] == $vbulletin->userinfo['userid'])
        {
            
// we truely have a doublepost, now check if the merged post still fits the rules!
            
$dataman2 =& datamanager_init('Post'$vbulletinERRTYPE_ARRAY'threadpost');
            
$dataman2->set_existing($doublepost);
            
$post['message'] = $doublepost['pagetext'] . $dp_settings['spacer'] . $post['message'];
            
            
// set info
            
$dataman2->set_info('preview'$post['preview']);
            
$dataman2->set_info('parseurl'$post['parseurl']);
            
$dataman2->set_info('posthash'$post['posthash']);
            
$dataman2->set_info('forum'$foruminfo);
            
$dataman2->set_info('thread'$threadinfo);
    
            
// set options
            
$dataman2->setr('showsignature'$post['signature']);
            
$dataman2->setr('allowsmilie'$post['enablesmilies']);
    
            
// set data
            
$dataman2->setr('pagetext'$post['message']);
            
$dataman2->setr('iconid'$post['iconid']);
    
            
$dataman2->pre_save();
            if (!
$dataman2->errors)
            {
                
// merged post is ok, so do merging
                
$isdoublepost true;
                unset(
$dataman);
                
$dataman =& $dataman2;
                
$post['postid'] = $doublepost['postid'];
            }
            else
            {
                
// merging will produce errors so keep it as a single post..
                
$isdoublepost false;
            }
        }
    }
    
if (
$isdoublepost)
    {
        
// Ugly hack added by Paul M to fix ajax merge //
        
if (!$vbulletin->GPC['ajax'])
        {
            
$id $doublepost['postid'];
            
$dataman->save();
        
            if (
$dp_settings['editedbymsg'] != '')
            {
                
$vbulletin->db->query_write("
                REPLACE INTO " 
TABLE_PREFIX "editlog (postid, userid, username, dateline, reason)
                VALUES (
$id, " $vbulletin->userinfo['userid'] . ", '" addslashes($vbulletin->userinfo['username']) . "', " TIMENOW ", '" addslashes($dp_settings['editedbymsg']) . "')
                "
);
            }
        }
        
$vbulletin->url 'showthread.php?' $vbulletin->session->vars['sessionurl'] . "p=$post[postid]#post$post[postid]";
        eval(
print_standard_redirect('redirect_postthanks'truefalse));
    }  
    else
    {
        
// no doublepost so save as new post
        
$post['message'] = $oldmsg;
        
$id $dataman->save();
    } 

In summary the modifications to the original code are firstly the second step provided by Paul M (comment tags show Paul's added code as he provided it) - this is necessary for the AJAX refresh to work properly.

I also added an Additional Comment: heading in the Spacer, so that each automerged reply looks like this:

Additional Comment:
Second post text merged into first post

Additional Comment:
Third post text merged into first post

That way it becomes obvious what's been merged, both to the user and the reader. Also helps prompt the user to use the Edit button to add additional comments next time rather than just post multiple times in a row.

As I said, this now works perfectly on my board, and having tested it with both standard replies, quick replies using full AJAX features enabled, there are no errors or glitches.

Many thanks to Xenon and Paul M for this great mod, very useful and prevents a lot of conflicts and work for mods who get tired of having to merge multiple posts by individuals.

IrPr 01-13-2006 09:34 AM

Nice! but it works same as Andreas's Product
but PaulM's method don't need refreshing

Puntoboy 01-19-2006 11:56 PM

i'd like to use this on my forum but only in the for sale area.

how can i do this?

murrtex 01-20-2006 02:02 PM

Quote:

Originally Posted by PersianImmortal
I got this to work on my 3.5.3 board (TweakGuides Forums) by using the original code, modifying as provided by Paul M, and also adding one new feature I think is very useful. This code works with AJAX (e.g. Quick Reply) without any problems, it automatically refreshes the page:

PHP Code:

// ########### Xenon Modified Prevent Doublepost Hack #########
    
$dp_settings = array(
        
'timespan' => 3600 24// how many seconds after the last post the new post is defined as doublepost (default: 24 hours)
        
'spacer' => "\n\n [b]Additional Comment:[/b] \n",    // What should be between the old post and the new one (default: two empty lines). Note: PersianImmortal has added [b]Additional Comment:[/b] \n to make it clear what is being added each time - can be removed if you wish.
        
'editedbymsg' => '[Automerged Doublepost]'// If left blank no edited by will appear
    
);
    
    
$isdoublepost false;
    
$oldmsg $post['message'];

    if (
$type != 'thread' 
        
AND $threadinfo['lastpost'] > TIMENOW $dp_settings['timespan'
        AND 
$threadinfo['lastposter'] == $vbulletin->userinfo['username'])
    {
        
// we are here, so we may have a doublepost -> do more exact checkings
        
$doublepost $vbulletin->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 = 
$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'] == $vbulletin->userinfo['userid'])
        {
            
// we truely have a doublepost, now check if the merged post still fits the rules!
            
$dataman2 =& datamanager_init('Post'$vbulletinERRTYPE_ARRAY'threadpost');
            
$dataman2->set_existing($doublepost);
            
$post['message'] = $doublepost['pagetext'] . $dp_settings['spacer'] . $post['message'];
            
            
// set info
            
$dataman2->set_info('preview'$post['preview']);
            
$dataman2->set_info('parseurl'$post['parseurl']);
            
$dataman2->set_info('posthash'$post['posthash']);
            
$dataman2->set_info('forum'$foruminfo);
            
$dataman2->set_info('thread'$threadinfo);
    
            
// set options
            
$dataman2->setr('showsignature'$post['signature']);
            
$dataman2->setr('allowsmilie'$post['enablesmilies']);
    
            
// set data
            
$dataman2->setr('pagetext'$post['message']);
            
$dataman2->setr('iconid'$post['iconid']);
    
            
$dataman2->pre_save();
            if (!
$dataman2->errors)
            {
                
// merged post is ok, so do merging
                
$isdoublepost true;
                unset(
$dataman);
                
$dataman =& $dataman2;
                
$post['postid'] = $doublepost['postid'];
            }
            else
            {
                
// merging will produce errors so keep it as a single post..
                
$isdoublepost false;
            }
        }
    }
    
if (
$isdoublepost)
    {
        
// Ugly hack added by Paul M to fix ajax merge //
        
if (!$vbulletin->GPC['ajax'])
        {
            
$id $doublepost['postid'];
            
$dataman->save();
        
            if (
$dp_settings['editedbymsg'] != '')
            {
                
$vbulletin->db->query_write("
                REPLACE INTO " 
TABLE_PREFIX "editlog (postid, userid, username, dateline, reason)
                VALUES (
$id, " $vbulletin->userinfo['userid'] . ", '" addslashes($vbulletin->userinfo['username']) . "', " TIMENOW ", '" addslashes($dp_settings['editedbymsg']) . "')
                "
);
            }
        }
        
$vbulletin->url 'showthread.php?' $vbulletin->session->vars['sessionurl'] . "p=$post[postid]#post$post[postid]";
        eval(
print_standard_redirect('redirect_postthanks'truefalse));
    }  
    else
    {
        
// no doublepost so save as new post
        
$post['message'] = $oldmsg;
        
$id $dataman->save();
    } 

In summary the modifications to the original code are firstly the second step provided by Paul M (comment tags show Paul's added code as he provided it) - this is necessary for the AJAX refresh to work properly.

I also added an Additional Comment: heading in the Spacer, so that each automerged reply looks like this:

Additional Comment:
Second post text merged into first post

Additional Comment:
Third post text merged into first post

That way it becomes obvious what's been merged, both to the user and the reader. Also helps prompt the user to use the Edit button to add additional comments next time rather than just post multiple times in a row.

As I said, this now works perfectly on my board, and having tested it with both standard replies, quick replies using full AJAX features enabled, there are no errors or glitches.

Many thanks to Xenon and Paul M for this great mod, very useful and prevents a lot of conflicts and work for mods who get tired of having to merge multiple posts by individuals.

hi PersianImmortal ,I used yours everything is ok.refreshing,quick reply,click reply button...but when I click new thread button and I post ,page says Database errors

Code:

MySQL Error  : Duplicate entry '10006' for key 1
Error Number : 1062

the post goes but page says that, I think needs a little arrangement,,what should we do?

my version 3.5.3

Paul M 01-20-2006 03:35 PM

You need to post all the error message.

Alex_ 01-20-2006 03:51 PM

I just installed this mod on my vb 3.5.3 but I'm one of those who want the dateline to be updated...
I added
Code:

$dataman2->set('dateline', TIMENOW);
I also tried it with set_info but it doesn't work for me.
The post date doesn't get updated so I don't get a 'new post'...
Do I have to add another code with 3.5.3?
What could be wrong?

CBE 01-20-2006 05:49 PM

hi all,,
can any body conclude to us how can we install it @ 3.5.5 ??
WITH OUT ERROR ... lol ...
thanx allll

murrtex 01-20-2006 06:43 PM

Code:

Database error in vBulletin 3.5.3:

Invalid SQL:
INSERT INTO thread
        (postusername, postuserid, title, iconid, visible, forumid, similar, dateline, open, attach, lastpost, lastposter, replycount, hiddencount, threadid, firstpostid)
VALUES
        (***', 1, 'testttttttt', 0, 1, 1266, '', 1137789007, 1, 0, 1137789007, 'Mu?', 0, 0, 10027, 20630);

MySQL Error  : Duplicate entry '10027' for key 1
Error Number : 1062
Date        : Friday, January 20th 2006 @ 10:30:08 PM
Script      : http://www.4umturk.com/forum/newthread.php
Referrer    : http://www.4umturk.com/forum/newthre...wthread&f=1266
IP Address  :***
Username    : ***
Classname    : vb_database

Paul M, this is the full error code..

Paul M 01-20-2006 07:34 PM

Try running a repair on the thread table.

murrtex 01-20-2006 09:30 PM

ohh sorry I forgot to replace
Quote:

$id = $dataman->save();
:D
now its ok..

Daniel 01-20-2006 10:47 PM

Quote:

Originally Posted by CBE
hi all,,
can any body conclude to us how can we install it @ 3.5.5 ??
WITH OUT ERROR ... lol ...
thanx allll

3.5.5!? Where have I been? :speechless:

Alex_ 01-21-2006 07:07 AM

To solve the dateline problem I had to update the timestamp manually
I inserted
Code:

$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "post SET dateline = " . TIMENOW . " WHERE postid = ".$post[postid]);
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "thread SET lastpost = " . TIMENOW . " WHERE threadid = ".$threadinfo[threadid]);

to renew post and thread timestamp to have an 'unseen' post.
Now I'm happy with it ;)


All times are GMT. The time now is 01:15 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02294 seconds
  • Memory Usage 2,018KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (8)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete