Help - Search - Members - Calendar
Full Version: "Admin" badge or icon when administrator comments?
Movable Type Community Forum > Additional Resources > Tips and Tricks
wdik
I'm not quite sure how to go about this, but I'd like to figure out a way to have a particular badge, or icon, or something to signify when I (or another admin) posts a comment to their own weblog. That way a quick browse through a list of comments could designate an "official" comment from a general, reader one. Ideas?
medic119
You might try putting an MT image tag in your nickname slot and changing the posted by code to in each post. (don't use the name field because that will alter your login name to include the image code)

You would have to create an icon with each users login name dirified like John_Doe.gif

Something like
Nickname field in Profile:
CODE
John Doe <img src="/your path/<$MTEntryAuthor dirify="1"$>.gif" border=0 alt="avatar">


And seeing if it parses when you rebuild.
medic119
I just checked it and it worked like a charm!
You have to rebuild the entire site after saving the updated profile so it will parse the new nickname, but it added a little icon next to my name no problems. I got the following on the bottom of my posts

posted by Medic119 Image at 16:50

This would be a great way to create avatars for people with accounts!  Just use the code without the name and change the MT template to use the nickname instead of the login name.

BTW you can also use a straight path so you don't have to keep making icons for each author.
EX:
Nickname field:
CODE
John Doe <img src="/your path/admin.gif" border=0 alt="admin">
wdik
Sounds good, except for one snag - there isn't a "nickname" tag for Comment Authors. There is <$MTCommentAuthorLink$> and <$MTCommentAuthor$> but no option for nicknames, so I couldn't use your method. It would work for regular entries, but not for comments. Right?
medic119
Dunno give it a try and see what happens.  Any tag that pulls the nickname from the database should work.

Another method is to create a icon for each author name (use blank clear icons for authors without badges)

Then edit the template and put the following code next to the comment authors name
CODE
<img src="/your path/<$MTCommentAuthor$ dirify="1"$>.gif" border=0 alt="avatar">


Then you should have an avatar for each author, but for those that are non-admin the avatar will be an empty transparent gif (which would show up as nothing on the page).
girlie
And your authors will have to make sure to use the correct names when they comment.

But I guess that's what the Remember me function is for, hehe.
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-2008 Invision Power Services, Inc.