Show your posts in home page?

Started by spiros, February 27, 2006, 04:26:45 AM

Previous topic - Next topic

spiros

I find this functionality pretty useful (i.e. when I want to edit one of my posts). Currently one has to go to Profile->Show posts, but this is cumbersome.

RyanJones

Quote from: spiros on February 27, 2006, 04:26:45 AM
I find this functionality pretty useful (i.e. when I want to edit one of my posts). Currently one has to go to Profile->Show posts, but this is cumbersome.

I believe it can be done via SSI... http://www.simplemachines.org/community/index.php?topic=14906.0

Cheers,

Ryan Jones
RyanJ (Ryan Jones)

Support Web Standards!

Currently working On: Additions to the Karma system.

spiros

Well, yes, you can display "Your posts" via SSI but this is not what I meant. I mean the addition of an extra link "Your posts" on SMF next to

QuoteShow unread posts since last visit. | Show new replies to your posts.

it is a suggestion  ;)

RyanJones

#3
Oh, sorry...  :(

Anyay, see if this works as a temporary fix:

Open: /Themes/ThemeName/index.template.php

Find: <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';


Replace With:

<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />
               <
a href="', $scripturl, '?action=profile;u=', $context['user']['id'] , ';sa=showPosts">Show your posts.</a><br />';



Cheers,

Ryan Jones
RyanJ (Ryan Jones)

Support Web Standards!

Currently working On: Additions to the Karma system.

spiros

Thanks Ryan! This is a cool trick which many forums incorporate by default. For example punbb has:

    Show recent posts
    Show unanswered posts
    Show your subscribed topics
    Show your posts

RyanJones

#5
Quote from: spiros on February 27, 2006, 11:43:07 AM
Thanks Ryan! This is a cool trick which many forums incorporate by default. For example punbb has:

    Show recent posts
    Show unanswered posts
    Show your subscribed topics
    Show your posts

Thats true, I'm shure it will be included some time :) Until then that patch should do :)

Cheers,

Ryan Jones
RyanJ (Ryan Jones)

Support Web Standards!

Currently working On: Additions to the Karma system.

spiros

What if one wants to also add a link for the 20 latest posts (Normally appearing in the "View the 20 most recent posts on the forum" at the Forum stats box? I tried adding this:

<a href="', $scripturl, '?action=recent">', $txt[234], '</a>', $context['show_stats'] ? '<br />

but I got Template parse error

RyanJones

Quote from: spiros on March 01, 2006, 04:29:28 PM
What if one wants to also add a link for the 20 latest posts (Normally appearing in the "View the 20 most recent posts on the forum" at the Forum stats box? I tried adding this:

<a href="', $scripturl, '?action=recent">', $txt[234], '</a>', $context['show_stats'] ? '<br />

but I got Template parse error

Replace:

<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />
               <
a href="', $scripturl, '?action=profile;u=', $context['user']['id'] , ';sa=showPosts">Show your posts.</a><br />';


With:

<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />
               <
a href="', $scripturl, '?action=profile;u=', $context['user']['id'] , ';sa=showPosts">Show your posts.</a><br /><a href="', $scripturl, '?action=recent">', $txt['234'], '</a><br />';


Cheers,

Ryan Jones
RyanJ (Ryan Jones)

Support Web Standards!

Currently working On: Additions to the Karma system.

spiros

Thanks Ryan!

By the way, an error in your site:
Quote
: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 8 in /home/ryanjone/public_html/Projects/UA_Strings/Project_UA_Include.php on line 62

Warning: Cannot modify header information - headers already sent by (output started at /home/ryanjone/public_html/Projects/UA_Strings/Project_UA_Include.php:62) in /home/ryanjone/public_html/header.php on line 51

RyanJones

Quote from: spiros on March 02, 2006, 05:18:36 AM
Thanks Ryan!

By the way, an error in your site:
Quote
: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 8 in /home/ryanjone/public_html/Projects/UA_Strings/Project_UA_Include.php on line 62

Warning: Cannot modify header information - headers already sent by (output started at /home/ryanjone/public_html/Projects/UA_Strings/Project_UA_Include.php:62) in /home/ryanjone/public_html/header.php on line 51

Yea I know, annoying bug in my includes system...working on it :)

Cheers,

Ryan Jones
RyanJ (Ryan Jones)

Support Web Standards!

Currently working On: Additions to the Karma system.

Dannii

If you want the link to show your own posts, you can change it to
echo '<a href="', $scripturl, '?action=profile;sa=showPosts">Show your posts.</a><br />';
The u=whatever isn't needed.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

RyanJones

Quote from: eldacar on March 02, 2006, 05:33:08 AM
If you want the link to show your own posts, you can change it to
echo '<a href="', $scripturl, '?action=profile;sa=showPosts">Show your posts.</a><br />';
The u=whatever isn't needed.

Ah, I used that because its in the profile, never knew if it was required - always best to be shure :)

Cheers,

Ryan Jones
RyanJ (Ryan Jones)

Support Web Standards!

Currently working On: Additions to the Karma system.

spiros

<a href="', $scripturl, '?action=recent">', $txt['234'], '</a><br />';

Is there a parameter one can add to make the recent posts appear with older posts first?

RyanJones

Quote from: spiros on March 02, 2006, 06:03:30 AM
<a href="', $scripturl, '?action=recent">', $txt['234'], '</a><br />';

Is there a parameter one can add to make the recent posts appear with older posts first?

I don't think there is unless you edit & addone yourself and edit the DB queries :(

Cheers,

Ryan Jones
RyanJ (Ryan Jones)

Support Web Standards!

Currently working On: Additions to the Karma system.

Advertisement: