vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   No New post in old thread (https://vborg.vbsupport.ru/showthread.php?t=69591)

Mansour 09-17-2004 09:00 PM

No New post in old thread
 
Hi,,
I tray to find a good sloution for this problem.
Quote:

Originally Posted by Mansour
I have problem, some member add new post in old thread and other think this is new thread and add new posts also. The problem is some threads are old news and can't have new post because other think this is a new news.

what I want was to insert the post in "post moderation queue" if there are 10 days (for example) between this post and the last post in the thread.

I think there are no hacks for this problem, so I tray to make some modifications. I test it in test forum and I want to make sure if it is correct?

in \includes\functions_newpost.php
befor : "// ### DUPE CHECK ###"
add :
PHP Code:

##################added by Mansour##################
    
if ($type == 'reply'){
        
$lastpostdate $DB_site->query_first("SELECT dateline FROM `post` WHERE threadid = $threadinfo[threadid] and visible=1 ORDER BY `dateline` DESC LIMIT 0, 1");    
        if(
TIMENOW $lastpostdate['dateline'] + 86400){
            
$post['visible'] = 0;    
        }
    }
##################added by Mansour################## 

86400 = 10 day

Please tell me if ther any wrong

Thanks :)

Xenon 09-20-2004 11:37 AM

well it's correct, but not needed to run an extra query

PHP Code:

##################added by Mansour##################
    
if ($type == 'reply'){
        if(
TIMENOW $threadinfo['lastpost'] + 86400){
            
$post['visible'] = 0;    
        }
    }
##################added by Mansour################## 


Mansour 09-28-2004 05:01 AM

Thanks Xenon
It is work :)

Xenon 09-28-2004 05:48 PM

you're welcome


All times are GMT. The time now is 05:57 PM.

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.01799 seconds
  • Memory Usage 1,722KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete