How to bold an admin nickname
-Shaman- - April 24, 2008 - 18:35
I would like to have ability to bold certain role nickname, but I have no Idea how to do this. This is problem for me because at this moment authenticated users and admin nicks look exactly the same which is bad.

You'll have to check the
You'll have to check the template.php file for your theme and look for phptemplate_username(). If not there, find that function in theme.inc (includes folder) or see this api link and copy to the template.php file for your theme. You can then theme it however you like.
You'll probably want to do something like:
<?phpif (in_array('administrator',$user->roles)) {
print '<span class="admin"> ' . $user -> name . '</span>';
}
?>
And then style with css in your theme.
===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime." -- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz
Hi I don't have a
Hi
I don't have a template.php file I have a .theme file in my theme folder.
Where do I suppose to paste this code?
<?phpif (in_array('administrator',$user->roles)) {
print '<span class="admin"> ' . $user -> name . '</span>';
}
?>
...
Then you're not using a phptemplate theme. If you say what theme you're using, maybe someone can help. Most people are only familiar with phptemplate themes, though.
Michelle
--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.
Thanks Michelle-- I always
Thanks Michelle-- I always forget to couch my theme advice with "this assumes a phptemplate based theme", duh.
===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime." -- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz
Hi I'm using goofy.theme,
Hi
I'm using goofy.theme, and I prefer theme in one file rather than theme divided to block.tpl.php node.tpl.php etc like i.e. "bluemarine"…
...
Ah, Goofy, I like the looks of that one. Pity it's not phptemplate. I don't really see what the number of files has to do with it, but to each his own. Just be aware that your odds of getting any help go down drastically if you don't use a phptemplate theme, so you're going to need to dig in and learn how it works yourself. What is Goofy, anyway? XTemplate? I haven't looked at it since 4.6, I think.
Michelle
--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.
...
Goofy is a php based theme that doesn't use an engine. As a result there are no overrides. In previous versions there have been people who made phptemplate based versions.
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
So what can I actually do to
So what can I actually do to make this working? Is there any way to make this working in .theme based themes?
Learn PHP
Seriously. You're using a type of theme that very few people use. The odds of one of them happening to read your post are very slim. If you want to go against the norm, that's your business, but you're going to find support very hard to find. And you're going to have to update it yourself when you move off 4.7 becuase that's the last version there is for Goofy.
My recommendation is to find a phptemplate based theme. Multiple theme files are a _good_ thing so that's really not a good reason to not use it.
Michelle
--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.
Hi I've found phptemplate
Hi I've found phptemplate based Goofy theme (http://drupal.org/node/25491), but I've changed a few things in .theme based version so I'll have to check this how to do these changes in phptemplate based theme. Anyway, now since I have "proper" theme, going back to the topic of this post, how to bold admin nickname in the content?
BTW I have no idea why "Goofy" isn't contributed anymore, I've searched for another theme some time ago, but Goofy is best, rest of them are just ugly and "clumsy" for me, Goofy is nifty.
...
WorldFallz gave you the answer for phptemplate based themes back up in http://drupal.org/node/250838#comment-820166
As for why Goofy isn't maintained, no idea. Maintainers don't always keep things going forever. I do like Goofy and used it back in 4.6. I don't agreee that all other themes are ugly, though, and no clue how a theme can be clumsy.
Michelle
--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.
Saying "clumsy" I mean
Saying "clumsy" I mean square corners, and look like from "atari-era". These times sites should be more advanced and should look nifty, like i.e. "goofy", or "manuscript" theme, which is gorgeous.
...
Wow, that's pretty insulting. You do realize all those themes are provided by people spending their own time to develop something to give away for free, right?
I'm done with this thread.
Michelle
--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.
I'm no bother at all, I
I'm no bother at all, I don't mind whether someone spent one day or one year making theme if he doesn't have a bit taste… I appreciate, that people are making themes, beause I don't have such skills to write a theme by myself, but that doesn't mean that I have to love every theme on the world.
BTW I don't know why You're felling insulted, maybe You just know that You have a poor taste… (which I've never said that). Or maybe You've became an advocate of all the people with bad taste around the world :-P
Hi I've tested php_template
Hi I've tested php_template goofy, and this Yours snippet doesn't seems to working at all, I've pasted it into template.php as well to theme.inc and there's nothing but the bugs :-(
Current Goofy version for 6.x
You should try the current version for 6.2. It's been ported to PHPtemplate and seems to work.
http://drupal.org/node/336597