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.

Profile modifications

View previous topic View next topic Go down

Solved Profile modifications

Post by skouliki on August 9th 2016, 6:26 pm

hello

i need to change some things in members profile

1. to minimize the space in the title post ---------->edit : fixed it myself
2. to add a border to the profile
3. add offline icon ----------> edit : fixed it myself
4. finally the member name need to be centered

http://iconskouliki.forumgreek.com/ punbb



thanks a lot

skouliki
Graphic Designer
Graphic Designer

Female Posts : 1609
Reputation : 253
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Profile modifications

Post by Ace 1 on August 10th 2016, 12:20 pm

@skouliki Javascript codes >> New Javascript

Placement: In the topics
Code:
for (var i = 0, x = document.getElementsByClassName('username'); i < x.length; i++) {
  var s = window.getComputedStyle(x[i]), w = s.getPropertyValue('width'), k;
  k = ((176 - w.replace('px','')) / 2) + 'px';
  x[i].style.left = k;
}

In your CSS Stylesheet:
Code:
.pun .posthead { border: 1px solid red; }

Let me know if this is the border you were talking about.


Last edited by Ace 1 on August 10th 2016, 2:12 pm; edited 1 time in total

Ace 1
Helper
Helper

Male Posts : 767
Reputation : 51
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Solved Re: Profile modifications

Post by skouliki on August 10th 2016, 1:57 pm

yes thanks just like that but not in the topic header .. in the profile where Admin is


skouliki
Graphic Designer
Graphic Designer

Female Posts : 1609
Reputation : 253
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Profile modifications

Post by Ace 1 on August 10th 2016, 2:19 pm

Sorry @skouliki for two reasons.

One, I made a typo in my code above. It's been fixed and should work now.

Two, this border you want can't be done unless you style each poster based on their name length. Basically, you can't do it.

Edit: However, you can make a bottom border artificially using this CSS:

Code:
.pun .user-ident .user-basic-info { border: 3px solid; padding-top: 5px; }


Last edited by Ace 1 on August 10th 2016, 2:25 pm; edited 2 times in total

Ace 1
Helper
Helper

Male Posts : 767
Reputation : 51
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Solved Re: Profile modifications

Post by skouliki on August 10th 2016, 2:23 pm

iam ok with that ...no problem

can the word Admin be centered ? dont know why all text is centered but not admin name

skouliki
Graphic Designer
Graphic Designer

Female Posts : 1609
Reputation : 253
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Profile modifications

Post by Ace 1 on August 10th 2016, 2:26 pm

@Ace 1 wrote:Sorry @skouliki for two reasons.

One, I made a typo in my code above. It's been fixed and should work now.

Two, this border you want can't be done unless you style each poster based on their name length. Basically, you can't do it.

I was talking about this code:

Code:
for (var i = 0, x = document.getElementsByClassName('username'); i < x.length; i++) {
  var s = window.getComputedStyle(x[i]), w = s.getPropertyValue('width'), k;
  k = ((176 - w.replace('px','')) / 2) + 'px';
  x[i].style.left = k;
}

Ace 1
Helper
Helper

Male Posts : 767
Reputation : 51
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Solved Re: Profile modifications

Post by skouliki on August 10th 2016, 2:33 pm

yes seems much better with this border thanks


skouliki
Graphic Designer
Graphic Designer

Female Posts : 1609
Reputation : 253
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Profile modifications

Post by Ace 1 on August 10th 2016, 2:37 pm

Wait @skouliki did you go to ACP >> Modules >> HTML & JS > JS codes management >> Create new js

Placement: In the topics
Code:
for (var i = 0, x = document.getElementsByClassName('username'); i < x.length; i++) {
  var s = window.getComputedStyle(x[i]), w = s.getPropertyValue('width'), k;
  k = ((176 - w.replace('px','')) / 2) + 'px';
  x[i].style.left = k;
}

Ace 1
Helper
Helper

Male Posts : 767
Reputation : 51
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Solved Re: Profile modifications

Post by skouliki on August 10th 2016, 2:41 pm

yes but same result ......by the way i notice that on mozilla is like this

not circulous at the bottom like chrome (see above picture)

skouliki
Graphic Designer
Graphic Designer

Female Posts : 1609
Reputation : 253
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Profile modifications

Post by Ace 1 on August 10th 2016, 2:43 pm

@skouliki I'm so sorry. I always make this mistake. I should've learned by now. Replace the code with this:

Code:
$(function()
 for (var i = 0, x = document.getElementsByClassName('username'); i < x.length; i++){
  var s = window.getComputedStyle(x[i]), w = s.getPropertyValue('width'), k;
  k = ((176 - w.replace('px','')) / 2) + 'px';
  x[i].style.left = k;
 }
});

Ace 1
Helper
Helper

Male Posts : 767
Reputation : 51
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Solved Re: Profile modifications

Post by skouliki on August 10th 2016, 2:47 pm

you help a lot ...always
what this code suppose to do cause i dont see any changes ..same result both broswers

skouliki
Graphic Designer
Graphic Designer

Female Posts : 1609
Reputation : 253
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Profile modifications

Post by Ace 1 on August 10th 2016, 2:49 pm

Well I tested it on your site using Chrome, and it did center all names. I'll try it out on Edge.

Ace 1
Helper
Helper

Male Posts : 767
Reputation : 51
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Solved Re: Profile modifications

Post by skouliki on August 10th 2016, 2:53 pm

the names were already centered the ADmin wasnt and still i can see in on the left


skouliki
Graphic Designer
Graphic Designer

Female Posts : 1609
Reputation : 253
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Profile modifications

Post by Ace 1 on August 10th 2016, 2:54 pm

This does work in Chrome as well as Edge. Do you have your Javascripts turned on?



If you do, try changing the placement to "All the pages"

Ace 1
Helper
Helper

Male Posts : 767
Reputation : 51
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Solved Re: Profile modifications

Post by skouliki on August 10th 2016, 3:04 pm

Yes my whole dorum is a jacascript lol so i did change the placement and the vote system is messed so..maybe a conflict between two java ..
I took my pad just to test but the admin is not centered

To be honest this isnt that important ..

skouliki
Graphic Designer
Graphic Designer

Female Posts : 1609
Reputation : 253
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Profile modifications

Post by Ace 1 on August 10th 2016, 3:14 pm

Yeah if you have to many scripts, for some reason, they start acting buggy. Trust me, my forum is like that. SCEditor toolbar disappears and such. But just try this last thing:

Templates >> General >> viewtopic_body >> Edit

Go all the way to the bottom and add this code:

Code:
<script type="text/javascript">
$(function()
  for (var i = 0, x = document.getElementsByClassName('username'); i < x.length; i++){
    var s = window.getComputedStyle(x[i]), w = s.getPropertyValue('width'), k;
    k = ((176 - w.replace('px','')) / 2) + 'px';
    x[i].style.left = k;
  }
});
</script>

Save and publish Add

If this doesn't work, then something is really wrong... Tap

Ace 1
Helper
Helper

Male Posts : 767
Reputation : 51
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Solved Re: Profile modifications

Post by skouliki on August 10th 2016, 3:22 pm

yes something is realllllyyyy wrong !
i even delete the profile and put the default on but no luck ..



its ok no problem thanks for all your help ...may i ask one thing extra how can i change the color of the grey letters ( 31...213....16/01/2016)
cause with the black background are hard to read

skouliki
Graphic Designer
Graphic Designer

Female Posts : 1609
Reputation : 253
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Profile modifications

Post by Ace 1 on August 10th 2016, 3:27 pm

Sorry for my lack of help. Here's the CSS:

Code:
.pun .user .user-info { color white; }

Ace 1
Helper
Helper

Male Posts : 767
Reputation : 51
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Solved Re: Profile modifications

Post by skouliki on August 10th 2016, 3:30 pm

You always help me and i thank you ..
Well thanks also for that code ...
Now my topic is solved

skouliki
Graphic Designer
Graphic Designer

Female Posts : 1609
Reputation : 253
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Profile modifications

Post by brandon_g on August 10th 2016, 4:55 pm

Thanks for the help Ace 1 Very Happy.

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


Remember to mark your topic when a solution is found.

brandon_g
Support Moderator
Support Moderator

Male Posts : 5344
Reputation : 488
Language : English
Location : USA

http://broadcastingduo.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