News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Simple Link

Started by alphacaveman2, December 17, 2014, 02:15:05 PM

Previous topic - Next topic

alphacaveman2

I'd like to add a link to the main menu area that says, "Your Posts" and goes to a page that shows all of their posts. I'm aware that this exists inside their profile, but I'd like it to be easier than that. When I try to use that link, it's custom to each user so I can't just copy and paste the link it produces.

Any help would be appreciated. Thanks.

Kindred

#1
follow the FAQ on how to add a button... for the URL,

$scripturl . '?action=profile;area=showposts'   

should work, even without the userID

or

$scripturl . '?action=profile;area=showposts;u=' . $context['user']['id']

if you think that it must include the userID

Сл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."

Arantor

Sure you don't mean $scripturl . '?action=profile;area=showposts;u=' . $context['user']['id']

alphacaveman2

Thanks, but is there a way to have simply an html link. Maybe I'm not saying that right, but I don't want to add a button. I just want a text link that says, "Your Posts."

Using this code doesn't work:

<a href="$scripturl . ?action=profile;area=showposts">Your Posts</a>

Forgive my ignorance.

Arantor

No, it won't. Where *exactly* do you want this text link?

alphacaveman2

I use an ad mod and have a few links above the ad that's front and center on the main page.

alphacaveman2

I'd love to have it as a button, but I don't know where the FAQ is for that and when I tried last time I remember it being difficult for me. I've like to try again.

Arantor

If you're using an ad mod, you can use a bare link easily enough if it is not shown to guests (since guests don't have a profile), you would just put the website address in yourself - <a href="http://example.com/index.php?action=profile;area=showposts">Show Posts</a>

http://custom.simplemachines.org/mods/index.php?mod=3809 might also work for you.

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."

Advertisement: