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.

Color of post by ranks...

View previous topic View next topic Go down

Solved Color of post by ranks...

Post by Kralj on June 29th 2013, 1:41 am

I don't know how to named theme Smile

how I can set color of posts by the rank of poster (like on this forum - staff has post with some color...)


Last edited by Ivan, kralj on June 29th 2013, 1:24 pm; edited 1 time in total

Kralj
Forumember

Male Posts : 128
Reputation : 6
Language : Croatian || English || HTML
Location : Croatia

Back to top Go down

Solved Re: Color of post by ranks...

Post by levy on June 29th 2013, 2:04 am

Code:
$(function(e) {
$('.post:contains(Name) .postbody .content div').addClass('staff').css('color','#30A0C9');
});
replace Name with the staff member and #30a0c9 with color

levy
Hyperactive

Male Posts : 2566
Reputation : 344
Language : Romanian, English
Location : Romania | Feel free to tag me into your topic if you have a problem

http://help.forumotion.com/

Back to top Go down

Solved Re: Color of post by ranks...

Post by SLGray on June 29th 2013, 2:10 am

Candy_fear I believe there is more to this then just a JavaScript. I will have to search for the information.

http://help.forumotion.com/t113843-how-do-i-change-the-color-post-for-staff-on-a-forum#748237


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


SLGray
Administrator
Administrator

Male Posts : 35641
Reputation : 2374
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Color of post by ranks...

Post by Angelo_Rules on June 29th 2013, 8:56 am

Hello,Smile

1.Adds this code to your rank title:

Code:
<span class="st-rang">RANK TITLE HERE</span>

2.Add the next code to JavaScript Management:

Code:
$(function() {
$('.st-rang').closest('.post').addClass('st-answer');
});

3.The last code need to be added in CSS:

Code:
.post.online.st-answer {
    background: url("http://i48.servimg.com/u/f48/17/48/49/15/photo10.png") repeat-y scroll left top, url("http://illiweb.com/fa/prosilver/icon_user_online_en.png") no-repeat scroll right top #E5F1F9;
    }
    .post.st-answer {
    background: url("http://i48.servimg.com/u/f48/17/48/49/15/photo10.png") repeat-y scroll left top #E5F1F9;

After that, uou can change the image to your image.You can try it from the staff members of forumotion.Wink

Angelo_Rules
Forumember

Male Posts : 29
Reputation : 1
Language : Roumanian
Location : Fm

Back to top Go down

Solved Re: Color of post by ranks...

Post by Kralj on June 29th 2013, 9:31 am

Thanks but I can't go to css with mobile (now I'm on mobile) can theme still be open to see it is work, or shure it works? And is it gradient or one color? I would to like gradient...

Thanks

Kralj
Forumember

Male Posts : 128
Reputation : 6
Language : Croatian || English || HTML
Location : Croatia

Back to top Go down

Solved Re: Color of post by ranks...

Post by Kralj on June 29th 2013, 1:23 pm

Yes! I'm done! I wrote 2 codes - in rank and javascript himself, and it's work! It's first html code what I wrote alone.

Thanks all of you! Solved.

Kralj
Forumember

Male Posts : 128
Reputation : 6
Language : Croatian || English || HTML
Location : Croatia

Back to top Go down

Solved Re: Color of post by ranks...

Post by SLGray on June 29th 2013, 6:58 pm

Topic Solved & Locked

Second Reminder: Please don't double/triple post. Your post need to be separated by 24 hours before bumping, replying or adding more information. Please use the edit button instead!


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


SLGray
Administrator
Administrator

Male Posts : 35641
Reputation : 2374
Language : English
Location : United States

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