1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Customizing default selections in Move Thread/Move Post

Discussion in 'Styling and Customization Questions' started by Rudy, Feb 5, 2015.

  1. Rudy

    Rudy Well-Known Member

    This is the Move Thread dialog:

    upload_2015-2-5_11-10-31.png

    We want Redirection Notice to default to "Do not leave a redirect," and the two Notify checkboxes to be unchecked. I had thought of doing this via template edits, but upon looking, there is code there that seems to control it, as opposed to the HTML simply using SELECTED or CHECKED.

    Is there any way to do this easily?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Edit the inline_mod_thread_helper_redirect template like so:

    HTML:
    <ul>
        <li><label for="ctrl_create_redirect_none"><input type="radio" name="create_redirect" value="" id="ctrl_create_redirect_none" checked="checked" /> {xen:phrase do_not_leave_redirect}</label></li>
        <li><label for="ctrl_create_redirect_permanent"><input type="radio" name="create_redirect" value="permanent" id="ctrl_create_redirect_permanent" /> {xen:phrase leave_permanent_redirect}</label></li>
        <li><label for="ctrl_create_redirect_expiring"><input type="radio" name="create_redirect" value="expiring" id="ctrl_create_redirect_expiring" class="Disabler" /> {xen:phrase leave_redirect_that_expires_after}:</label>
            <ul id="ctrl_create_redirect_expiring_Disabler">
                <li>
                    <input type="text" size="5" name="redirect_ttl_value" value="1" class="textCtrl autoSize" />
                    <select name="redirect_ttl_unit" class="textCtrl autoSize">
                        <option value="hours">{xen:phrase hours}</option>
                        <option value="days" selected="selected">{xen:phrase days}</option>
                        <option value="weeks">{xen:phrase weeks}</option>
                        <option value="months">{xen:phrase months}</option>
                    </select>
                </li>
            </ul>
        </li>
    </ul>
    Essentially, move checked="checked" from the expiring option to the no redirect option.

    Just noticed the other questions.

    For the forum watching, edit the inline_mod_thread_move template and remove {xen:checked '{$threadCount} == 1'}.

    For the thread started, edit the helper_thread_mod_action_alert template and remove {xen:checked $alertDefault}.
     
    Rudy and Amaury like this.
  3. AndyB

    AndyB Well-Known Member

  4. Rudy

    Rudy Well-Known Member

    That should work nicely--I was not certain where that was located.

    I was also not sure of how the {xen:checked ...} code worked and was reluctant to change or move it.

    Does the "move post" dialog use similar coding? IF so, I can figure that out.

    Thanks much!
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Yes, the code should be similar for all templates which have that functionality so you can just do similar edits.
     
    Rudy likes this.
  6. Rudy

    Rudy Well-Known Member

    The other edits worked like a charm! This one, however, still results in the box being checked after removing the {xen:checked...} phrase as shown. (This was for "Notify members watching the destination forum.")

    upload_2015-2-5_15-17-34.png
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    Are you using the inline mod or the thread tools dropdown?

    The latter uses the thread_move template, so you will also need to edit that and remove the checked="checked".
     
  8. Rudy

    Rudy Well-Known Member

    Oh, OK, that explains it. We actually use both in about equal numbers, so everything has been helpful. I saw the thread_move template earlier--I'll edit that one and we should be all set.

    Thanks much!
     

Share This Page