Feature request: Notification indicator visible on front page

Discussions about the forum and contents
Post Reply
Topic Author
cacophony
Posts: 1029
Joined: Tue Oct 16, 2007 9:12 pm

Feature request: Notification indicator visible on front page

Post by cacophony »

I primarily utilize the front page (https://www.bogleheads.org/) because it nicely aggregates all the sub forums. And when clicking on a link it conveniently takes you to the first post you haven't read. The problem with this is that you never see notification(s) for new posts in subscribed threads, notifications for replies to your posts, etc. You need to explicitly scroll to the top of one of the content threads to see the notification indicator.

Feature request: Have the notification indicator on the front page
Da5id
Posts: 4978
Joined: Fri Feb 26, 2016 7:20 am

Re: Feature request: Notification indicator visible on front page

Post by Da5id »

I also would appreciate having this feature if it is reasonable to implement.
mervinj7
Posts: 2437
Joined: Thu Mar 27, 2014 3:10 pm

Re: Feature request: Notification indicator visible on front page

Post by mervinj7 »

cacophony wrote: Sun Mar 14, 2021 3:55 pm I primarily utilize the front page (https://www.bogleheads.org/) because it nicely aggregates all the sub forums. And when clicking on a link it conveniently takes you to the first post you haven't read. The problem with this is that you never see notification(s) for new posts in subscribed threads, notifications for replies to your posts, etc. You need to explicitly scroll to the top of one of the content threads to see the notification indicator.

Feature request: Have the notification indicator on the front page
Try this page
search.php?search_id=active_topics
Topic Author
cacophony
Posts: 1029
Joined: Tue Oct 16, 2007 9:12 pm

Re: Feature request: Notification indicator visible on front page

Post by cacophony »

mervinj7 wrote: Sun Mar 14, 2021 3:57 pm
cacophony wrote: Sun Mar 14, 2021 3:55 pm I primarily utilize the front page (https://www.bogleheads.org/) because it nicely aggregates all the sub forums. And when clicking on a link it conveniently takes you to the first post you haven't read. The problem with this is that you never see notification(s) for new posts in subscribed threads, notifications for replies to your posts, etc. You need to explicitly scroll to the top of one of the content threads to see the notification indicator.

Feature request: Have the notification indicator on the front page
Try this page
search.php?search_id=active_topics
I didn't know about that, thanks.

Maybe I'm just used to it, but I do find the front page more pleasant /readable to look at, so I'd still be interested in the enhancement (if it's easy to do).
Last edited by cacophony on Sun Mar 14, 2021 4:06 pm, edited 1 time in total.
dboeger1
Posts: 1348
Joined: Fri Jan 13, 2017 6:32 pm

Re: Feature request: Notification indicator visible on front page

Post by dboeger1 »

YEEEEEES PLEASE. This one thing drives me up a wall, lol.
livesoft
Posts: 82731
Joined: Thu Mar 01, 2007 7:00 pm

Re: Feature request: Notification indicator visible on front page

Post by livesoft »

While I do not use the "subscribe" thing, I can easily see which threads have new posts since I last read them by the color change of the time in the "Last" column as well as the color change in the thread title. That's because I click on these two places to read a thread and not the first post in the thread.
Wiki This signature message sponsored by sscritic: Learn to fish.
User avatar
LadyGeek
Site Admin
Posts: 88447
Joined: Sat Dec 20, 2008 4:34 pm
Location: Philadelphia
Contact:

Re: Feature request: Notification indicator visible on front page

Post by LadyGeek »

^^^ That's your browser keeping track of new posts. Each of those links is made unique by adding the post ID to the end of the URL. Every new post has a unique identifier. If you haven't visited that link before, your browser colors the link one way - e.g. blue. If you've read the thread, i.e. visited the URL, your browser colors it differently, e.g. red.
cacophony wrote: Sun Mar 14, 2021 3:55 pm Feature request: Have the notification indicator on the front page
Sorry, the home page is intended to be "bare bones". We won't be adding any more features.

Instead, I suggest you view New posts (logged in) or Active topics (not logged in).
Wiki To some, the glass is half full. To others, the glass is half empty. To an engineer, it's twice the size it needs to be.
Topic Author
cacophony
Posts: 1029
Joined: Tue Oct 16, 2007 9:12 pm

Re: Feature request: Notification indicator visible on front page

Post by cacophony »

Da5id wrote: Sun Mar 14, 2021 3:57 pm I also would appreciate having this feature if it is reasonable to implement.
dboeger1 wrote: Sun Mar 14, 2021 4:06 pm YEEEEEES PLEASE. This one thing drives me up a wall, lol.
I figured out how to write a userscript to add this functionality, which I'm including below. You can make use of this userscript by installing the tampermonkey browser extension in your web browser (https://www.tampermonkey.net/)

The script is configured to only run on bogleheads.org. When you go to https://www.bogleheads.org it will automatically load your profile page and inspect the profile's html to see the unread counts for private messages and thread messages.

If either count is above zero it will :
1. Change the page title to start with the count(s) in parenthesis and
2. Add the count(s) to the left of the "Post Listings" header. This count header is also a link that will take you to the list of the unread content.

I scraped the profile page because it has very little content on it.

Note: I have no real experience with userscript or modern web development, so if anyone has suggestions or improvements let me know! I got it to work but I'm sure various improvements could be made.

Code: Select all

// ==UserScript==
// @name        Bogleheads Unread Counts
// @description Add unread count to the root Bogleheads page
// @version     1.0
// @require     http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @grant       GM_xmlhttpRequest
// @match https://www.bogleheads.org/*
// @exclude https://www.bogleheads.org/forum/*
// ==/UserScript==

GM_xmlhttpRequest ( {
    method: "GET",
    url:    "https://www.bogleheads.org/forum/memberlist.php?mode=viewprofile",
    onload: function (response) {
        var parser = new DOMParser ();
        var doc = parser.parseFromString (response.responseText, "text/html");
        var pmCount = parseInt(doc.getElementsByClassName ("badge")[0].textContent, 10);
        var threadCount = parseInt(doc.getElementsByClassName ("badge")[1].textContent, 10);
        var notifyUrl = doc.getElementById ("notification_list_button").getAttribute("href");

        var countStr = "";
        if (pmCount > 0)
        {
            countStr += "(" + pmCount + ") ";
        }

        if (threadCount > 0)
        {
            countStr += "(" + threadCount + ") ";
        }

        if (countStr.length > 0)
        {
            var oldTitle = document.title;
            // if this script runs on a page that already displays count, don't update title
            if (!oldTitle.startsWith("("))
            {
               document.title = countStr + oldTitle;
            }

            var postHeader = document.getElementById('post_page_top');
            if (postHeader) {
                var boldElem = document.createElement("B");
                var linkElement = document.createElement('a');
                var linkText = document.createTextNode(countStr);
                linkElement.appendChild(linkText);
                linkElement.title = countStr;
                linkElement.href = "https://www.bogleheads.org/forum/" + notifyUrl;
                boldElem.appendChild(linkElement);
                postHeader.parentNode.insertBefore(boldElem, postHeader.nextSibling);
            }
        }
    },
    onerror: function (e) {
        console.error ('**** error ', e);
    },
    onabort: function (e) {
        console.error ('**** abort ', e);
    },
    ontimeout: function (e) {
        console.error ('**** timeout ', e);
    }
} );
Post Reply