Adding a "real" profile link to the navigation

Go down

Solved Adding a "real" profile link to the navigation

Post by BloodDrunk on April 20th 2017, 10:45 pm

Technical Details


Forum version : #phpBB3
Position : Founder
Concerned browser(s) : Google Chrome
Who the problem concerns : All members
Forum link : http://www.nfssecrets.tk/

Description of problem

I want to add a link to the navigation that will lead to a member's real profile page (not the default profile link, that is, infact, a user's control panel). What link (or token or something) should I use?


Last edited by BloodDrunk on April 27th 2017, 7:47 pm; edited 1 time in total
avatar
BloodDrunk
Forumember

Posts : 127
Reputation : 4
Language : English

http://www.nfssecrets.tk/

Back to top Go down

Solved Re: Adding a "real" profile link to the navigation

Post by SLGray on April 20th 2017, 10:54 pm

Link in navbar is for editing your profile.

To view your profile, you have to click your username, the profile button in topics, or click the view profile link (drop-down menu) in the toolbar if you have it activated.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 43656
Reputation : 3103
Language : English
Location : United States

http://fmthemesdesignteam.forumotion.com/

Back to top Go down

Solved Re: Adding a "real" profile link to the navigation

Post by BloodDrunk on April 21st 2017, 4:23 pm

And all of that is known to me. That's why I specifically asked if I can get the local user's link to profile, because it's not really good for a person to seek its post just so he/she can access his/her own profile.

I don't have toolbar activated, as it does not fit in with the site good.

No way to access the profile link?
avatar
BloodDrunk
Forumember

Posts : 127
Reputation : 4
Language : English

http://www.nfssecrets.tk/

Back to top Go down

Solved Re: Adding a "real" profile link to the navigation

Post by Luiz~ on April 27th 2017, 12:48 am

Hello,

Just create a JS with placement in all pages, and the code:
Code:
(function ($) {
  'use strict';

  var profileUrl = '/u' + _userdata["user_id"] + '-';

  $(function () {
    $('a[href*="/profile?mode=editprofile"]')
      .attr('href', profileUrl)
    ;
  });
}(jQuery));

o/
avatar
Luiz~
New Member

Male Posts : 17
Reputation : 8
Language : PT
Location : Brazil

http://ajuda.forumeiros.com/

Back to top Go down

Solved Re: Adding a "real" profile link to the navigation

Post by BloodDrunk on April 27th 2017, 3:33 pm

@Luiz~ wrote:Hello,

Just create a JS with placement in all pages, and the code:
Code:
(function ($) {
  'use strict';

  var profileUrl = '/u' + _userdata["user_id"] + '-';

  $(function () {
    $('a[href*="/profile?mode=editprofile"]')
      .attr('href', profileUrl)
    ;
  });
}(jQuery));

o/

Hey, this doesn't seem to do anything. What could be the problem?

EDIT: Nevermind, I got it fixed and it's working now. Thank you Smile
avatar
BloodDrunk
Forumember

Posts : 127
Reputation : 4
Language : English

http://www.nfssecrets.tk/

Back to top Go down

Solved Re: Adding a "real" profile link to the navigation

Post by APE on April 28th 2017, 12:11 am

Problem solved & topic archived.
Please read our forum rules: ESF General Rules



avatar
APE
Administrator
Administrator

Male Posts : 12451
Reputation : 1303
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum