Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Hide 'Quick Reply' After Posting For X Hours Details »»
Hide 'Quick Reply' After Posting For X Hours
Version: 1.00, by EWGF EWGF is offline
Developer Last Online: Nov 2022 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.8.x Rating:
Released: 05-05-2009 Last Update: Never Installs: 3
Template Edits
Re-useable Code  
No support by the author.

With this modification you can hide Quick Reply after a post has been made. Then it will reappear after X hours. Alternatively you can use this template modification to hide the reply buttons too.

Why?
To disencourage people to double post. My experience is people don't notice the 'reply' button, if you have Quick Reply enabled. Of course you can do it the easy way and use a product/plugin on vb.org which prevents/merges doubleposts. If you don't want to use plugins or products, this template modification will be fine.

How does it exactly work?
Quick Reply will be hidden via an if condition after a posting. Then it will reappear after X hours, depending on the current time and the time of the last post. The first string will check if you have posted the last post in the thread. The second string will check if X hours has been past since the last post. If so, you can doublepost via Quick Reply. Optionally, the third string makes sure any member with moderator powers can always use Quick Reply.

How to change time limit?
You can change this time limit by editing the (1*3600) in the code, which stands for one hour. For a limit of 24 hours you can adjust it to (24*3600) or simply placing the multiplication of it, 86400.

1 hour = 1*3600 = 3600
12 hours = 12*3600 = 43200
24 hours = 24*3600 = 86400
48 hours = 48*3600 = 172800

Where to edit?
Go to Admin CP - Styles & Templates - Style Manager - %Your Style% - Show Thread Templates - SHOWTHREAD

Look for:
Code:
<if condition="$show['quickreply']">
<!-- quick reply -->

Replace with: (without moderator exclusion)
Code:
<if condition="$show['quickreply'] AND $threadinfo['lastposter'] != $bbuserinfo['username'] OR $show['quickreply'] AND $threadinfo['lastposter'] == $bbuserinfo['username'] AND $threadinfo['lastpost'] < TIMENOW - (1*3600)">
<!-- quick reply -->

Or replace with: (with moderator exclusion)
Code:
<if condition="$show['quickreply'] AND $threadinfo['lastposter'] != $bbuserinfo['username'] OR $show['quickreply'] AND $threadinfo['lastposter'] == $bbuserinfo['username'] AND $threadinfo['lastpost'] < TIMENOW - (1*3600) OR $show['quickreply'] AND can_moderate()">
<!-- quick reply -->

Placing optional message?
However, people might wonder why they can't use Quick Reply and massively bug you, if you have a bigboard. Via an else condition you can place a message to those people, if Quick Reply temporarily isn't visible to them.

In the same template as before, look for:
Code:
<!-- / quick reply -->
</if>

Replace with:
Code:
<!-- / quick reply -->
<else />HERE YOU CAN PLACE A MESSAGE TO PEOPLE WHO TEMPORARILY CANT USE QUICK REPLY. IF YOU LIKE YOU CAN PLACE THIS TEXT IN A NICE TABLE OR SOMETHING LIKE THAT</if>

Please click 'Install', if you are using this template modification :up:

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
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 02:26 PM.


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.03220 seconds
  • Memory Usage 2,212KB
  • Queries Executed 17 (?)
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
  • (5)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit_onlinestatus
  • (1)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete