Link for 'Your Posts' when logged in (Features)

by Magma, Monday, January 18, 2016, 12:29 (2992 days ago)

It would be nice to have a link (Your Posts) at the top right of the page near your username (when logged in) which takes you to the page with all your postings, especially when you want to catch up on all your posts.

?mode=user&action=show_posts&id=

At the moment you need to click on 'users' then search for your name then click on your username then click 'show postings'

Can anyone advise how to do this?

Avatar

Link for 'Your Posts' when logged in

by Auge ⌂, Wednesday, January 20, 2016, 19:31 (2990 days ago) @ Magma

Hello

It would be nice to have a link (Your Posts) at the top right of the page near your username (when logged in) which takes you to the page with all your postings, especially when you want to catch up on all your posts.

Sounds like a good idea.

At the moment you need to click on 'users' then search for your name then click on your username then click 'show postings'

I see your point. That's not comfortable.

Can anyone advise how to do this?

Ok, the page itself exists. There are two tasks.

- Generating the link ?mode=user&action=show_posts&id=0000.
- Check for equality of the above id and the id of the current user to avoid access to the postings for unauthorised visitors.

… please stay tuned …

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Link for 'Your Posts' when logged in

by Magma, Wednesday, January 20, 2016, 22:59 (2990 days ago) @ Auge

Ok, the page itself exists. There are two tasks.

- Generating the link ?mode=user&action=show_posts&id=0000.
- Check for equality of the above id and the id of the current user to avoid access to the postings for unauthorised visitors.

… please stay tuned …

Tschö, Auge


I'm a novice so not sure what all that means but I'll stay tuned anyway :-) it would be convenient feature.

Link for 'Your Posts' when logged in

by Magma, Saturday, July 02, 2016, 19:23 (2826 days ago) @ Auge

I'm no good with code can anybody help with this :lookaround:

Avatar

Link for 'Your Posts' when logged in

by Auge ⌂, Sunday, July 03, 2016, 11:43 (2825 days ago) @ Magma

Hello

I'm no good with code can anybody help with this :lookaround:

Oh! Sorry, I forgot your request. I will offer a solution within circa 14 days (I'm at travel).

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Avatar

Link for 'Your Posts' when logged in

by Auge ⌂, Monday, July 04, 2016, 10:07 (2825 days ago) @ Magma

Hello

I'm no good with code can anybody help with this :lookaround:

I made a pull request on Github for the new link. Now it's Alex's decision to examine and include the code in the master branch of mlf2 and to deliver it with a new version.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Link for 'Your Posts' when logged in

by Magma, Monday, July 04, 2016, 16:14 (2824 days ago) @ Auge

So I just have to place this code

+show_postings_link =              show postings

in english.lang

and this code

-{if $user}<li><a href="index.php?mode=user&amp;action=edit_profile" title="{#profile_link_title#}"><strong>{$user}</strong></a></li><li><a href="index.php?mode=user" title="{#user_area_link_title#}">{#user_area_link#}</a></li>{if $admin}<li><a href="index.php?mode=admin" title="{#admin_area_link_title#}">{#admin_area_link#}</a></li>{/if}<li><a href="index.php?mode=login" title="{#log_out_link_title#}">{#log_out_link#}</a></li>{else}<li><a href="index.php?mode=login" title="{#log_in_link_title#}">{#log_in_link#}</a></li>{if $settings.register_mode!=2}<li><a href="index.php?mode=register" title="{#register_link_title#}">{#register_link#}</a></li>{/if}{if $settings.user_area_public}<li><a href="index.php?mode=user" title="{#user_area_link_title#}">{#user_area_link#}</a></li>{/if}{/if}
+{if $user}<li><a href="index.php?mode=user&amp;action=edit_profile" title="{#profile_link_title#}"><strong>{$user}</strong></a></li><li><a href="index.php?mode=user&amp;action=show_posts&amp;id={$user_id}">{#show_postings_link#}</a></li><li><a href="index.php?mode=user" title="{#user_area_link_title#}">{#user_area_link#}</a></li>{if $admin}<li><a href="index.php?mode=admin" title="{#admin_area_link_title#}">{#admin_area_link#}</a></li>{/if}<li><a href="index.php?mode=login" title="{#log_out_link_title#}">{#log_out_link#}</a></li>{else}<li><a href="index.php?mode=login" title="{#log_in_link_title#}">{#log_in_link#}</a></li>{if $settings.register_mode!=2}<li><a href="index.php?mode=register" title="{#register_link_title#}">{#register_link#}</a></li>{/if}{if $settings.user_area_public}<li><a href="index.php?mode=user" title="{#user_area_link_title#}">{#user_area_link#}</a></li>{/if}{/if}

in main.tpl

Avatar

Link for 'Your Posts' when logged in

by Auge ⌂, Monday, July 04, 2016, 17:31 (2824 days ago) @ Magma

Hello

So I just have to place this code

in english.lang and this code

in main.tpl

Yes, naturally without the leading "-" and "+".

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Avatar

No, wait a moment! Problem solved

by Auge ⌂, Monday, July 04, 2016, 17:51 (2824 days ago) @ Magma
edited by Auge, Monday, July 04, 2016, 18:23

Hello

So I just have to place this code

+show_postings_link =              show postings

in english.lang

Attention: There is a bug, that has to be solved.

The bug is fixed. Pay attention to the changed name (show_postings_link vs. show_all_postings_link) and adapted key names in the language files.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Problem solved, Thanks.

by Magma, Monday, July 04, 2016, 23:06 (2824 days ago) @ Auge

Did what you said and it seems to work great. I did swap the text "show postings" for "My Posts" but thanks so much, really appreciate it.

Avatar

Problem solved, Thanks.

by Auge ⌂, Tuesday, July 05, 2016, 07:22 (2824 days ago) @ Magma

Hello

Did what you said and it seems to work great.

Nice. I hope it hits Alex's master branch. :-)

I did swap the text "show postings" for "My Posts" …

That sounds reasonable. To do this for all available languages (11 at the moment) is a task for the translators. I could do this only for german, english and perhaps for russian languages.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Link for 'Your Posts' when logged in

by RaHa, Monday, November 28, 2016, 15:13 (2677 days ago) @ Magma

Cool :-) :-) :-) :-) :-)

RSS Feed of thread