The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Trying to do userprofile

+2
SLGray
Goppyrules
6 posters

Go down

Solved Trying to do userprofile

Post by Goppyrules May 25th 2017, 2:22 am

i been looking to add a userprofile which is similar to what you have here and i found the code which is used for
phpbb 3 but my site is phpbb 2. https://help.forumotion.com/t141657-new-log-in-navigation-bar
if anyone can help me do understand how to make the code to fix phpbb 2 site, that would be great!


Last edited by Goppyrules on May 26th 2017, 1:50 am; edited 1 time in total
avatar
Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

Post by SLGray May 25th 2017, 4:50 am

What happens when you add it to your forum?


Trying to do userprofile Slgray10

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

Male Posts : 51453
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Trying to do userprofile

Post by Goppyrules May 25th 2017, 5:19 am

avatar
Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

Post by SLGray May 25th 2017, 6:23 am

Do you have HTML activated for the whole forum and in your profile?


Trying to do userprofile Slgray10

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

Male Posts : 51453
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Trying to do userprofile

Post by Valoish May 25th 2017, 2:03 pm

The code in the screenshot is incomplete from what I can tell.. Not sure whether your forum altered the coding after you posted it up or whether you may have accidentally left out a few small bits of the code..
Could you post the code you're using in this topic in the code tags please
Valoish
Valoish
Forumember

Female Posts : 291
Reputation : 54
Language : English
Location : NYC

http://www.canvastutorials.org/

Back to top Go down

Solved Re: Trying to do userprofile

Post by Goppyrules May 25th 2017, 3:17 pm

Code:
style type="text/css">#userProfile { font-size:11px; position:relative; margin-top:30px; margin-bottom:10px; padding:3px; }#userProfile .leftCol { float:left; text-align:center; width:20%; } #userProfile .rightCol { float:left; width:25%; } #userName { background:#ECF3F7; color:#0076B1; font-weight:bold; font-family:"Trebuchet MS", Verdana, Arial, Sans-serif; border-radius:3px 3px 0 0; position:absolute; left:3px; top:-18px; padding:0 12px; line-height:18px; } #userName span { font-weight:normal } #userAvatar img { max-width:100px } #userAvatar { display:inline-block; overflow:hidden; min-height:100px; min-width:100px; } #userProfile .title { color:#0076B1; font-weight:bold; border-bottom:1px solid #0076B1; padding-bottom:3px; margin-bottom:3px; width:90%; } #userProfile .statLabel { display:inline-block; width:85px; font-weight:bold; text-align:right; margin-right:6px; } <script type="text/javascript">// <![CDATA[
(function(J, U, L) {
  var main = document.getElementById('main-content'),
      homepage = J('.introduction', main)[0],
      profil;
 
  if (U.session_logged_in) {
    profil = document.createElement('DIV');
    profil.id = 'userProfile';
    profil.className = 'panel introduction';
    profil.innerHTML = '<div id="userName"><span>Logged in as </span>' + U.username + '</div><div class="leftCol"><span id="userAvatar">' + U.avatar + '</span></div><div class="rightCol"><div class="title">General</div><div><span class="statLabel">Rank : </span>' + L.rank_title + '</div><div><span class="statLabel">' + L.Posts + ' : </span>' + U.user_posts + '</div><div><span class="statLabel">' + L.PMs + ' : </span>' + U.user_nb_privmsg + '</div><div><span class="statLabel">' + L.Reputation + ' : </span>' + U.point_reputation + '</div></div><div class="rightCol"><div class="title">Profile</div><div><a href="/u' + U.user_id + '">' + L.See_my_profile + '</a></div><div><a href="/profile?mode=editprofile">' + L.Edit_profile + '</a></div><div><a href="/privmsg?folder=inbox">' + L.All_PMs + '</a></div><div><a href="/profile?mode=editprofile&page_profil=notifications">' + L.Notif_see_all + '</a></div></div><div class="rightCol"><div class="title">Search</div><div><a href="/sta/' + U.username + '">' + L.All_Topics + '</a></div><div><a href="/spa/' + U.username + '">' + L.All_Messages + '</a></div><div><a href="/search?search_id=watchsearch">' + L.js_topics_followed + '</a></div><div><a href="/search?search_id=newposts">View new posts</a></div></div><div class="clear"></div>';
    main.insertBefore(profil, homepage);
  }
  // par ange tuteur
})(jQuery, _userdata, _lang);
//]]></script>

note that forum is phpbb 2. also i did enable the html for myself and whole forum and still same result
avatar
Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

Post by Ape May 25th 2017, 3:20 pm

You are missing the < at the start of the code

see

Code:
<style type="text/css">#userProfile { font-size:11px; position:relative; margin-top:30px; margin-bottom:10px; padding:3px; }#userProfile .leftCol { float:left; text-align:center; width:20%; }#userProfile .rightCol { float:left; width:25%; }#userName { background:#ECF3F7; color:#0076B1; font-weight:bold; font-family:"Trebuchet MS", Verdana, Arial, Sans-serif; border-radius:3px 3px 0 0; position:absolute; left:3px; top:-18px; padding:0 12px; line-height:18px; }#userName span { font-weight:normal }#userAvatar img { max-width:100px }#userAvatar { display:inline-block; overflow:hidden; min-height:100px; min-width:100px; }#userProfile .title { color:#0076B1; font-weight:bold; border-bottom:1px solid #0076B1; padding-bottom:3px; margin-bottom:3px; width:90%; }#userProfile .statLabel { display:inline-block; width:85px; font-weight:bold; text-align:right; margin-right:6px; }</style><script type="text/javascript">// <![CDATA[(function(J, U, L) {  var main = document.getElementById('main-content'),      homepage = J('.introduction', main)[0],      profil;      if (U.session_logged_in) {    profil = document.createElement('DIV');    profil.id = 'userProfile';    profil.className = 'panel introduction';    profil.innerHTML = '<div id="userName"><span>Logged in as </span>' + U.username + '</div><div class="leftCol"><span id="userAvatar">' + U.avatar + '</span></div><div
 class="rightCol"><div
class="title">General</div><div><span
class="statLabel">Rank : </span>' + L.rank_title + '</div><div><span class="statLabel">' + L.Posts + ' : </span>' + U.user_posts + '</div><div><span class="statLabel">' + L.PMs + ' : </span>' + U.user_nb_privmsg + '</div><div><span class="statLabel">' + L.Reputation + ' : </span>' + U.point_reputation + '</div></div><div class="rightCol"><div class="title">Profile</div><div><a href="/u' + U.user_id + '">' + L.See_my_profile + '</a></div><div><a href="/profile?mode=editprofile">' + L.Edit_profile + '</a></div><div><a href="/privmsg?folder=inbox">' + L.All_PMs + '</a></div><div><a href="/profile?mode=editprofile&page_profil=notifications">' + L.Notif_see_all + '</a></div></div><div
 class="rightCol"><div
class="title">Search</div><div><a href="/sta/' + U.username + '">' + L.All_Topics + '</a></div><div><a href="/spa/' + U.username + '">' + L.All_Messages + '</a></div><div><a href="/search?search_id=watchsearch">' + L.js_topics_followed + '</a></div><div><a
 href="/search?search_id=newposts">View new
posts</a></div></div><div
class="clear"></div>';    main.insertBefore(profil, homepage);  }  // par ange tuteur})(jQuery, _userdata, _lang);//]]></script>


Trying to do userprofile Left1212Trying to do userprofile Center11Trying to do userprofile Right112
Trying to do userprofile Ape_b110
Trying to do userprofile Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19075
Reputation : 1988
Language : fluent in dork / mumbojumbo & English haha

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

Back to top Go down

Solved Re: Trying to do userprofile

Post by Valoish May 25th 2017, 3:35 pm

Yeah the missing "<" was causing an issue, as well as the missing closing style tag which didn't allow the CSS to end and the JS to kick in. Ape's version seems good so give that a go ^^
Valoish
Valoish
Forumember

Female Posts : 291
Reputation : 54
Language : English
Location : NYC

http://www.canvastutorials.org/

Back to top Go down

Solved Re: Trying to do userprofile

Post by Goppyrules May 25th 2017, 6:43 pm

avatar
Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

Post by SLGray May 25th 2017, 7:04 pm

Do you have the code on your forum now? It would help us if you do.


Trying to do userprofile Slgray10

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

Male Posts : 51453
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Trying to do userprofile

Post by Goppyrules May 25th 2017, 7:05 pm

yes i do.
avatar
Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

Post by SLGray May 25th 2017, 7:06 pm

Are you adding the code to the homepage message or an announcement?


Trying to do userprofile Slgray10

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

Male Posts : 51453
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Trying to do userprofile

Post by Goppyrules May 25th 2017, 7:21 pm

homepage message
avatar
Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

Post by SLGray May 25th 2017, 7:25 pm

I do not see the homepage message.


Trying to do userprofile Slgray10

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

Male Posts : 51453
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Trying to do userprofile

Post by Goppyrules May 25th 2017, 7:29 pm

this is where i placed it.
https://i.imgur.com/Ikw7ldP.png
avatar
Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

Post by SLGray May 25th 2017, 7:32 pm

Could you send me a test account by PM?


Trying to do userprofile Slgray10

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

Male Posts : 51453
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Trying to do userprofile

Post by Van-Helsing May 26th 2017, 12:27 am

Hello @Goppyrules,
Please also check this topic it should be helps you. Wink
Van-Helsing
Van-Helsing
Hyperactive

Male Posts : 2431
Reputation : 116
Language : English, Greek

http://itexperts.forumgreek.com/

Back to top Go down

Solved Re: Trying to do userprofile

Post by Goppyrules May 26th 2017, 12:55 am

which part becasue it keeps leaching into another topic?
avatar
Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

Post by SLGray May 26th 2017, 1:10 am

What is leaking?


Trying to do userprofile Slgray10

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

Male Posts : 51453
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Trying to do userprofile

Post by Goppyrules May 26th 2017, 1:12 am

i mean like its not straight forward for me becasue every topic i look at, it moves into another topic.
avatar
Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

Post by SLGray May 26th 2017, 1:16 am

Are you using a mobile device to view the support forum?


Trying to do userprofile Slgray10

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

Male Posts : 51453
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Trying to do userprofile

Post by Goppyrules May 26th 2017, 1:37 am

no what i am saying is the link van-helsing posted isnt exactly clear on how to solve my problem.
avatar
Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

Post by Ange Tuteur May 26th 2017, 1:47 am

Hi @Goppyrules,

Try adding the following code to your homepage message.
Code:
<div id="homepage-profil"></div>
<style type="text/css">#userProfile { font-size:11px; position:relative; margin-top:30px; margin-bottom:10px; padding:3px; }
#userProfile .leftCol { float:left; text-align:center; width:20%; }
#userProfile .rightCol { float:left; width:25%; }
#userName { background:#ECF3F7; color:#0076B1; font-weight:bold; font-family:"Trebuchet MS", Verdana, Arial, Sans-serif; border-radius:3px 3px 0 0; position:absolute; left:3px; top:-18px; padding:0 12px; line-height:18px; }
#userName span { font-weight:normal }
#userAvatar img { max-width:100px }
#userAvatar { display:inline-block; overflow:hidden; min-height:100px; min-width:100px; }
#userProfile .title { color:#0076B1; font-weight:bold; border-bottom:1px solid #0076B1; padding-bottom:3px; margin-bottom:3px; width:90%; }
#userProfile .statLabel { display:inline-block; width:85px; font-weight:bold; text-align:right; margin-right:6px; }</style>
<script type="text/javascript">// <![CDATA[
(function(J, U, L) {
  var main = document.getElementById('homepage-profil'),
      profil;
 
  if (U.session_logged_in) {
    profil = document.createElement('DIV');
    profil.id = 'userProfile';
    profil.className = 'panel introduction';
    profil.innerHTML = '<div id="userName"><span>Logged in as </span>' + U.username + '</div><div class="leftCol"><span id="userAvatar">' + U.avatar + '</span></div><div class="rightCol"><div class="title">General</div><div><span class="statLabel">Rank : </span>' + L.rank_title + '</div><div><span class="statLabel">' + L.Posts + ' : </span>' + U.user_posts + '</div><div><span class="statLabel">' + L.PMs + ' : </span>' + U.user_nb_privmsg + '</div><div><span class="statLabel">' + L.Reputation + ' : </span>' + U.point_reputation + '</div></div><div class="rightCol"><div class="title">Profile</div><div><a href="/u' + U.user_id + '">' + L.See_my_profile + '</a></div><div><a href="/profile?mode=editprofile">' + L.Edit_profile + '</a></div><div><a href="/privmsg?folder=inbox">' + L.All_PMs + '</a></div><div><a href="/profile?mode=editprofile&page_profil=notifications">' + L.Notif_see_all + '</a></div></div><div class="rightCol"><div class="title">Search</div><div><a href="/sta/' + U.username + '">' + L.All_Topics + '</a></div><div><a href="/spa/' + U.username + '">' + L.All_Messages + '</a></div><div><a href="/search?search_id=watchsearch">' + L.js_topics_followed + '</a></div><div><a href="/search?search_id=newposts">View new posts</a></div></div><div class="clear"></div>';
    main.appendChild(profil);
  }
  // par ange tuteur
})(jQuery, _userdata, _lang);
//]]></script>
Make sure to remove or replace the existing code you've placed in there.

