vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Miscellaneous Hacks - Prevent bumping old Threads (https://vborg.vbsupport.ru/showthread.php?t=96850)

Black Tiger 09-15-2009 09:30 PM

OMG, a mod already 3 years old and still working? This is great, I really need this. Why did I not see this before?;)
You're the man Andreas. TMS was also such very needed hack which should also be standard build in.

Thank you!
*Marked installed*

Eric 01-31-2010 05:15 AM

I got this working for vB4 - if Andreas doesn't mind me posting...

In Template SHOWTHREAD

FIND
PHP Code:

        <vb:if condition="$bbuserinfo['signature']">
        <
div class="blockrow">
            <
ul class="checkradio group">
                <
li><label for="cb_signature">
                    <
input type="checkbox" name="signature" id="cb_signature" value="1" checked="checked" tabindex="1" />
                    {
vb:rawphrase show_your_signature}
                </
label></li>
            </
ul>
        </
div>
        </
vb:if> 

In Template newreply

FIND
PHP Code:

        {vb:raw posticons

BELOW both locations ADD
PHP Code:

    <vb:if condition="$show['oldthreadwarning']">
    <
h3 class="blocksubhead">{vb:rawphrase old_thread_warning}</h3>
    <
div class="blockrow">
        <
img src="{vb:stylevar imgdir_misc}/exclamation.gif" align="left" width="40" height="42" alt="" />{vb:rawphrase thread_x_days_old, {vb:raw threaddays}}
    </
div>

    <
div class="blockrow">
        <
ul class="checkradio group">
            <
li><label for="cb_forcepost">
                <
input type="checkbox" name="forcepost" id="cb_forcepost" value="1" checked="checked" tabindex="1" />
                {
vb:rawphrase thread_age_accepted}
            </
label></li>
        </
ul>
    </
div>
   </
vb:if> 

Edit two plugins for this product.

1.) "Prevent old Thread bumping: Warning Display on Quickreply" - for hook showthread_start

Change it to:
PHP Code:

if (($threaddays ceil((TIMENOW-$threadinfo['lastpost'])/86400)) > $vbulletin->options['oldthrdthres'])
{
    
$show['oldthreadwarning'] = true;
    
vB_Template::preRegister('SHOWTHREAD', array('threaddays' => $threaddays));


2.) "Prevent old Thread bumping: Warning Display on Newreply" - for hook newreply_form_start
PHP Code:

