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

WorldFallz - April 24, 2008 - 20:55

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:

<?php
if (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

-Shaman- - April 25, 2008 - 18:19

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?

<?php
if (in_array('administrator',$user->roles)) {
   print
'<span class="admin"> ' . $user -> name . '</span>';
}
?>

...

Michelle - April 25, 2008 - 18:47

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

WorldFallz - April 25, 2008 - 20:08

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,

-Shaman- - April 27, 2008 - 18:39

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"…

...

Michelle - April 27, 2008 - 18:53

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.

...

sepeck - April 27, 2008 - 19:15

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

-Shaman- - May 2, 2008 - 12:39

So what can I actually do to make this working? Is there any way to make this working in .theme based themes?

Learn PHP

Michelle - May 2, 2008 - 12:52

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

-Shaman- - May 2, 2008 - 14:15

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.

...

Michelle - May 2, 2008 - 14:24

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

-Shaman- - May 2, 2008 - 14:54

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.

...

Michelle - May 2, 2008 - 16:35

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

-Shaman- - May 3, 2008 - 13:02

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

-Shaman- - May 6, 2008 - 20:33

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

fgm - November 26, 2008 - 21:48

You should try the current version for 6.2. It's been ported to PHPtemplate and seems to work.

http://drupal.org/node/336597

 
 

Drupal is a registered trademark of Dries Buytaert.