Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Aiheen aloitti: apsara - tammikuu 26, 2009, 05:41:41 AP

Otsikko: "view your posts"
Kirjoitti: apsara - tammikuu 26, 2009, 05:41:41 AP
I wish there is some way getting a "view your posts" link on the forum. "View new replies to your posts" is not enough for me.
Going into profile and looking for your posts also is not appealing to me.
From users point of view, this is a very important feature.
Otsikko: Re: "view your posts"
Kirjoitti: Kermit - tammikuu 26, 2009, 07:55:46 AP
Where do you want to have "view your posts" link on your forum ?

There is one already on profile page as Show the last posts of this person.
Otsikko: Re: "view your posts"
Kirjoitti: Antechinus - tammikuu 26, 2009, 03:48:06 IP
And for their convenience they would like that link on the forum itself. It's a reasonable request.

Aspara, which theme are you using?
Otsikko: Re: "view your posts"
Kirjoitti: apsara - tammikuu 27, 2009, 08:08:40 AP
I am using ApolloBB.

I chose this theme because it has an avatar on the front page. I wanted this feature so i chose ApolloBB. I would like also to have "view your posts".

Thanks


Otsikko: Re: "view your posts"
Kirjoitti: Antechinus - tammikuu 27, 2009, 11:01:09 IP
In index.template.php find this:

/ If you're logged in, show PM info and links to new posts.
if($context['user']['is_logged'])
echo '
                        <br />
                        <span class="middletext">'
                           , $context['allow_pm'] ? '<strong>' . $txt[152] . ' <a href="' . $scripturl . '?action=pm">' . $context['user']['messages'] . ' ' . ($context['user']['messages'] != 1 ? $txt[153] : $txt[471]) . '</a>' . $txt['newmessages4'] . ' ' . $context['user']['unread_messages'] . ' ' . ($context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1']).'</strong>' : '<br/>', '.<br/><br/>
                           &raquo; <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
                           &raquo; <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />
                        </span>';


Change it to this:

/ If you're logged in, show PM info and links to new posts.
if($context['user']['is_logged'])
echo '
                        <br />
                        <span class="middletext">'
                           , $context['allow_pm'] ? '<strong>' . $txt[152] . ' <a href="' . $scripturl . '?action=pm">' . $context['user']['messages'] . ' ' . ($context['user']['messages'] != 1 ? $txt[153] : $txt[471]) . '</a>' . $txt['newmessages4'] . ' ' . $context['user']['unread_messages'] . ' ' . ($context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1']).'</strong>' : '<br/>', '.<br/><br/>
                           &raquo; <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
                           &raquo; <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />
                           &raquo; <a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=showPosts">', $txt[460], ' ', $txt[461], '.</a><br />
                        </span>';
Otsikko: Re: "view your posts"
Kirjoitti: apsara - tammikuu 28, 2009, 02:40:53 IP
Thank you I will try and post my experience
Otsikko: Re: "view your posts"
Kirjoitti: greyknight17 - helmikuu 08, 2009, 12:38:47 IP
apsara, did you try the code replacement yet? Did that resolve the problem?
Otsikko: Re: "view your posts"
Kirjoitti: apsara - helmikuu 09, 2009, 09:34:52 AP
No, I am using apollo BB mod and I didnt want to risk code modifications. But while using the "core" theme, there is a package called 'Enhanced Profile Header' which satisfied me a lot.
Otsikko: Re: "view your posts"
Kirjoitti: apsara - helmikuu 09, 2009, 09:50:03 AP
Lainaus käyttäjältä: greyknight17 - helmikuu 08, 2009, 12:38:47 IP
apsara, did you try the code replacement yet? Did that resolve the problem?

Anyway I tried changing the file: but got the following error
Template Parse Error!
There was a problem loading the /Themes/ApolloBB/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

Parse error: syntax error, unexpected '/' in .../Themes/ApolloBB/index.template.php on line 362

353:    // language.  Otherwise, show a "Guest" avatar based on your color and language.
354:    if($context['user']['is_logged'])
355:       echo '
356:                         ',  !empty($context['user']['avatar']) ? $context['user']['avatar']['image'] : '<img src="'. $settings['images_url']. '/'. $context['user']['language']. '/'. $settings['theme_main_color']. '/no_avatar.gif" width="80" height="80" alt="" />';
357:    else echo '
358:                         <img src="', $settings['images_url'], '/', $context['user']['language'], '/', $settings['theme_main_color'], '/guest_avatar.gif" width="80" height="80" alt="" />';
359:       echo '
360:                      </td>
361:                      <td class="memberbar">';

362: / If you're logged in, show PM info and links to new posts.

363:    if($context['user']['is_logged'])
364:       echo '
365:                         <br />
366:                         <span class="middletext">'

So I undid the changes quickly.
Did i do something wrong?
Otsikko: Re: "view your posts"
Kirjoitti: Rumbaar - maaliskuu 01, 2009, 05:24:20 IP
In your custom themes index.template.php file just look for the section that contains the ?action=unread links and add the profile post link below it.
<a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=showPosts">', $txt[460], ' ', $txt[461], '.</a><br />Just match the syntax and formatting of your custom theme.
Otsikko: Re: "view your posts"
Kirjoitti: apsara - maaliskuu 02, 2009, 01:51:34 AP
I didn't really understand it now. May be i will read it over at leisure and explore it.  Thanks a lot for your interest.
Otsikko: Re: "view your posts"
Kirjoitti: Rumbaar - maaliskuu 02, 2009, 02:56:22 AP
Well let us know how you go.  You can attach the file and someone might be able to do it, if you're unable too.