Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-17-2007, 01:42 PM
creesch's Avatar
creesch creesch is offline
 
Join Date: Oct 2005
Location: Arnhem -> Netherlands
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Disable quickreply if a thread is older than X months

Hello,

I am a admin for a small community, this community is pretty old in web therms (About 7 years). As a result of this we have posts an threads on our forum that date back to 1999.

This is not real a problem, but lately we there are some people who get on the forum through google and give answers on threads that are months or even years old. (most of the time the original topic starter isn't even around anymore).

In order to prevent this i was thinking of disabling quickreply and showing a warning in the normal reply window if a thread is older than say.... 5 months.

Is this possible with a standard board ? Or is there a mod around for doing this ?
Reply With Quote
  #2  
Old 02-17-2007, 03:42 PM
rolfw1 rolfw1 is offline
 
Join Date: Nov 2005
Location: Berkshire, England
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice request creesch, I would also be interested in the same type of hack, as our main board is now over seven years old.
Reply With Quote
  #3  
Old 02-17-2007, 10:43 PM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's the last reply alert message mod:
https://vborg.vbsupport.ru/showthread.php?t=131350

As to removing the QR box, why not just lock the thread after x number of days?
https://vborg.vbsupport.ru/showthread.php?t=130738
Reply With Quote
  #4  
Old 02-17-2007, 11:12 PM
creesch's Avatar
creesch creesch is offline
 
Join Date: Oct 2005
Location: Arnhem -> Netherlands
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot for the first mod .

About the second one, the idea is that users still can reply if they really feel they need to, but to let them think for a second if it is really necessary.
Reply With Quote
  #5  
Old 02-17-2007, 11:57 PM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You might be able to use an <if> statement with the QR, based on a time setting, but that's a bit beyond my knowledge.
Reply With Quote
  #6  
Old 02-18-2007, 01:02 AM
Kungfu Kungfu is offline
 
Join Date: Dec 2005
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

im thinking it might be threadinfo[dateline']

You would need to get the current time in unix format.

<if condition="currenttime - threadinfo[dateline'] < 1728000">
show QR</if>

otherwise you could use the cron and add another column to the table like 1 or 0. Where 1 it would be older than 5 months. Using the cron you could run it once a day or something to find threads that are old than 5 months.
Reply With Quote
  #7  
Old 02-18-2007, 02:39 PM
creesch's Avatar
creesch creesch is offline
 
Join Date: Oct 2005
Location: Arnhem -> Netherlands
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have found the solution

The first mod uses an if statement for the warning.

I have modified it a bit so that it will hide the quickreply instead of showing a warning

thanks for the suggestions anyway
Reply With Quote
  #8  
Old 02-18-2007, 05:30 PM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Since you got some help here, how about adding what you've got incase others would like to use it?
Reply With Quote
  #9  
Old 02-18-2007, 08:46 PM
creesch's Avatar
creesch creesch is offline
 
Join Date: Oct 2005
Location: Arnhem -> Netherlands
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well I already explained it a bit but here some more detailed instructions. It is a bit primitive but it works

download the last reply alert mod here.

follow step 1
step 2 can be skipped if you only want to disable quickreply.

then edit the vB SHOWTHREAD template:

find the following:
Code:
<if condition="$show['quickreply'] OR $show['ajax_js']">
<!-- ajax errors table -->
before add:
Code:
<if condition="$show[closethread] AND $last_reply_alert_phrase">
			<span class="highlight"><br />Quick reply disabled</span>

<else />
_______________________________
find:
Code:
<!-- end quick reply -->
</if>
after add:
Code:
</if>

________________________________
And you are done, I didn't use the more advanced options of the mod and just typed the text I wanted into the code. Simply because I am not sure how to do this properly.
Reply With Quote
  #10  
Old 02-18-2007, 10:39 PM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool, thanks for sharing.

Can both be used without conflict? In other words can you still show the last reply alert and disable the QR?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:22 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.03920 seconds
  • Memory Usage 2,253KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete