Posted by: zXSwordXz - Monday, 21 July 2014 04:39:35
I have a question. How can I set the "Active Discussion" link to take the user to the last post for that topic when they click on it instead of taking them to the first post? I notice that when I access my yaf forum with a PC and I click on an active discussion link it take me to the first post for that topic but if I was to access it with my mobile device(mobile theme enable) and I tap on an active discussion link, it take me to the last post on that topic. This is the way it should work not taking the user to the first post.
Thank you,
Anthony
Posted by: zXSwordXz - Tuesday, 22 July 2014 14:39:18
This is solve, I figure out that I was looking at it all wrong. If the mod can delete or close this would be great.
Posted by: xjohny - Friday, 29 August 2014 14:22:16
How did you solve that? I'd like the link to go to the latest message (or first unread) too. That's the way it worked in 1.9.x but now it always goes to the first post :(
Posted by: zXSwordXz - Friday, 29 August 2014 15:10:09
[quote=xjohny;64393]How did you solve that? I'd like the link to go to the latest message (or first unread) too. That's the way it worked in 1.9.x but now it always goes to the first post :([/quote]
Hi xJohny,
I really didn't fix it as I realize that the arrows to the right of the topic act as navigation on where to go. The down arrow take you to the last post and the right arrow take you to the last read topic. Click on the topic itself will open up the thread and take you to the first post. I think it was intentionally done by the developer to give the end user more choices? The only way to fix it is to change the code behind and rebuild the project.
Anthony
Posted by: xjohny - Friday, 29 August 2014 16:01:39
I was afraid of that but I think it's unevitable to change that back because it's much easier to click on the topic name than trying to focus mouse cursor on a tiny icon :evil:
Posted by: xjohny - Friday, 29 August 2014 16:10:25
Got it. But don't know why it's different for desktop and mobile browser though.
[code=csharp] if (!this.PageContext.IsMobileDevice)
{
textMessageLink.ToolTip =
"{0}".FormatWith(
this.GetTextFormatted(
"VIEW_TOPIC_STARTED_BY",
currentRow[this.Get().EnableDisplayName ? "UserDisplayName" : "UserName"]
.ToString()));
textMessageLink.NavigateUrl = YafBuildLink.GetLinkNotEscaped(
ForumPages.posts, "t={0}", currentRow["TopicID"]);
}
else
{
textMessageLink.ToolTip = this.GetText("DEFAULT", "GO_LASTUNREAD_POST");
textMessageLink.NavigateUrl = YafBuildLink.GetLinkNotEscaped(
ForumPages.posts, "t={0}&find=unread", currentRow["TopicID"]);
}[/code]
Posted by: zXSwordXz - Friday, 29 August 2014 16:49:09
Hi xjohny,
If you look at the code, the If statement stated that "IF IS NOT MOBILE"(!=NOT) to show the navigation and the ELSE statement is for Mobile devices.and the default is "GO_LASTUNREAD_POST". You can remove the if/else statement and just leave the else block of code which will make both platform go to the last unread post.
Posted by: xjohny - Friday, 29 August 2014 20:08:28
Yes, I know what to change, thanks.
I just wondered why developers choose to make this change.. but nevermind. :)
Posted by: tha_watcha - Tuesday, 9 September 2014 11:50:59
Agree should be changed. Otherwise you always have to go 2 steps back to the forum index if you use the back button of the browser. This will be changed in 2.2.0.