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

XF 1.4 Show your online status

Discussion in 'XenForo Questions and Support' started by New Joe, Oct 12, 2014.

  1. New Joe

    New Joe Active Member

    A user can tick or not tick this in their Browsing Preferences

    So how can I make it that they can't?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    It would require an add-on to remove the functionality.

    You can 'cheat' by editing the templates to remove the option, or hide it using CSS.
     
    New Joe likes this.
  3. Bionic Rooster

    Bionic Rooster Well-Known Member

    Check with @AndyB he's good at creating add-ons that remove xF functionality. He might even have one for this already.
     
  4. Solidus

    Solidus Well-Known Member

  5. New Joe

    New Joe Active Member

    Care to share how to do it mate?
     
  6. Solidus

    Solidus Well-Known Member

    In template account_preferences, remove the following:

    Code:
    <li>
                        <label for="ctrl_visible"><input type="checkbox" name="visible" value="1" id="ctrl_visible" class="OptOut Disabler" {xen:checked "{$visitor.visible}"} /> {xen:phrase show_your_online_status}</label>
                        <p class="hint">{xen:phrase this_will_allow_other_people_to_see_when_you_online}</p>
                        <ul id="ctrl_visible_Disabler">
                            <li>
                                <label><input type="checkbox" name="activity_visible" value="1" class="OptOut" {xen:checked $visitor.activity_visible} /> {xen:phrase show_your_current_activity}</label>
                                <p class="hint">{xen:phrase this_will_allow_other_people_to_see_what_page_you_currently_viewing}</p>
                            </li>
                        </ul>
                    </li>
    Now in navigation_visitor_tab, remove:

    Code:
    <ul class="col1 blockLinksList">
                        <li>               
                            <form action="{xen:link account/toggle-visibility}" method="post" class="AutoValidator visibilityForm">
                                <label><input type="checkbox" name="visible" value="1" class="SubmitOnChange" {xen:checked $visitor.visible} />
                                    {xen:phrase show_online_status}</label>
                                <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
                            </form>
                        </li>
                    </ul>
     
    maszd and New Joe like this.
  7. New Joe

    New Joe Active Member

    What is that one?
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    In this case I would recommend doing the template edit as savvy users will be able to undo any CSS changes using the browser inspection tool.
     
    New Joe likes this.
  9. Liam W

    Liam W Well-Known Member

    (Any really savvy users will be able to send the post request manually if it isn't blocked server side)
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    That's second level savvy though ;)
     
  11. New Joe

    New Joe Active Member

    I'd have gone with the add on but it gave a long copyright on in the footer and I don't really like loads of copyright stuff in the footer
    I went with the editis instead....
     
    maszd likes this.

Share This Page