vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Prevent users from bumping old threads - VB3 (https://vborg.vbsupport.ru/showthread.php?t=60568)

djnoz 01-22-2004 02:09 AM

Prevent users from bumping old threads - VB3
 
I'd like to see a hack that allows you to place an expiry date on threads.

For example:

Expiry date for a forum is set to one month. The last post in a thread created within this forum was made over 1 month ago.
A user tries to post in this thread and meets an error message telling him that the thread has expired.

This should ideally be implemeted so that it can be switched on or off for different forums. If I have an articles forum, I want to make it so that users can make a comment on that article even if it's past the expiry date.

If nobody makes it I *may* take the challenge and implement this myself.
I think a LOT of people will find this useful.

Forgive me if there's something already like this for VB3.

cyclical 01-22-2004 05:19 AM

Quote:

Originally Posted by djnoz
I'd like to see a hack that allows you to place an expiry date on threads.

For example:

Expiry date for a forum is set to one month. The last post in a thread created within this forum was made over 1 month ago.
A user tries to post in this thread and meets an error message telling him that the thread has expired.

This should ideally be implemeted so that it can be switched on or off for different forums. If I have an articles forum, I want to make it so that users can make a comment on that article even if it's past the expiry date.

If nobody makes it I *may* take the challenge and implement this myself.
I think a LOT of people will find this useful.

Forgive me if there's something already like this for VB3.

would be useful in general chat sections....

keep spammers from bumping crap thats 2-4 months old... good idea.

Kentaurus 01-22-2004 05:34 PM

Quote:

Originally Posted by djnoz
I'd like to see a hack that allows you to place an expiry date on threads.

For example:

Expiry date for a forum is set to one month. The last post in a thread created within this forum was made over 1 month ago.
A user tries to post in this thread and meets an error message telling him that the thread has expired.

This should ideally be implemeted so that it can be switched on or off for different forums. If I have an articles forum, I want to make it so that users can make a comment on that article even if it's past the expiry date.

If nobody makes it I *may* take the challenge and implement this myself.
I think a LOT of people will find this useful.

Forgive me if there's something already like this for VB3.

Right now with a cron job you can close threads older than x days.. Then the user would see a "cannot reply because this thread is closed" message

djnoz 01-23-2004 08:38 AM

Nice! But can this be switched off for certain forums? :-/

freehtml 05-29-2004 06:22 AM

Quote:

Originally Posted by Kentaurus
Right now with a cron job you can close threads older than x days.. Then the user would see a "cannot reply because this thread is closed" message

How can we do that?

Cool_Rice 05-29-2004 08:17 AM

is there something that just doesnt sort a forum by latest reply, but the original post date? that would work and its what im looking for

cablemirc 06-26-2004 11:01 PM

Quote:

Originally Posted by Kentaurus
Right now with a cron job you can close threads older than x days.. Then the user would see a "cannot reply because this thread is closed" message

yes, how can we do that. it's a steady problem on my forums

MogKnight 10-12-2004 08:55 PM

I'd absolutely love this hack...

is there anything out there I'm missing?

cablemirc 10-13-2004 12:18 AM

Quote:

Originally Posted by MogKnight
I'd absolutely love this hack...

is there anything out there I'm missing?

i sure wish someone could tackle this

Punchak 10-14-2004 06:36 AM

I'm also looking for such hack (or SQL query). Not to close each topic older than xxx mounth, but close all topics that haven't been active since xxx mounths ;)

Sorry for my english.

Andreas 10-14-2004 07:00 AM

Close threads which don't have replies newer then x days in forums y and z:

Code:

UPDATE thread SET open=0 WHERE lastpost < UNIX_TIMESTAMP(DATE_ADD(NOW(), INTERVAL -2 MONTH)) AND forumid IN (11, 25)
This will close all threads in forums 11 and 25 where the last reply is older then 2 month.

To do this automatically as a cron-job, use a script like this:

PHP Code:

<?php
error_reporting
(E_ALL & ~E_NOTICE);

if (
$DB_site == NULL)
{
    exit;
}

$DB_site->query("UPDATE " TABLE_PREFIX "thread SET open=0 WHERE lastpost < UNIX_TIMESTAMP(DATE_ADD(NOW(), INTERVAL -2 MONTH)) AND forumid IN (11,25)");

log_cron_action('Threads expired", $nextitem);

?>

Admin note: SQL highlighting is broken (once again?)

Punchak 10-14-2004 07:43 AM

Wonderful KirbyDE ! Thanks a lot ;)
I'll try it asap ;)


All times are GMT. The time now is 04:43 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.01037 seconds
  • Memory Usage 1,743KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)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