Help - Search - Members - Calendar
Full Version: Different colors for different authors?
Movable Type Community Forum > Additional Resources > Tips and Tricks
uvalaw2005
Is it possible to have different authors' names appear in different colors when they post? E.g. author #1's name always appears in black under his posts, while author #2's name always appears in blue under her posts?

here's a blogger example: http://baude.blogspot.com
medic119
Sure, you can do any of that by simply editing the CSS file.

1) Open your CSS file and create a class for each author
CODE
EX:
.uvalaw2005 {color:blue; font-weight:bold; font-size:12px;}

.doc {color:#000000; font-weight:bold; font-size:14px;}


2) Edit the template and find the spot that says
CODE
posted by <$MTEntryAuthorNickname$>...

or something similar

3) Then just span the the entry with an MT Tag and when you rebuild whatever is inside the span will be formatted per your author class

CODE
posted by <span class="<$MTEntryAuthor$>"><$MTEntryAuthorNickname$></span>


You can do any specific changes this way. I used this method on a blog once to change the background of the post dependant on which category it was assigned to.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.