This variant of the code should work on any forum version, only downside is it will not display outside of the homepage message. Of course you can always place it in a template or anywhere else HTML (and scripting) formats.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Trying to do userprofile

Post by Goppyrules May 26th 2017, 1:50 am

Ange Tuteur wrote:Hi @Goppyrules,

Try adding the following code to your homepage message.
Code:
<div id="homepage-profil"></div>
<style type="text/css">#userProfile { font-size:11px; position:relative; margin-top:30px; margin-bottom:10px; padding:3px; }
#userProfile .leftCol { float:left; text-align:center; width:20%; }
#userProfile .rightCol { float:left; width:25%; }
#userName { background:#ECF3F7; color:#0076B1; font-weight:bold; font-family:"Trebuchet MS", Verdana, Arial, Sans-serif; border-radius:3px 3px 0 0; position:absolute; left:3px; top:-18px; padding:0 12px; line-height:18px; }
#userName span { font-weight:normal }
#userAvatar img { max-width:100px }
#userAvatar { display:inline-block; overflow:hidden; min-height:100px; min-width:100px; }
#userProfile .title { color:#0076B1; font-weight:bold; border-bottom:1px solid #0076B1; padding-bottom:3px; margin-bottom:3px; width:90%; }
#userProfile .statLabel { display:inline-block; width:85px; font-weight:bold; text-align:right; margin-right:6px; }</style>
<script type="text/javascript">// <![CDATA[
(function(J, U, L) {
  var main = document.getElementById('homepage-profil'),
      profil;
 
  if (U.session_logged_in) {
    profil = document.createElement('DIV');
    profil.id = 'userProfile';
    profil.className = 'panel introduction';
    profil.innerHTML = '<div id="userName"><span>Logged in as </span>' + U.username + '</div><div class="leftCol"><span id="userAvatar">' + U.avatar + '</span></div><div class="rightCol"><div class="title">General</div><div><span class="statLabel">Rank : </span>' + L.rank_title + '</div><div><span class="statLabel">' + L.Posts + ' : </span>' + U.user_posts + '</div><div><span class="statLabel">' + L.PMs + ' : </span>' + U.user_nb_privmsg + '</div><div><span class="statLabel">' + L.Reputation + ' : </span>' + U.point_reputation + '</div></div><div class="rightCol"><div class="title">Profile</div><div><a href="/u' + U.user_id + '">' + L.See_my_profile + '</a></div><div><a href="/profile?mode=editprofile">' + L.Edit_profile + '</a></div><div><a href="/privmsg?folder=inbox">' + L.All_PMs + '</a></div><div><a href="/profile?mode=editprofile&page_profil=notifications">' + L.Notif_see_all + '</a></div></div><div class="rightCol"><div class="title">Search</div><div><a href="/sta/' + U.username + '">' + L.All_Topics + '</a></div><div><a href="/spa/' + U.username + '">' + L.All_Messages + '</a></div><div><a href="/search?search_id=watchsearch">' + L.js_topics_followed + '</a></div><div><a href="/search?search_id=newposts">View new posts</a></div></div><div class="clear"></div>';
    main.appendChild(profil);
  }
  // par ange tuteur
})(jQuery, _userdata, _lang);
//]]></script>
Make sure to remove or replace the existing code you've placed in there.

This variant of the code should work on any forum version, only downside is it will not display outside of the homepage message. Of course you can always place it in a template or anywhere else HTML (and scripting) formats.

Works great! You are a saint man! topic solved!
avatar
Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

Post by SLGray May 26th 2017, 4:34 am

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


Trying to do userprofile Slgray10

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

Male Posts : 51453
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

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