vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Hide Quickreply if Thread Older Than XX Days (https://vborg.vbsupport.ru/showthread.php?t=82263)

djr 05-30-2005 06:55 PM

Hide Quickreply if Thread Older Than XX Days
 
1 Attachment(s)
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 :D

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

Andreas 05-30-2005 07:48 PM

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.

djr 05-30-2005 09:01 PM

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?

Andreas 05-30-2005 09:13 PM

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.

?

djr 05-30-2005 09:18 PM

Sheer brilliance! Danke schön! (thnx alot)

Andreas 05-30-2005 09:20 PM

You're wlecome :)


All times are GMT. The time now is 07:29 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.01169 seconds
  • Memory Usage 1,724KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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