The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Trying to do userprofile

View previous topic View next topic Go down

Solved Trying to do userprofile

Post by Goppyrules on 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. http://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

Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

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

What happens when you add it to your forum?


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

avatar
SLGray
Administrator
Administrator

Male Posts : 40899
Reputation : 2777
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Trying to do userprofile

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


Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

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

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


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

avatar
SLGray
Administrator
Administrator

Male Posts : 40899
Reputation : 2777
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Trying to do userprofile

Post by Valoish on 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
avatar
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 on 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

Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

Post by APE on 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>



avatar
APE
Manager
Manager

Male Posts : 11061
Reputation : 1036
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

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

Back to top Go down

Solved Re: Trying to do userprofile

Post by Valoish on 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 ^^
avatar
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 on May 25th 2017, 6:43 pm


Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

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

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


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

avatar
SLGray
Administrator
Administrator

Male Posts : 40899
Reputation : 2777
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Trying to do userprofile

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

yes i do.

Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

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

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


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

avatar
SLGray
Administrator
Administrator

Male Posts : 40899
Reputation : 2777
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Trying to do userprofile

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

homepage message

Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

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

I do not see the homepage message.


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

avatar
SLGray
Administrator
Administrator

Male Posts : 40899
Reputation : 2777
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Trying to do userprofile

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

this is where i placed it.
http://i.imgur.com/Ikw7ldP.png

Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

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

Could you send me a test account by PM?


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

avatar
SLGray
Administrator
Administrator

Male Posts : 40899
Reputation : 2777
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Trying to do userprofile

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

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

Male Posts : 2366
Reputation : 102
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Solved Re: Trying to do userprofile

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

which part becasue it keeps leaching into another topic?

Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

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

What is leaking?


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

avatar
SLGray
Administrator
Administrator

Male Posts : 40899
Reputation : 2777
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Trying to do userprofile

Post by Goppyrules on 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.

Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

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

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


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

avatar
SLGray
Administrator
Administrator

Male Posts : 40899
Reputation : 2777
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Trying to do userprofile

Post by Goppyrules on 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.

Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

Post by Ange Tuteur on 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.
avatar
Ange Tuteur
Forumaster

Male Posts : 13176
Reputation : 2881
Language : EN10, FR5
Location : Macungie, PA

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Trying to do userprofile

Post by Goppyrules on 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!

Goppyrules
Forumember

Posts : 125
Reputation : 2
Language : english

Back to top Go down

Solved Re: Trying to do userprofile

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

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


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

avatar
SLGray
Administrator
Administrator

Male Posts : 40899
Reputation : 2777
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


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