List of post on profile.template.php

Started by gear777, June 19, 2024, 07:08:30 PM

Previous topic - Next topic

gear777

Hello, how can I extract the user's posts in profile.template.php?

        foreach ($context['posts'] as $post)
        {
            echo '
        <div class="', $post['css_class'], '">
            <div class="page_number floatright"> #', $post['counter'], '</div>
            <div class="topic_details">
                <h5>
                    <strong><a href="', $scripturl, '?board=', $post['board']['id'], '.0">', $post['board']['name'], '</a> / <a href="', $scripturl, '?topic=', $post['topic'], '.', $post['start'], '#msg', $post['id'], '">', $post['subject'], '</a></strong>
                </h5>
                <span class="smalltext">', $post['time'], '</span>
            </div>';

            if (!$post['approved'])
                echo '
            <div class="noticebox">
                ', $txt['post_awaiting_approval'], '
            </div>';

            echo '
            <div class="post">
                <div class="inner">
                    ', $post['body'], '
                </div>
            </div><!-- .post -->';

            // Post options
            template_quickbuttons($post['quickbuttons'], 'profile_showposts');

            echo '
        </div><!-- .', $post['css_class'], ' -->';
        }

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

dodos26

Do you want to extract from your website, do you want to create your own list, such as mine in the attachment? Want to extract from another page, use xpatch.

gear777

Quote from: Kindred on June 19, 2024, 07:54:03 PMWhat exactly are you trying to do?

a list of each user's entries in their profile.

This is my profile. I want to place a list of entries in the profile.

zedd151

#4
"a list of each users entries"
What entries? Do you mean a listing of their posts?
Post Messages, Topics Started by user, and the users Attachments already have listings. It is unclear what you are after.
This is a case where more information is needed. What entries?? And where exactly do you want the list placed? On the user profile main page?

Kindred

And this is your list of posts...
https://www.simplemachines.org/community/index.php?action=profile;area=showposts;sa=messages;u=666667

That content already exists

You still have not explained what exactly you are trying to do (or why)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

dodos26

I think I want to see a list of posts which is the so-called first topic.
You cannot view this attachment.

Arantor

How many posts? Based on what criteria?
Holder of controversial views, all of which my own.

Advertisement: