Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-30-2005, 06:55 PM
djr's Avatar
djr djr is offline
 
Join Date: Nov 2001
Location: Amsterdam
Posts: 220
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Hide Quickreply if Thread Older Than XX Days

Hi all,
I've got a request which I think is really useful for other board admins as well. Do you use the quickreply for (all) usergroups without the 'Click to active quickreply option'? Don't you just hate it when an ignorant user bumps a thread which is over 6 months / a year old (or even older)? Then you probably like this modification request.

The current solutions around seem to vary from just close threads after XX days or move older threads to an archive forum. Both of these solutions are not the solutions I want for my board. One of the biggest tech forums in Holland I visit has a very nice option to hide their quickreply after two weeks. They use React forumsoftware instead of vB, but the same functionality could be ported to vB by a skilled coder. I just don't know how to do this myself, hence this request

I've posted a screenshot to better explain my request. In this screenshot taken today you see the post date is Friday, 29th April 2005. This post is one month old compared to this post. Because if this, the quickreply is hidden in this thread, 'cos they have it configured to hide the quickreply box after a thread is two weeks old. They just print a warning 'This topic is more than two weeks old, as such the quickreply is hidden'. Users are still able to post to the thread by clicking the 'Post reply' button, but they have been warned about the older post date (and might even check how old the thread actually is).

What I'd like to see is an extension of the current quickreply options in AdminCP, preferably something like: 'Hide Quickreply in Threads Over XXX Days Old'

So .. can this be done in vB and who's up for the challenge?

thanks,
- djr
Attached Images
File Type: png quickreply.png (24.7 KB, 0 views)
Reply With Quote
  #2  
Old 05-30-2005, 07:48 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is really easy to achieve, if you don't rely on having an ACP option to do so:

In Template SHOWTHREAD replace
Code:
$quickreply
with
Code:
<if condition="$thread[lastpost] + X*86400 >= TIMENOW">
$quickreply
<else />
This thread is more then X days old, therefore QR is hidden.
</if>
Replace X with the number of days you like.
Reply With Quote
  #3  
Old 05-30-2005, 09:01 PM
djr's Avatar
djr djr is offline
 
Join Date: Nov 2001
Location: Amsterdam
Posts: 220
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks! Wow! That's a really easy solution actually. Minor drawback is that I have a JS error on the page if the quickreply is hidden because of the following function:
Code:
<body onload=" editInit();">
Can that be fixed?
Reply With Quote
  #4  
Old 05-30-2005, 09:13 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, I don't use QR so ...

But try this:

Instead of

Code:
This thread is more then X days old, therefore QR is hidden.
use

Code:
<script type="text/javascript">
function editInit() {}
</script>
This thread is more then X days old, therefore QR is hidden.
?
Reply With Quote
  #5  
Old 05-30-2005, 09:18 PM
djr's Avatar
djr djr is offline
 
Join Date: Nov 2001
Location: Amsterdam
Posts: 220
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sheer brilliance! Danke schön! (thnx alot)
Reply With Quote
  #6  
Old 05-30-2005, 09:20 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're wlecome
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 01:20 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04819 seconds
  • Memory Usage 2,237KB
  • Queries Executed 14 (?)
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
  • (5)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (1)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete