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
      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
      ...
      9th March 2016, 23:59
    • Add custom forum icons to vB5
      Mark.B
      Currently the forum icons on vBulletin 5 are sprites...this makes them rather tricky to change effectively.

      If you add the below custom css using Site Builder > Style > CSS Editor, as long as you have your icons uploaded somewhere, you can change them. Cloud customers can upload their icons to AdminCP > vBCloud File Manager, and then use the URLs the file manager gives you. Self hosted customers should upload the icons to a suitable path on their server, and use those URLs....
      9th March 2016, 23:54
    • How to fix or add back Mark Channels Read
      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.
      ...
      9th March 2016, 23:49
    • How to add forum names to Today's Posts
      Mark.B
      This is no longer required as the function has been added as of 5.3.4.

      One major thing that has been missing in vB5, has been the name of the forum in the Today's Posts / New Posts results. You are told the name of the topic, who started it, when it was started, who made the most recent post, etc...but you are not told what forum it's in.

      For many, this is essential, as they only want to read threads in forums they are interested in.

      Well, here's how to add...
      9th March 2016, 21:48
    • Add a Gallery to vBulletin 5
      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 "Latest Activity" by default, and not to display "Topics" whatsoever....
      9th March 2016, 21:47
    Working...
    X