YAFLogo

zXSwordXz
  • zXSwordXz
  • 62.2% (Friendly)
  • YAF Camper Topic Starter
10 years ago
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

Sponsor
zXSwordXz
  • zXSwordXz
  • 62.2% (Friendly)
  • YAF Camper Topic Starter
10 years ago
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.
xjohny
  • xjohny
  • 65.6% (Friendly)
  • YAF Camper
10 years ago
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 😞
zXSwordXz
  • zXSwordXz
  • 62.2% (Friendly)
  • YAF Camper Topic Starter
10 years ago

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 :(

Originally Posted by: xjohny 

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

xjohny
  • xjohny
  • 65.6% (Friendly)
  • YAF Camper
10 years ago
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:
xjohny
  • xjohny
  • 65.6% (Friendly)
  • YAF Camper
10 years ago
Got it. But don't know why it's different for desktop and mobile browser though.

            if (!this.PageContext.IsMobileDevice)
            {
                textMessageLink.ToolTip =
                    "{0}".FormatWith(
                        this.GetTextFormatted(
                            "VIEW_TOPIC_STARTED_BY",
                            currentRow[this.Get<YafBoardSettings>().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"]);
            }
zXSwordXz
  • zXSwordXz
  • 62.2% (Friendly)
  • YAF Camper Topic Starter
10 years ago
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.

xjohny
  • xjohny
  • 65.6% (Friendly)
  • YAF Camper
10 years ago
Yes, I know what to change, thanks.

I just wondered why developers choose to make this change.. but nevermind. 🙂

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
10 years ago
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.