vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Block replies to old threads and prompt for new thread instead (https://vborg.vbsupport.ru/showthread.php?t=70140)

calorie 10-02-2004 10:00 PM

Block replies to old threads and prompt for new thread instead
 
The purpose of this mini mod is to block replies to old threads, prompting the user to start a new thread instead. There is a similar mod at https://vborg.vbsupport.ru/showthread.php?t=69591 but the difference is that this mod does not place the post in a moderation queue. Instead, if a user tries to reply to an old thread, with or without quoting, this mod shows the user a message with a link to start a new thread in the same forum. If you use this mod, a click of the install button is appreciated.

SaN-DeeP 10-03-2004 07:21 PM

seems a very easily done mod..
but a small question -> we have some forums which runs some jokes threads which are running since 4 months.. (over 2600 replies and still on)

how can we take care of them ?

moley 10-03-2004 07:56 PM

a nice idea i'll install this tomorrow. Thanks for sharing.

calorie 10-03-2004 08:05 PM

Quote:

Originally Posted by SaN-DeeP
seems a very easily done mod..
but a small question -> we have some forums which runs some jokes threads which are running since 4 months.. (over 2600 replies and still on)

how can we take care of them ?

This mod has the following line:

PHP Code:

if ($threadinfo['lastpost'] < TIMENOW 2592000// 30 days in seconds 

so when the last post in a thread is over 30 days old, the user will be prompted to start a new thread.

If you want to prompt the user to start a new thread when the first post in a thread is over 30 days old, then use:

PHP Code:

if ($threadinfo['dateline'] < TIMENOW 2592000)  // 30 days in seconds 

If you want to prompt the user to start a new thread when the first or last post in a thread is over 30 days old, then use:

PHP Code:

if (($threadinfo['lastpost'] < TIMENOW 2592000) OR ($threadinfo['dateline'] < TIMENOW 2592000)) 

Of course, you could also use something like:

PHP Code:

if (($threadinfo['lastpost'] < TIMENOW 2592000) OR ($threadinfo['dateline'] < TIMENOW 5184000)) 

to prompt the user to start a new thread when the last post is over 30 days old or the first post is over 60 days old.

Johnny 10-03-2004 08:31 PM

pretty cool hack, i think its useful for those big boards where their are new ignorent users who just post in really old threads just to get in a higher rank

nexialys 10-03-2004 08:37 PM

i would suggest a different approach on this hack, as it's using a template for nothing:

simplier, but as efficient:
PHP Code:

/////////////////////////// step 1 ///////////////////////////
/*
Add new Phrase:

Type :  Front-End Errors

Varname : zzzz_oldthread
Text: This thread is old. Consider starting a <a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]">new thread</a> instead.
*/
/////////////////////////// step 2 ///////////////////////////
//In forum/newreply.php at about line 108 find:

// ### CHECK IF ALLOWED TO POST ###

//And afterwards add the following:
if ($threadinfo['lastpost'] < TIMENOW 2592000// 30 days in seconds
{
     eval(
print_standard_error('zzzz_oldthread'));



Logikos 10-03-2004 08:48 PM

Damm i just finished my hack vB Expired Threads, same thing as this. But its ACP. Turn on/off, Change the days till closed and the forums you want to lock, blank for all forums. :( beat me to it! :p

nexialys 10-03-2004 08:49 PM

@LiveWire... i prefer the settings you have... but more.. . per-forum activation based.. ;) -- i really love per-forum stuff.. lol

Logikos 10-03-2004 08:59 PM

Per forum as in, only use this hack in specified forum ids?

nexialys 10-03-2004 09:03 PM

no... a setting in forum.php to enable/disable... so you enable by writing a delay, and disable by writing 0 ... ;) two verifs in one.

...damn, i just gave how i build my tools.. lol


All times are GMT. The time now is 03:11 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.01065 seconds
  • Memory Usage 1,747KB
  • 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
  • (5)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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