Show profile on the navigation bar

Go down

Show profile on the navigation bar Empty Show profile on the navigation bar

Post by RafaelS on July 23rd 2018, 10:21 pm

Enable by means of this script the addition of a button with the user's name and avatar to the navigation bar, which will redirect to the user's profile.

Author: RafaelS.
Working forum versions: All versions, except AwesomeBB

Application Result

The application will look as follows after being applied to the forum:

Show profile on the navigation bar LJqSE6k

Installation

The installation is unique, and can only be done by creating a new javascript. CSS can be modified, and is embedded in Javascript. Please follow the steps below to install the effect on your community.

Control Panel >> Modules >> HTML and Javascript >> Management of Javascript codes >> Create a new javascript

Placement: On all pages

Code:
/****
 * Application: Link and avatar in the navbar
 * Description: This application can show the link to the user's profile and avatar in the navbar.
 * Version: 1.0
 * Made and Optimizations by RafaelS. - 2018/07/06
 * View more in: https://ajuda.forumeiros.com
 * Copyright (c) 2018 RafaelS.<rafael_s at outlook dot pt>
 * This work is free. You can redistribute it and/or modify it
 * under the terms of the WTFPL, Version 2
 **/
 
$(function() {
if(_userdata.session_logged_in > 0) {
 
  var username = _userdata.username, userid = _userdata.user_id,navb,linkav = _userdata.avatar,prependcode = '<li><a class="mainmenu rafavatar" href="/u'+userid+'"><span id="img">'+linkav+'</span>'+username+'</a></li>';
  
if($('body#modernbb').length > 0) navb = '.navbar.navlinks'; // ModernBB version
else if($('td.bodyline').length > 0){navb = '.bodyline table:eq(1) tr td';prependcode = '<a class="mainmenu rafavatar" href="/u'+userid+'"><span id="img">'+linkav+'</span>'+username+'</a> &nbsp;';} // phpBB2 version
else if($('body#phpbb').length > 0){ navb = '.navbar .linklist.navlinks';prependcode = '<li><a class="mainmenu rafavatar" href="/u'+userid+'"><span id="img">'+linkav+'</span>'+username+'</a> &nbsp;</li>';} // phpBB3 version
else if($('.pun #pun-intro').length > 0)navb = '#pun-navlinks ul.clearfix';// punBB version
else if($('#ipbwrapper').length > 0){ navb = '#submenu ul li'; prependcode= '<a class="mainmenu rafavatar" href="/u'+userid+'"><span id="img">'+linkav+'</span>'+username+'</a>';} // Invision version
else return; // no valid version
  
$('head').append(
    '<style type="text/css">' +
    '.mainmenu.rafavatar img {' +
    'display: inline-block !important;'+
    'width:30px;' +
    'height: 30px;' +
    'vertical-align: middle;' +
    'border-radius: 16px;'    +
    'margin-right: 7px;'    +
    'box-shadow: 0 2px 2px rgba(0,0,0,0.1);' +
   'filter: none;' +
    '}' +
    '</style>'
  );
  
$(navb).prepend(prependcode);
}else{return;}});
RafaelS
RafaelS
New Member

Posts : 14
Reputation : 6
Language : Portuguese, English and French

http://ajuda.forumeiros.com/forum

Back to top Go down

Show profile on the navigation bar Empty Re: Show profile on the navigation bar

Post by TonnyKamper on July 24th 2018, 6:38 pm

@RafaelS wrote:Enable by means of this script the addition of a button with the user's name and avatar to the navigation bar, which will redirect to the user's profile.

Author: RafaelS.
Working forum versions: All versions, except AwesomeBB

Application Result

The application will look as follows after being applied to the forum:

Show profile on the navigation bar LJqSE6k

Installation

The installation is unique, and can only be done by creating a new javascript. CSS can be modified, and is embedded in Javascript. Please follow the steps below to install the effect on your community.

Control Panel >> Modules >> HTML and Javascript >> Management of Javascript codes >> Create a new javascript

Placement: On all pages

Code:
/****
 * Application: Link and avatar in the navbar
 * Description: This application can show the link to the user's profile and avatar in the navbar.
 * Version: 1.0
 * Made and Optimizations by RafaelS. - 2018/07/06
 * View more in: https://ajuda.forumeiros.com
 * Copyright (c) 2018 RafaelS.<rafael_s at outlook dot pt>
 * This work is free. You can redistribute it and/or modify it
 * under the terms of the WTFPL, Version 2
 **/
 
