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.

How to modify the post profile appearance of a specific user?

View previous topic View next topic Go down

Solved How to modify the post profile appearance of a specific user?

Post by the_rocketeer on Sun Jun 26, 2016 2:09 am

Ahoy!

I would like to modify profile appearance (avatar border, profile background, poster name font-weight, etc.) according to groups. I know, it's possible because I read onceabout it butunfortunately I lost the link.

Can anyone help me? ouou
avatar
the_rocketeer
Forumember

Female Posts : 36
Reputation : 1
Language : Bulgarian, English
Location : Europe

http://love-you-hogwarts.forumy.biz/

Back to top Go down

Solved Re: How to modify the post profile appearance of a specific user?

Post by Ace 1 on Sun Jun 26, 2016 8:50 am

Hey @the_rocketeer try going to Administration Panel >> Modules >> HTML & Javascript >> Javascript codes management and create a new javascript with the following code:

Code:
$(function() {
  groupMod('#FFFFFF', 'group1');

  function groupMod(color, classname) {$('.post:has(span[style="color:'+color+'"] strong)').addClass(classname)}
});

Make sure to place this Javascript in the topics and save it. The hex code "#FFFFFF" represents the color of the group you want and "group1" is a name you're assigning to that group.

Now go to Display >> Colors >> CSS Stylesheet to style the posts from members of that group. If you need specific styling then just ask.
avatar
Ace 1
Helper
Helper

Male Posts : 826
Reputation : 62
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Solved Re: How to modify the post profile appearance of a specific user?

Post by YoshiGM on Mon Jun 27, 2016 1:15 am

You can also read this topic:
http://help.forumotion.com/t140441-staff-posting-color

You can select your best option to get that you want thumright
avatar
YoshiGM
Forumember

Male Posts : 668
Reputation : 93
Language : Spanish, English & Italian (16%)
Location : Mexico

http://asistencia.foroactivo.com/u21373

Back to top Go down

Solved Re: How to modify the post profile appearance of a specific user?

Post by the_rocketeer on Sun Jul 03, 2016 8:14 am

Dear Ace 1,

Sorry but I'm pretty bad in javascript codes. I have to replace only the hex code and the group name? And what classname should I use when I style the post?
avatar
the_rocketeer
Forumember

Female Posts : 36
Reputation : 1
Language : Bulgarian, English
Location : Europe

http://love-you-hogwarts.forumy.biz/

Back to top Go down

Solved Re: How to modify the post profile appearance of a specific user?

Post by Ace 1 on Sun Jul 03, 2016 8:23 am

The classname is dictated by what you choose to name it in the Javascript code. So if you refer to the JS I used up there, then you would put something like this in your stylesheet:

Code:
.post.group1 { background-color: #ff0000; }

And the post background color would be red.
avatar
Ace 1
Helper
Helper

Male Posts : 826
Reputation : 62
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Solved Re: How to modify the post profile appearance of a specific user?

Post by the_rocketeer on Sun Jul 03, 2016 8:41 am

Ok, I think I'm doing something wrong because it's not working for me :/
I tried it here:http://love-you-hogwarts.forumy.biz/


Last edited by the_rocketeer on Sun Jul 03, 2016 10:05 am; edited 1 time in total
avatar
the_rocketeer
Forumember

Female Posts : 36
Reputation : 1
Language : Bulgarian, English
Location : Europe

http://love-you-hogwarts.forumy.biz/

Back to top Go down

Solved Re: How to modify the post profile appearance of a specific user?

Post by Ace 1 on Sun Jul 03, 2016 8:58 am

Oh yeah you have phpbb2. What exactlydo you want done?

And can you tell me what this is that I found in your CSS Stylesheet?

Code:
.hazleirasege
avatar
Ace 1
Helper
Helper

Male Posts : 826
Reputation : 62
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Solved Re: How to modify the post profile appearance of a specific user?

Post by the_rocketeer on Sun Jul 03, 2016 9:09 am

Oh, yes, sorry! I forgot to mention I have phpbb2.

I would like to be able to change members post profile appearance according their groups.(like profile pic border, profile background, etc.)

This is a tag from the code in the post.
avatar
the_rocketeer
Forumember

Female Posts : 36
Reputation : 1
Language : Bulgarian, English
Location : Europe

http://love-you-hogwarts.forumy.biz/

Back to top Go down

Solved Re: How to modify the post profile appearance of a specific user?

Post by Ace 1 on Sun Jul 03, 2016 9:28 am

Did your JS code look something like this?

Code:
$(function() {
 groupMod('#735782', 'group1');

 function groupMod(color, classname) {$('.post:has(span[style="color:'+color+'"] strong)').addClass(classname)}
});

And your CSS like this?

Code:
.post.group1 { background-color: #ff0000; /* red */ }
avatar
Ace 1
Helper
Helper

Male Posts : 826
Reputation : 62
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Solved Re: How to modify the post profile appearance of a specific user?

Post by the_rocketeer on Sun Jul 03, 2016 10:07 am

Omg! I finally got it!I found where I messed up and I fixed it! I change the post tag for prof (the tag of profiles) in JSand now it works perfectly!
A million, billion, trillion thanks, Ace 1! You totally rock!


Topic solved!
avatar
the_rocketeer
Forumember

Female Posts : 36
Reputation : 1
Language : Bulgarian, English
Location : Europe

http://love-you-hogwarts.forumy.biz/

Back to top Go down

Solved Re: How to modify the post profile appearance of a specific user?

Post by Ace 1 on Sun Jul 03, 2016 10:39 am

You can thank @Ange Tuteur for the code. I just use it. No problem though thumleft
avatar
Ace 1
Helper
Helper

Male Posts : 826
Reputation : 62
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Solved Re: How to modify the post profile appearance of a specific user?

Post by Nemo on Sun Jul 03, 2016 5:24 pm

Problem solved & topic archived.
Please read our forum rules: ESF General Rules
avatar
Nemo
Active Poster

Male Posts : 1201
Reputation : 119
Language : Greek, English, French

http://www.helpgr.forumgreek.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