Welcome Guest! To enable all features please Login or Register.
Options
View
Go to last post Go to first unread
Offline BasedGod  
#1 Posted : Monday, June 1, 2015 10:23:31 AM(UTC)
BasedGod


Rank: YAF Forumling

Reputation:

Joined: 6/1/2015(UTC)
Posts: 3
Cook Islands
Location: Belize

Thanks: 1 times
Has anyone figured out a way to enable Avatars on the mobile theme? I'm not sure if it was hardcoded out I do understand the mobile theme uses its own aspx files. I tried to modify the theme file to enable or unhide them to no avail.

Less pertinent question is if anyone has come up with a solution for quick mobile switching?
Sponsor
Offline tha_watcha  
#2 Posted : Saturday, June 6, 2015 11:39:30 AM(UTC)
tha_watcha


Rank: YAF.NET Project Lead

Reputation:

Medals: Medal of Honor: Portal Puzzle Master: Portal Puzzle Master for DNNMedal of Honor Key: Given to pillars of the community who are key players in the YAF community and project.DNN Master: DNN Module ManBug Killer Medal of Honor: Medal for being a kick-ass bug killer!Medal of Honor for the Support King: Support King! Amazing asset to the YAF.NET Community.

Joined: 3/6/2010(UTC)
Posts: 3,721
Germany

Thanks: 70 times
Was thanked: 1147 time(s) in 977 post(s)
Originally Posted by: BasedGod Go to Quoted Post
Has anyone figured out a way to enable Avatars on the mobile theme? I'm not sure if it was hardcoded out I do understand the mobile theme uses its own aspx files. I tried to modify the theme file to enable or unhide them to no avail.


To add avatars to the mobile pages open up the file ..\themes\YafMobile\MobilePages\displaypost.ascx

and change...

Code:
<YAF:OnlineStatusImage id="OnlineStatusImage" runat="server" Visible='<%# PageContext.BoardSettings.ShowUserOnlineStatus && !UserMembershipHelper.IsGuestUser( DataRow["UserID"] )%>' Style="vertical-align: bottom" UserID='<%# DataRow["UserID"] %>'  />
            <YAF:ThemeImage ID="ThemeImgSuspended" ThemePage="ICONS" ThemeTag="USER_SUSPENDED"  UseTitleForEmptyAlt="True" Enabled='<%# DataRow["Suspended"] != DBNull.Value && DataRow["Suspended"].ToType<DateTime>() > DateTime.UtcNow %>' runat="server"></YAF:ThemeImage>
        <YAF:UserLink  ID="UserProfileLink" runat="server" UserID='<%# DataRow["UserID"]%>' ReplaceName='<%#  PageContext.BoardSettings.EnableDisplayName && (!DataRow["IsGuest"].ToType<bool>() || (DataRow["IsGuest"].ToType<bool>() && DataRow["DisplayName"].ToString() == DataRow["UserName"].ToString())) ? DataRow["DisplayName"] : DataRow["UserName"]%>' PostfixText='<%# DataRow["IP"].ToString() == "NNTP" ? this.GetText("EXTERNALUSER") : String.Empty %>' Style='<%#DataRow["Style"]%>' CssClass="UserPopMenuLink" EnableHoverCard="False" />            


to...

Code:
<YAF:OnlineStatusImage id="OnlineStatusImage" runat="server" Visible='<%# PageContext.BoardSettings.ShowUserOnlineStatus && !UserMembershipHelper.IsGuestUser( DataRow["UserID"] )%>' Style="vertical-align: bottom" UserID='<%# DataRow["UserID"] %>'  />
            <YAF:ThemeImage ID="ThemeImgSuspended" ThemePage="ICONS" ThemeTag="USER_SUSPENDED"  UseTitleForEmptyAlt="True" Enabled='<%# DataRow["Suspended"] != DBNull.Value && DataRow["Suspended"].ToType<DateTime>() > DateTime.UtcNow %>' runat="server"></YAF:ThemeImage>

<%
            
                 var avatarUrl = this.Get<IAvatars>().GetAvatarUrlForUser(DataRow["UserID"].ToType<int>());

                var avatarTitle = this.GetTextFormatted(
                    "USER_AVATAR",
                    this.HtmlEncode(DataRow[this.Get<YafBoardSettings>().EnableDisplayName ? "DisplayName" : "UserName"].
                        ToString()));
        %>
        <img src="<%=avatarUrl%>" alt="<%= avatarTitle %>" title="<%= avatarTitle %>"
            class="avatarimage img-rounded" />
        <YAF:UserLink  ID="UserProfileLink" runat="server" UserID='<%# DataRow["UserID"]%>' ReplaceName='<%#  PageContext.BoardSettings.EnableDisplayName && (!DataRow["IsGuest"].ToType<bool>() || (DataRow["IsGuest"].ToType<bool>() && DataRow["DisplayName"].ToString() == DataRow["UserName"].ToString())) ? DataRow["DisplayName"] : DataRow["UserName"]%>' PostfixText='<%# DataRow["IP"].ToString() == "NNTP" ? this.GetText("EXTERNALUSER") : String.Empty %>' Style='<%#DataRow["Style"]%>' CssClass="UserPopMenuLink" EnableHoverCard="False" />            




Originally Posted by: BasedGod Go to Quoted Post

Less pertinent question is if anyone has come up with a solution for quick mobile switching?


There is always a link at the bottom to switch between mobile or full site.
thanks 1 user thanked tha_watcha for this useful post.
BasedGod on 7/7/2015(UTC)
Rss Feed  Atom Feed
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error