$(function() {
if(_userdata.session_logged_in > 0) {
 
  var username = _userdata.username, userid = _userdata.user_id,navb,linkav = _userdata.avatar,prependcode = '<li><a class="mainmenu rafavatar" href="/u'+userid+'"><span id="img">'+linkav+'</span>'+username+'</a></li>';
  
if($('body#modernbb').length > 0) navb = '.navbar.navlinks'; // ModernBB version
else if($('td.bodyline').length > 0){navb = '.bodyline table:eq(1) tr td';prependcode = '<a class="mainmenu rafavatar" href="/u'+userid+'"><span id="img">'+linkav+'</span>'+username+'</a> &nbsp;';} // phpBB2 version
else if($('body#phpbb').length > 0){ navb = '.navbar .linklist.navlinks';prependcode = '<li><a class="mainmenu rafavatar" href="/u'+userid+'"><span id="img">'+linkav+'</span>'+username+'</a> &nbsp;</li>';} // phpBB3 version
else if($('.pun #pun-intro').length > 0)navb = '#pun-navlinks ul.clearfix';// punBB version
else if($('#ipbwrapper').length > 0){ navb = '#submenu ul li'; prependcode= '<a class="mainmenu rafavatar" href="/u'+userid+'"><span id="img">'+linkav+'</span>'+username+'</a>';} // Invision version
else return; // no valid version
  
$('head').append(
    '<style type="text/css">' +
    '.mainmenu.rafavatar img {' +
    'display: inline-block !important;'+
    'width:30px;' +
    'height: 30px;' +
    'vertical-align: middle;' +
    'border-radius: 16px;'    +
    'margin-right: 7px;'    +
    'box-shadow: 0 2px 2px rgba(0,0,0,0.1);' +
   'filter: none;' +
    '}' +
    '</style>'
  );
  
$(navb).prepend(prependcode);
}else{return;}});

Wow this works flawless on my Invision forum @RafaelS awesome job Yes

Show profile on the navigation bar Avatar10

Am I allowed to translate this and share it on the Dutch support forum? Giving you de credits offcourse Smile

Have a nice day bye
TonnyKamper
TonnyKamper
Forumember

Female Posts : 481
Reputation : 43
Language : Dutch/English
Location : The Netherlands

http://www.nederlandheelt.nl/forum

Back to top Go down

Show profile on the navigation bar Empty Re: Show profile on the navigation bar

Post by RafaelS on July 24th 2018, 11:37 pm

I’m glad you enjoyed it and of course you are allowed @TonnyKamper, I see no problem there. Very Happy
RafaelS
RafaelS
New Member

Posts : 14
Reputation : 6
Language : Portuguese, English and French

http://ajuda.forumeiros.com/forum

Back to top Go down

Show profile on the navigation bar Empty Re: Show profile on the navigation bar

Post by TonnyKamper on July 25th 2018, 5:31 pm

@RafaelS wrote:I’m glad you enjoyed it and of course you are allowed @TonnyKamper, I see no problem there. Very Happy

Thank you very much @RafaelS cheers it's done and you can check your credits here at the bottom: Avatar met profiellink op navbar

Props to you Very good ~1~ salut
TonnyKamper
TonnyKamper
Forumember

Female Posts : 481
Reputation : 43
Language : Dutch/English
Location : The Netherlands

http://www.nederlandheelt.nl/forum

Back to top Go down

Show profile on the navigation bar Empty Re: Show profile on the navigation bar

Post by YoshiGM on August 26th 2018, 12:59 am

Wow! This is very cool! You can avoid some clicks to check your profile.
Thanks.

If you don't have any problem, i will translate your code to Spanish and of course give you the respective credits Wink

EDIT: Don't worked silent
YoshiGM
YoshiGM
Forumember

Male Posts : 814
Reputation : 113
Language : Spanish & English
Location : Mexico

http://asistencia.foroactivo.com/u21373

Back to top Go down

Show profile on the navigation bar Empty Re: Show profile on the navigation bar

Post by Moulds965 on March 25th 2019, 12:21 pm

The only thing I need now is a way for the providers (those who can post to the main blog) a way to create/edit posts. Other than adding a meta widget to the sidebar myprepaidcenter, is there a better way I can provide authors, contributors, etc.


Last edited by Moulds965 on March 26th 2019, 12:11 pm; edited 1 time in total
Moulds965
Moulds965
New Member

Posts : 1
Reputation : 1
Language : English

https://help.forumotion.com

Back to top Go down

Show profile on the navigation bar Empty Re: Show profile on the navigation bar

Post by skouliki on March 25th 2019, 12:24 pm

@Moulds965 wrote:The only thing I need now is a way for the providers (those who can post to the main blog) a way to create/edit posts. Other than adding a meta widget to the sidebar, is there a better way I can provide authors, contributors, etc.

please open a new thread with your issue giving all details and your forum url
skouliki
skouliki
Manager
Manager

Female Posts : 6365
Reputation : 970
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Show profile on the navigation bar Empty Re: Show profile on the navigation bar

Post by EdwinWeatherford on June 21st 2019, 11:51 am

Oh, it's already solved! I was trying to do it about a week. Thanks, bro.

Show profile on the navigation bar 110
EdwinWeatherford
EdwinWeatherford
New Member

Posts : 2
Reputation : 1
Language : English

https://forumexiet.com

Back to top Go down

Show profile on the navigation bar Empty Re: Show profile on the navigation bar

Post by TonnyKamper on June 21st 2019, 1:11 pm

@TonnyKamper wrote:Thank you very much @RafaelS cheers it's done and you can check your credits here at the bottom: Avatar met profiellink op navbar

Props to you Very good  ~1~  salut


@RafaelS is there any chance we can position it right before the profile button instead of at the very beginning of the navbar?


Last edited by TonnyKamper on June 21st 2019, 1:18 pm; edited 1 time in total
TonnyKamper
TonnyKamper
Forumember

Female Posts : 481
Reputation : 43
Language : Dutch/English
Location : The Netherlands

http://www.nederlandheelt.nl/forum

Back to top Go down

Show profile on the navigation bar Empty Re: Show profile on the navigation bar

Post by skouliki on June 21st 2019, 1:14 pm

hi

do you have a test account ..send it to me
skouliki
skouliki
Manager
Manager

Female Posts : 6365
Reputation : 970
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Show profile on the navigation bar Empty Re: Show profile on the navigation bar

Post by TonnyKamper on June 21st 2019, 1:21 pm

Hi @skouliki I'm a bit confused, was your question for a test account addressed to me?  Confused
TonnyKamper
TonnyKamper
Forumember

Female Posts : 481
Reputation : 43
Language : Dutch/English
Location : The Netherlands

http://www.nederlandheelt.nl/forum

Back to top Go down

Show profile on the navigation bar Empty Re: Show profile on the navigation bar

Post by skouliki on June 21st 2019, 1:26 pm

@TonnyKamper wrote:Hi @skouliki I'm a bit confused, was your question for a test account addressed to me?  Confused
yes sorry i didnt use the quote option ..i think you can succeed what you asked with some margin modification
skouliki
skouliki
Manager
Manager

Female Posts : 6365
Reputation : 970
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Show profile on the navigation bar Empty Re: Show profile on the navigation bar

Post by TonnyKamper on June 21st 2019, 1:43 pm

@skouliki PM is sent  Smile  thank you!
TonnyKamper
TonnyKamper
Forumember

Female Posts : 481
Reputation : 43
Language : Dutch/English
Location : The Netherlands

http://www.nederlandheelt.nl/forum

Back to top Go down

Show profile on the navigation bar Empty Re: Show profile on the navigation bar

Post by skouliki on June 21st 2019, 2:00 pm

@TonnyKamper wrote:@skouliki PM is sent  Smile  thank you!
thanks the position is not changing so you must modify the code i guess
skouliki
skouliki
Manager
Manager

Female Posts : 6365
Reputation : 970
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Show profile on the navigation bar Empty Re: Show profile on the navigation bar

Post by TonnyKamper on June 21st 2019, 2:05 pm

Okay, so my question to RafaelS still stands, thank you for your assistance @skouliki Flowers
TonnyKamper
TonnyKamper
Forumember

Female Posts : 481
Reputation : 43
Language : Dutch/English
Location : The Netherlands

http://www.nederlandheelt.nl/forum

Back to top Go down

Show profile on the navigation bar Empty Re: Show profile on the navigation bar

Post by Harvey14 on June 24th 2019, 11:38 am

I’m using ProfileGrid user managing plugin, and since it’s a brand new plugin, the technical documentation is very poor. Any help would be appreciated tutuapp. Thank you!


Last edited by Harvey14 on June 25th 2019, 11:21 am; edited 1 time in total
Harvey14
Harvey14
New Member

Posts : 1
Reputation : 1
Language : English

https://help.forumotion.com

Back to top Go down

Show profile on the navigation bar Empty Re: Show profile on the navigation bar

Post by skouliki on June 24th 2019, 11:57 am

@Harvey14 wrote:I’m using ProfileGrid user managing plugin, and since it’s a brand new plugin, the technical documentation is very poor. Any help would be appreciated. Thank you!

your issue is not related to forumotion therefore we can not give any help
please note that spamming is not tolerated

skouliki
skouliki
Manager
Manager

Female Posts : 6365
Reputation : 970
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Back to top


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