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!


All times are GMT. The time now is 09:33 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.01200 seconds
  • Memory Usage 1,795KB
  • 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
  • (10)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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