Add Journal Links to User Modals: Menu & Avatar Pop-up

Discussion in 'NoFap Technical Support and Feedback' started by zilean, Apr 20, 2020.

  1. zilean

    zilean Fapstronaut

    When accessing the forums while on mobile, I have difficulty finding my own journal link. Sometimes, I'd like to quickly go to another's journal after seeing their status come up. Tapping on the Avatar modal is quick and currently looks like this:
    avatar_current.png

    I'd like to propose what may be a simple template adjustment that looks like this:
    avatar_with-journal.png
    The code would use somehting along the following lines:
    HTML:
    <div id="membercard390431" data-overlayclass="membercard">
        <div class="avatarCropper">
            <a class="avatar NoOverlay Av390431l" href="index.php?members/zilean.390431/">
                <img src="data/avatars/l/390/390431.jpg?1586881856" alt="" style="left: 32px; top: 32px; ">
            </a>
            
        </div>
        
        <div class="userInfo">
            <h3 class="username"><a href="index.php?members/zilean.390431/" class="username NoOverlay" dir="auto">zilean</a> </h3>
            
            <div class="userTitleBlurb">
                
                <h4 class="userTitle">Fapstronaut</h4>
                <div class="userBlurb">Male, 23, <span class="muted">from</span> <a href="index.php?misc/location-info&amp;location=Texas" class="concealed" target="_blank" rel="nofollow">Texas</a></div>
            </div>
            
            <blockquote class="status">Resting in the victories of today, strengthening me for the battles tomorrow!</blockquote>
    
            <div class="userLinks">
            
                <a href="index.php?members/zilean.390431/">Profile Page</a>
                
            
            </div>
            
            <dl class="userStats pairsInline">
            
                <...>
        
                </d>
                <dl class="pairsInline lastActivity">
                    <dt>zilean was last seen:</dt>
                    <dd>
                        
                            
                                Viewing thread <em><a href="index.php?threads/finding-the-living-water.273566/" class="concealed">Finding the Living Water</a></em>,
                            
                            <abbr class="DateTime muted" data-time="1587401258" data-diff="45" data-datestring="Apr 20, 2020" data-timestring="11:47 AM" title="Apr 20, 2020 at 11:47 AM">4 minutes ago</abbr>
                        
                    </dd>
    
                <!-- Suggested New Code -->
                </dl><dl class="pairsInline lastActivity">
                    <dt><i class="fa fa-book fa-fw"></i> zilean's journal:</dt>
                    <dd><em><a href="index.php?threads/finding-the-living-water.273566/" class="concealed">Finding the Living Water</a></em>, updated
                            
                            <abbr class="DateTime muted" data-time="1587401258" data-diff="45" data-datestring="Apr 20, 2020" data-timestring="11:47 AM" title="Apr 20, 2020 at 11:47 AM">4 minutes ago</abbr>
                        
                    </dd>
                </dl>
                <!-- End of new code -->
            
        </div>
        
        <a class="close OverlayCloser"></a>
    Where the following would be the template language
    PHP:
                </dl>

    {% if 
    member.journal_link %} {#check to see if the link exist #}
    <dl class="pairsInline lastActivity">
                    <
    dt><class="fa fa-book fa-fw"></i> {% member.name %} journal:</dt> {# add journal emoji, get username #}
                    
    <dd><em>{% member.journal_link %} </em>, updated
                            
                            
    {% functions.get_time_diff(member.journal_link.updated) %} 
                        
                    </
    dd>{# polls the member's profile to see what that link is #}
                
    </dl>
    {
    # endif #}

                
    <!-- End of new code -->
    I'm not a PHP coder, I do more MVC web dev coding. please forgive my syntactical error. I hope that it's function is legible.

    Then in the AccountMenu (when you click onthe user name) it currently looks like this:
    profile_menu_current.png
    but with the following changes, could look maybe like this:
    HTML:
    <div class="Menu JsOnly" id="AccountMenu" style="visibility: visible; display: block; top: 1129.5px; left: 52px;">
    <div class="primaryContent menuHeader">
    <a href="index.php?members/zilean.390431/" class="avatar Av390431m NoOverlay plainImage" title="View your profile" data-avatarhtml="true"><span class="img m" style="background-image: url('data/avatars/m/390/390431.jpg?1586881856')"></span></a>
    <h3><a href="index.php?members/zilean.390431/" class="concealed" title="View your profile">zilean</a></h3>
    <div class="muted">Fapstronaut</div>
    <ul class="links">
    <li class="fl"><a href="index.php?members/zilean.390431/">Your Profile Page</a></li>
    </ul>
    </div>
    <div class="menuColumns secondaryContent">
    <ul class="col1 blockLinksList">
    <li><...>
    <!-- New Code -->
    <li><a href="..."><i class="fa fa-book fa-fw"></i>Journal</a></li>
    <!-- End new code -->
    
    <li><a href="index.php?account/security"><i class="fa fa-key fa-fw"></i> Password</a></li>
    </ul>
    <ul class="col2 blockLinksList">
    <...>
    </div>
    <div class="menuColumns secondaryContent">
    <ul class="col1 blockLinksList">
    <li>
    <...>
    </div>
    With the edit looking something like this:
    profile_menu_with-journal.png

    PHP:
    <div class="Menu JsOnly" id="AccountMenu" style="visibility: visible; display: block; top: 1129.5px; left: 52px;">
    <
    div class="primaryContent menuHeader">
    <...>
    <
    div class="menuColumns secondaryContent">
    <
    ul class="col1 blockLinksList">
    <...>

    <!-- New 
    Code -->
    {% if 
    member.journal_link %}
    <
    li><a href="
     {{member.journal_link}}
    "
    ><class="fa fa-book fa-fw"></i>Journal</a></li>
    {% endif  %}
    <!-- 
    End new code -->

    <
    li><a href="index.php?account/security"><class="fa fa-key fa-fw"></iPassword</a></li>
    </
    ul>
    <...>
    </
    div>
    Just my ideas, I know journals are important to the recovery process and having a quicker access to them would be handy.

    Let me know what y'all think!
     
    |Fenris| likes this.
  2. kropo82

    kropo82 Fapstronaut

    Have you tried turning your phone into landscape? If you do that then the user's badge gets displayed next to their post and so you can click on the 'My journal' link. But I do like your suggestion, I wonder if @Jack Fischer has seen it.
     
  3. Thank you for the suggestion. It’s a good idea. However, I can’t say when we would be able to make such a tweak.
     
    kropo82 likes this.

Share This Page