YAFLogo

Ordinary Nimda
7 years ago
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 "" 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!
Sponsor

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
7 years ago
The only way to archive tis would be removing the javascript that scrolls the page
Ordinary Nimda
7 years ago
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.
YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button