if (($threaddays ceil((TIMENOW-$threadinfo['lastpost'])/86400)) > $vbulletin->options['oldthrdthres'])
{
    
$show['oldthreadwarning'] = true;
    
vB_Template::preRegister('SHOWTHREAD', array('threaddays' => $threaddays));



Extra PC 01-31-2010 01:30 PM

Quote:

Originally Posted by SecondV (Post 1971015)
I got this working for vB4 - if Andreas doesn't mind me posting...

In Template SHOWTHREAD

FIND
PHP Code:

        <vb:if condition="$bbuserinfo['signature']">
        <
div class="blockrow">
            <
ul class="checkradio group">
                <
li><label for="cb_signature">
                    <
input type="checkbox" name="signature" id="cb_signature" value="1" checked="checked" tabindex="1" />
                    {
vb:rawphrase show_your_signature}
                </
label></li>
            </
ul>
        </
div>
        </
vb:if> 

In Template newreply

FIND
PHP Code:

        {vb:raw posticons

BELOW both locations ADD
PHP Code:

    <vb:if condition="$show['oldthreadwarning']">
    <
h3 class="blocksubhead">{vb:rawphrase old_thread_warning}</h3>
    <
div class="blockrow">
        <
img src="{vb:stylevar imgdir_misc}/exclamation.gif" align="left" width="40" height="42" alt="" />{vb:rawphrase thread_x_days_old, {vb:raw threaddays}}
    </
div>

    <
div class="blockrow">
        <
ul class="checkradio group">
            <
li><label for="cb_forcepost">
                <
input type="checkbox" name="forcepost" id="cb_forcepost" value="1" checked="checked" tabindex="1" />
                {
vb:rawphrase thread_age_accepted}
            </
label></li>
        </
ul>
    </
div>
   </
vb:if> 

Edit two plugins for this product.

1.) "Prevent old Thread bumping: Warning Display on Quickreply" - for hook showthread_start

Change it to:
PHP Code:

if (($threaddays ceil((TIMENOW-$threadinfo['lastpost'])/86400)) > $vbulletin->options['oldthrdthres'])
{
    
$show['oldthreadwarning'] = true;
    
vB_Template::preRegister('SHOWTHREAD', array('threaddays' => $threaddays));


2.) "Prevent old Thread bumping: Warning Display on Newreply" - for hook newreply_form_start
PHP Code:

if (($threaddays ceil((TIMENOW-$threadinfo['lastpost'])/86400)) > $vbulletin->options['oldthrdthres'])
{
    
$show['oldthreadwarning'] = true;
    
vB_Template::preRegister('SHOWTHREAD', array('threaddays' => $threaddays));




nice but we need this in xml to easy import

please Mr. Andreas we need your mod on vb 4:up:

Alecsmith 02-03-2010 07:38 AM

great just installed :)

CPB123 02-17-2010 10:19 AM

Installed, loving it so far.. howevr, as mentioned by others, would be great to limit this to just certain forums.

jrap 02-17-2010 02:17 PM

Fantastic, installed. Thanks!

vithorius 02-17-2010 02:17 PM

Quote:

Originally Posted by CPB123 (Post 1984459)
Installed, loving it so far.. howevr, as mentioned by others, would be great to limit this to just certain forums.

Yeah! :up: :up: I feel just the same! GREAT HACK, but...

On some forums, we should have the possibility to disable this hack... :p

Would that be difficult to do? :confused:

jrap 03-20-2010 06:35 PM

Any idea why instead of prompting the user to tick the checkbox, my users just see the error message "This Thread is more than XX days old, you can't reply to it." ?

Thanks

satlazone 03-20-2010 06:43 PM

Quote:

Originally Posted by jrap (Post 2007183)
Any idea why instead of prompting the user to tick the checkbox, my users just see the error message "This Thread is more than XX days old, you can't reply to it." ?

Thanks

did you modify the templates? this modfication doesn't call a template and you have to insert the code yourself.

jrap 03-20-2010 06:58 PM

Thanks satlazone, I clearly didn't RTFM :) My bad.

Cheers!

SorentoUltimate 03-20-2010 08:19 PM

Work Perfect in 3.8.4

ZomgStuff 03-31-2010 03:21 PM

Thank you so much! This is perfect!

Goomzee 05-11-2010 05:32 AM

I done but it's not working see here

marshal_ramdev 05-15-2010 06:44 PM

thanks ..

BirdOPrey5 08-17-2010 12:03 PM

1 Attachment(s)
cool mod. :up:

I've got it working on 3.8.6 without issue... I changed it a bit to only show a message at the top of the thread instead of requiring a box to be clicked before replying- I feel the warning on top is more important.

Follow the install instructions but the only template edit to make is in showthread.

Add:
Code:

<!-- Old Thread Warning -->
<if condition="$show['oldthreadwarning']">
<table bgcolor="#FFC0C0" border="1" width="100%" cellpadding="3"><tr><td>
<div align="center">
<img src="/forums/images/buttons/report.gif" align="top" alt="Exclamation" /><phrase 1="$threaddays">$vbphrase[thread_x_days_old]</phrase>
</div>
</td></tr></table>
</if>
<!-- End Old Thread Warning -->

Above:
Code:

<!-- / controls above postbits -->
Edit the Phrase and Image to your needs.

Also disable all plugins related to this mod except "Prevent old Thread bumping: Warning Display on Quickreply."

MarceloS 04-29-2011 11:58 AM

Does it work on vb4?

BirdOPrey5 04-29-2011 11:40 PM

Quote:

Originally Posted by MarceloS (Post 2189963)
Does it work on vb4?

See post #82 in this thread for VB4 instructions.

orok 08-08-2011 10:34 AM

Quote:

Originally Posted by Eric (Post 1971015)
I got this working for vB4 - if Andreas doesn't mind me posting...

In Template SHOWTHREAD

FIND
PHP Code:

        <vb:if condition="$bbuserinfo['signature']">
        <
div class="blockrow">
            <
ul class="checkradio group">
                <
li><label for="cb_signature">
                    <
input type="checkbox" name="signature" id="cb_signature" value="1" checked="checked" tabindex="1" />
                    {
vb:rawphrase show_your_signature}
                </
label></li>
            </
ul>
        </
div>
        </
vb:if> 

In Template newreply

FIND
PHP Code:

        {vb:raw posticons

BELOW both locations ADD
PHP Code:

    <vb:if condition="$show['oldthreadwarning']">
    <
h3 class="blocksubhead">{vb:rawphrase old_thread_warning}</h3>
    <
div class="blockrow">
        <
img src="{vb:stylevar imgdir_misc}/exclamation.gif" align="left" width="40" height="42" alt="" />{vb:rawphrase thread_x_days_old, {vb:raw threaddays}}
    </
div>

    <
div class="blockrow">
        <
ul class="checkradio group">
            <
li><label for="cb_forcepost">
                <
input type="checkbox" name="forcepost" id="cb_forcepost" value="1" checked="checked" tabindex="1" />
                {
vb:rawphrase thread_age_accepted}
            </
label></li>
        </
ul>
    </
div>
   </
vb:if> 

Edit two plugins for this product.

1.) "Prevent old Thread bumping: Warning Display on Quickreply" - for hook showthread_start

Change it to:
PHP Code:

if (($threaddays ceil((TIMENOW-$threadinfo['lastpost'])/86400)) > $vbulletin->options['oldthrdthres'])
{
    
$show['oldthreadwarning'] = true;
    
vB_Template::preRegister('SHOWTHREAD', array('threaddays' => $threaddays));


2.) "Prevent old Thread bumping: Warning Display on Newreply" - for hook newreply_form_start
PHP Code:

if (($threaddays ceil((TIMENOW-$threadinfo['lastpost'])/86400)) > $vbulletin->options['oldthrdthres'])
{
    
$show['oldthreadwarning'] = true;
    
vB_Template::preRegister('SHOWTHREAD', array('threaddays' => $threaddays));



not working with the new editor ... :mad:

vBNinja 03-01-2012 04:16 AM

Can anyone getthis to work with vb 4.1.10?

Abdullah SZ 04-08-2012 01:08 PM

1 Attachment(s)
Perfect with V 3.8.7 :up:

I have combined the mod with "BirdOPrey5" mod.

This is what I got :D

satlazone 04-14-2012 10:39 AM

I need it for vb4.1.12
and not working with new editor

can anyone fix it?

www.nofal 09-10-2012 11:43 PM

Good Work


All times are GMT. The time now is 09:28 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.01417 seconds
  • Memory Usage 1,866KB
  • 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
  • (2)bbcode_code_printable
  • (15)bbcode_php_printable
  • (5)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
  • (22)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