rai
  •  rai
  • 100% (Exalted)
  • YAF Commander Topic Starter
2014-09-26T07:35:46Z
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
  • 99.4% (Exalted)
  • YAF Lover
2014-09-26T08:59:11Z
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<int>(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<int>(columnName: "MessageID"))));
//}
}
rai
  •  rai
  • 100% (Exalted)
  • YAF Commander Topic Starter
2014-09-26T09:00:42Z
Thanks, should be a setting for this...

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

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved