Announcement

Collapse
No announcement yet.

How to fix or add back Mark Channels Read

Collapse
X
Collapse
  •  

  • How to fix or add back Mark Channels Read

    By default, "Mark Channels Read" is present in the navbar, but it only works on 'Forum' pages.
    As of 5.2.3 it is no longer present AT ALL in new installs.

    Here's how to make it work on any page if it does already exist. (If it doesn't exist, instructions for adding it back are at the bottom, but you still need to do this part!)

    First, go to AdminCP > Style Manager, and from your chosen style, select "Add New Template" from the dropdown.

    Template title: mark_read
    Template contents:
    Code:
    <script>
    (function($) {
        //apply to Search Results widget only
        //if ($('.search-results-widget').length) {
            //attach click handler to Mark Channels Read subnav item
            $('.navbar_mark_channels_read').on('click', function(e) {
                e.preventDefault();
                e.stopImmediatePropagation(); //cancel original click handler
                
                //mark channel read for root node 1 to mark all channels read
                vBulletin.setChannelRead(1, {
                    success: function() {
                        location.href = pageData.baseurl; //redirect to homepage
                    },
                    error: function() {
                        openAlertDialog({
                            title: vBulletin.phrase.get("forum"),
                            message: "Mark Channels Read failed.",
                            iconType: "error"
                        });
                    }
                });
            });
       // }
    })(jQuery);
    </script>
    Then go to AdminCP > Products & Hooks > Manage Template Hooks > Add New Hook
    Hook Location: footer_before_body_end
    Title: Mark Channels Read Fix
    Template Name: mark_read

    Leave all other fields as they are, and save.

    If it DOES NOT exist:

    Create a new navbar item in site-builder called "Mark channels read" or whatever. Then in the link creation dialog under Target URL, put http://yourforumurl.com/# and under link attributes, put class="navbar_mark_channels_read" and save.

    Obviously replace yourforumurl.com with your actual forum url.

    Original fix posted by Glenn Vergara on www.vbulletin.com/forum
      Posting comments is disabled.

    Article Tags

    Collapse

    There are no tags yet.

    Latest Articles

    Collapse

    • How to install vB5 manually
      by Mark.B
      These instructions show you how to manually configure the two config files that come with vBulletin 5.

      1. Download the newest vB5 release from the members' area. https://members.vbulletin.com

      2. Unzip the files and go to the "upload" folder.

      3. You need to rename this file:

      /config.php.bkp

      To:

      /config.php

      Then, you need to rename this file:

      /core/includes/config.php.new
      ...
      9 March 2016, 22:59
    • How to fix or add back Mark Channels Read
      by Mark.B
      By default, "Mark Channels Read" is present in the navbar, but it only works on 'Forum' pages.
      As of 5.2.3 it is no longer present AT ALL in new installs.

      Here's how to make it work on any page if it does already exist. (If it doesn't exist, instructions for adding it back are at the bottom, but you still need to do this part!)

      First, go to AdminCP > Style Manager, and from your chosen style, select "Add New Template" from the dropdown.
      ...
      9 March 2016, 22:49
    • Add a Gallery to vBulletin 5
      by Mark.B
      Here's how to add a Gallery like the one seen on this site.

      My site has done it by using a forum called "Gallery" that is set not to display in the forum listings (set its display order to "0" in the channel manager).
      Create a link in the navbar to that forum and call it "Gallery".

      Then, go into that forum, and using Site Builder, set the tabs to display "Photos" by default, and not to display "Topics" whatsoever....
      9 March 2016, 20:47
    Working...
    X