YAFLogo

rai
  • rai
  • 100% (Exalted)
  • YAF Commander Topic Starter
8 years ago
How can I turn off the jumping to anchors when clicking on threads. I feel that it really not work that good and is irritating when rewriting the url.
Sponsor

BWG
  • BWG
  • 100% (Exalted)
  • YAF Lover
8 years ago
I think you will need to modify pages/posts.ascx.cs as below (just commenting out the code in the else branch) and then recompile.

FWIW I also don't like the post jumping functionality and have removed it from my installation using this approach.


if (findMessageId > 0)
{
this.Pager.CurrentPageIndex = rowList.First().Field(columnName: "PageIndex");

// move to this message on load...
if (!this.PageContext.IsCrawler)
{
PageContext.PageElements.RegisterJsBlockStartup(
this, "GotoAnchorJs", JavaScriptBlocks.LoadGotoAnchor("post{0}".FormatWith(findMessageId)));
}
}
else
{
// move to this message on load...
//if (!this.PageContext.IsCrawler)
//{
// PageContext.PageElements.RegisterJsBlockStartup(
// this,
// "GotoAnchorJs",
// JavaScriptBlocks.LoadGotoAnchor("post{0}".FormatWith(rowList.First().Field(columnName: "MessageID"))));
//}
}
rai
  • rai
  • 100% (Exalted)
  • YAF Commander Topic Starter
8 years ago
Thanks, should be a setting for this...
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