vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Administrative and Maintenance Tools - Disable Default Redirect in Move and Merge Threads (https://vborg.vbsupport.ru/showthread.php?t=246736)

djbaxter 07-16-2010 10:00 PM

Disable Default Redirect in Move and Merge Threads
 
1 Attachment(s)
The default behavior for moving or merging threads is to leave a non-expiring redirect in the original thread.

I find this annoying, since it clutters up the thread listings. Most of the time I either want no redirect or at most an expiring redirect.

This mod changes the default to NO REDIRECT (you can still manually select redirect or expiring redirect fo any threads where you want it).

1. MOVE
In Thread Administration Templates > template threadadmin_movethread

Find:

PHP Code:

                    <li>
                        <
label><input type="checkbox" name="enableredirect" 

id="redirect" value="1" class="dep_ctrl" tabindex="1" checked="checked" /> {vb:rawphrase yes}</label>
                    </
li>
                    <
li id="redirect_deps" class="floatcontainer deps">

                        <
ul class="group checkradio">
                            <
li>
                                <
label for="rb_redirect_perm"><input 

type
="radio" name="redirect" value="perm" id="rb_redirect_perm" checked="checked" tabindex="1" /> {vb:rawphrase 

leave_permanent_redirect
}</label>
                            </
li



Change two instances of checked="checked". Replace with:

PHP Code:

                    <li>
                        <
label><input type="checkbox" name="enableredirect" 

id="redirect" value="1" class="dep_ctrl" tabindex="1" /> {vb:rawphrase yes}</label>
                    </
li>
                    <
li id="redirect_deps" class="floatcontainer deps">

                        <
ul class="group checkradio">
                            <
li>
                                <
label for="rb_redirect_perm"><input 

type
="radio" name="redirect" value="perm" id="rb_redirect_perm" tabindex="1" /> {vb:rawphrase 

leave_permanent_redirect
}</label>
                            </
li



Similarly, in Thread Administration Templates > template threadadmin_movethreads

Find:

PHP Code:

                    <li><label><input type="checkbox" name="enableredirect" id="redirect" 

value="1" class="dep_ctrl" tabindex="1" check="checked" /> {vb:rawphrase yes}</label></li>
                    <
li id="redirect_deps" class="floatcontainer deps">
                        <
ul class="group checkradio">
                            <
li>
                                <
label for="rb_redirect_perm"><input 

type
="radio" name="redirect" value="perm" id="rb_redirect_perm" checked="checked" tabindex="1" /> {vb:rawphrase 

leave_permanent_redirect
}</label>
                            </
li

Change two instances of checked="checked". Replace with:

PHP Code:

                    <li><label><input type="checkbox" name="enableredirect" id="redirect" 

value="1" class="dep_ctrl" tabindex="1" /> {vb:rawphrase yes}</label></li>
                    <
li id="redirect_deps" class="floatcontainer deps">
                        <
ul class="group checkradio">
                            <
li>
                                <
label for="rb_redirect_perm"><input 

type
="radio" name="redirect" value="perm" id="rb_redirect_perm" tabindex="1" /> {vb:rawphrase 

leave_permanent_redirect
}</label>
                            </
li


2. MERGE

In Thread Administration Templates > template threadadmin_mergethreads

Find:

PHP Code:

                    <li>
                        <
label><input type="checkbox" name="redir" id="redirect" value="1" class="dep_ctrl" tabindex="1" checked="checked"/> {vb:rawphrase yes}</label>
                    </
li>
                    <
li id="redirect_deps" class="floatcontainer deps">
                        <
ul class="group checkradio">
                            <
li>
                                <
label for="rb_redirect_perm"><input type="radio" name="redirect" value="perm" id="rb_redirect_perm" checked="checked" tabindex="1" /> {vb:rawphrase leave_permanent_redirect}</label>
                            </
li

Change to:

PHP Code:

                    <li>
                        <
label><input type="checkbox" name="redir" id="redirect" value="1" class="dep_ctrl" tabindex="1" /> {vb:rawphrase yes}</label>
                    </
li>
                    <
li id="redirect_deps" class="floatcontainer deps">
                        <
ul class="group checkradio">
                            <
li>
                                <
label for="rb_redirect_perm"><input type="radio" name="redirect" value="perm" id="rb_redirect_perm" tabindex="1" /> {vb:rawphrase leave_permanent_redirect}</label>
                            </
li


BlackJacket 07-17-2010 01:25 AM

Wrong section. Needs to go in Template Edits.

Boofo 07-17-2010 06:35 AM

Since the 'Yes" box is not checked by default, the redirect that is checked wouldn't take affect anyway until the 'Yes" box is checked, would it?

giorgino 07-17-2010 08:07 AM

You're my hero!

djbaxter 07-17-2010 12:18 PM

Quote:

Originally Posted by Boofo (Post 2070488)
Since the 'Yes" box is not checked by default, the redirect that is checked wouldn't take affect anyway until the 'Yes" box is checked, would it?

The "Yes" box IS checked by default. That is the whole point.

civil78 07-17-2010 01:31 PM

Look on last version of Vbulletin 4.0.5. The default value on clean setup is to don't leave redirect link. Maybe there is an option on setting for that check it.

djbaxter 07-17-2010 01:46 PM

I am running 4.05. vBulletin.org hasn't upgraded their options yet so the designation of 4.04 for this mod is the highest available.

I had the redirect problem in 4.03. In 4.04, it seemed to be fine. It reappeared in 4.05. Hence this mod.

If there is an option in settings to turn this off, please point me to it.

Boofo 07-17-2010 02:11 PM

Quote:

Originally Posted by djbaxter (Post 2070613)
The "Yes" box IS checked by default. That is the whole point.

Ok, I must have missed that then. I didn't think it was when I tested it.

james7zt 07-25-2011 08:48 PM

thank you so much! It works out good. 5 stars! :)

Luca_ITA 08-05-2011 04:27 PM

Working perfectly, many tnx!
v4.1.5pl1


All times are GMT. The time now is 06:43 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.01266 seconds
  • Memory Usage 1,788KB
  • 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
  • (6)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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