We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46886
    • 1,154 Posts
    So I am looking at the profile page, actually i want to totally revamp it but I don't have time now.

    Anyway, I solved the date registered, thanks to whitebyte's solution, but didn't get it into the profile page yet, will do that soon.

    Right now I noticed that in the profile page there is a button for 'Stats', and in there is

    Last Login:
    Last Active:
    Post Count:
    Threads Started:
    Replies:

    I found that I can copy the code for last login and last active and put that into the profile page, but for some reason I can't get the post, threads and replies count to appear. I looked at the code and I can't see why this is.

    This isn't urgent, I have other issues much more important now, but i do want to push all this data into the profile page so I can use the stats page for something else.
      • 3749
      • 24,544 Posts
      Maybe there's a default prefix for the placeholder names?
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 46886
        • 1,154 Posts
        The contents of that tpl are quite simple, just
        <div class="dis-profile f1-f9">
            <h1>[[%discuss.general_stats? &user=`[[+name]]`]]</h1>
            <ul class="profile">
                <li class="f1-f5" style="margin-top:3px;margin-bottom:3px;">[[%discuss.threads_started]]: <strong>[[+topics]]</strong></li>
                <li class="f1-f5" style="margin-top:3px;margin-bottom:3px;">[[%discuss.replies]]: <strong>[[+replies]]</strong></li>
            </ul>
        </div>


        And I dont see anything in there that could be connected. So I am looking before that, because we have a structure of:

        Index (main stuff)
        sidebar
        - top side stuff, avatar
        - bottom side stuff (stats)

        And pushing from bottom side to main isn't working. So I am looking at both the sidebar level and the top side level, but they don't seem to have much:

        <aside class="f10-f12 m-profile-box"> (this is sidebar)
            <div class="PanelBox">
                <div class="Box">
                   <h2>[[+username]]'s Profile</h2>
                    <ul class="panel_info">
                        <li class="Heading">
                            [[!+discuss.user.username:eq=`[[+username]]`:then=`<a class="PanelBox-avatar" href="[[DiscussUrlMaker? &action=`user/edit`]]">`]] 
                                <img src="assets/userfiles/[[+username]]/avatar.gif" alt="[[+username]]">
                            [[!+discuss.user.username:eq=`[[+username]]`:then=`<span>[[%discuss.modify]]</span>
                            </a>`]] (this is top stuff, avatar and modify profile)
                        </li>
                    </ul>
                </div>
                <div class="Box">
                    [[+usermenu]] (this is bottom stuff)
                </div>
            </div>
        </aside>


        So looking in the usermenu tpl, could this be it? Its the line which makes the link to the stats, could the 'param' be what is needed?
         <li class="Depth2"><strong><a href="[[DiscussUrlMaker? &action=`user/statistics` &params=`{"user":"[[+id]]"}`]]">[[%discuss.stats]]</a></strong><span class="Count"> </span></li>


        Here is the whole tpl for this area, which provides the links to post list, stats, etc.
        <h4>User Menu</h4>
        <ul class="panel_info">
            <li class="Heading">[[%discuss.forum_profile]]</li>
        
            <li class="Depth2"><strong><a href="[[DiscussUrlMaker? &action=`user` ¶ms=`{"type":"username", "user":"[[+username]]"}`]]">[[%discuss.view]]</a></strong><span class="Count"> </span></li>
            [[+canEdit:notempty=`<li class="Depth2"><strong><a href="[[DiscussUrlMaker? &action=`user/edit`]]">[[%discuss.edit]]</a></strong><span class="Count"> </span></li>`]]
            <li class="Depth2"><strong><a href="[[DiscussUrlMaker? &action=`user/statistics` ¶ms=`{"user":"[[+id]]"}`]]">[[%discuss.stats]]</a></strong><span class="Count"> </span></li>
            <li class="Depth2"><strong><a href="[[DiscussUrlMaker? &action=`user/posts` ¶ms=`{"user":"[[+id]]"}`]]">[[%discuss.posts]]</a></strong><span class="Count"> </span></li>
        [ed. note: nuan88 last edited this post 9 years ago.]