Ordinary Nimda
When clicking a Topic from the Topics List page, the posts are always shown with the page scrolled down to the first post (the opening post of the Topic). But I would like the whole header of the page to be displayed, most important of which is the Topic Title. The user has to see this, when clicking on a Topic IMO.

Is there any undocumented way, that this can be achieved? I see a "<a name=top/>" tag at the top of the page, but adding "#top" to the end of the URL does not work. There is some Javascript client side code in the page, which does its own magic. So, I am just asking this here, before I do some hacking. 🙂

On the other hand, the "First Unread" and "Last Post" functionalities are great and very useful, giving users a lot of choice, especially on Mobile!

  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.0
The only way to archive tis would be removing the javascript that scrolls the page
Ordinary Nimda
Originally Posted by: tha_watcha 

The only way to archive tis would be removing the javascript that scrolls the page

I actually did this in a relatively simple way, by removing the function loadGotoAnchor. If there is NO occurrence of '/find/lasptost/' or NO occurrence of '/find/unread/' in the current document.location.href URL, I do NOT call the loadGotoAnchor original function, so the page is just rendered normally, without any scrolling down to the first post TD element. However, if there is '/lastpost/' or '/unread/' in the URL, then I call the original function, which scrolls as we are accustomed.

If anyone is interested, I can post this segment here, some 10 lines of javascript code in DEFAULT.ASPX, plus one ID added to the first TABLE element in POSTS.ASCX as a marker, so only the POSTS page will be treated and not other YAF pages. I know it is an ugly hack, but it works like a charm with no or absolutely minimal overhead).

(This is for the DNN Module only, I suspect it works similarly in other scenarios).

EDIT: besides '/find/lastpost/' and '/find/unread/' there is also the case of '/m/' which scrolls to the given message number.