Feature request: Notification indicator visible on front page

Discussions about the forum and contents
Post Reply
Topic Author
cacophony
Posts: 1363
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: 5066
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: 2496
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: 1363
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: 1411
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: 86079
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: 95696
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: 1363
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 larger of the counts in parenthesis and
2. Add this count 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");

        // a single instance can appear in both badge locations, so just use whatever is bigger
        var myCount = Math.max(pmCount, threadCount);
        var countStr = "";

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

        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 imageElement = document.createElement('img');
                imageElement.src = "https://i.imgur.com/qFOm05k.png";
                imageElement.align = "bottom";

                var linkElement = document.createElement('a');
                var linkText = document.createTextNode(pmCount + threadCount);
                var boldedLinkText = document.createElement("B");
                boldedLinkText.appendChild(linkText);
                var spaceText = document.createTextNode("  ");

                linkElement.appendChild(imageElement);
                linkElement.appendChild(boldedLinkText);
                linkElement.appendChild(spaceText);
                linkElement.title = "Check new messages";
                linkElement.style = "color: blue";
                linkElement.href = "https://www.bogleheads.org/forum/" + notifyUrl;

                postHeader.parentNode.insertBefore(linkElement, postHeader.nextSibling);
            }
        }
    },
    onerror: function (e) {
        console.error ('**** error ', e);
    },
    onabort: function (e) {
        console.error ('**** abort ', e);
    },
    ontimeout: function (e) {
        console.error ('**** timeout ', e);
    }
} );
Last edited by cacophony on Sun Apr 23, 2023 12:14 pm, edited 1 time in total.
Cpadave
Posts: 278
Joined: Wed Nov 22, 2017 10:53 am

Re: Feature request: Notification indicator visible on front page

Post by Cpadave »

Not sure if this is a right place to pose. I was wondering if there is a way to add upvote to posts and replies. It might be a good option to have.
FireSekr
Posts: 1388
Joined: Tue Apr 02, 2013 9:54 am

Re: Feature request: Notification indicator visible on front page

Post by FireSekr »

I would love to have this as well. It is my biggest frustration with the site
User avatar
Peculiar_Investor
Site Admin
Posts: 2445
Joined: Thu Oct 20, 2011 12:23 am
Location: Calgary, AB 🇨🇦
Contact:

Re: Feature request: Notification indicator visible on front page

Post by Peculiar_Investor »

Cpadave wrote: Sat Apr 22, 2023 8:00 am Not sure if this is a right place to pose. I was wondering if there is a way to add upvote to posts and replies. It might be a good option to have.
That has come up before and has been asked and answered, see viewtopic.php?p=2586152#p2586152
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams
User avatar
Stinky
Posts: 14158
Joined: Mon Jun 12, 2017 11:38 am
Location: Sweet Home Alabama

Re: Feature request: Notification indicator visible on front page

Post by Stinky »

mervinj7 wrote: Sun Mar 14, 2021 3:57 pm Try this page
search.php?search_id=active_topics
Yes, the “active topics” page is the place to start.
Retired life insurance company financial executive who sincerely believes that ”It’s a GREAT day to be alive!”
User avatar
retiredjg
Posts: 54082
Joined: Thu Jan 10, 2008 11:56 am

Re: Feature request: Notification indicator visible on front page

Post by retiredjg »

cacophony wrote: Sun Mar 14, 2021 3:55 pm 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.
I get these notifications through email. Are you aware you can do that? Makes it easy to keep up with most of the time.
Topic Author
cacophony
Posts: 1363
Joined: Tue Oct 16, 2007 9:12 pm

Re: Feature request: Notification indicator visible on front page

Post by cacophony »

retiredjg wrote: Sun Apr 23, 2023 10:57 am
cacophony wrote: Sun Mar 14, 2021 3:55 pm 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.
I get these notifications through email. Are you aware you can do that? Makes it easy to keep up with most of the time.
Good to know, though in my case I wrote a userscript to give me the notification indicator on the front page. It's great and I appreciate it every time :sharebeer
Post Reply