I've been playing with the CVS (August 25, 2004) and it looks awesome. However, I have two questions for which I can't seem to solve myself. (And I'm sure someone would point out that the solution was right under my nose all along.)

1. Now that we have a robust profile system, and all the data in the profiles are stored in the database, I was thinking if it is possible to substitute usernames shown on "submitted by foo" strings with real names that users store in their profile.

For example, suppose you have a Drupal site for the Vatican and His Holiness has a user account. His user name, for argument's sake, is Karol, a small name the elderly pontiff can remember. But, the Cardinals in Vatican do not want to see "submitted by Karol" tagged under anything He posts. They would like to see "submitted by His Holiness Pope John Paul II" instead. Now, in His profile the Pope has writted down his complete official name (and this field in the database is "profile_realname" or something similar).

How can I call the information from the "profile_realnames" field to replace the username value in "%a" in the themes? (See string: "Submitted by %a on %b."). That way the Pope doesn't have to remember to type in really long names but whenever he posts, his real name from the profile shows up as the author name.

2. Is there a way to change the text "not verified" next to the anonymous users names in comments? I think I remember some of the blogging versions of Drupal having a MT-type comment system where names of unregistered people who commented showed up normal without any other tags. I am sure this one is pretty easy and I just can't find it right now.

Thanks for helping.

Comments

kps’s picture

One of my "clients" hates the '(not verified') label, and unfortunately, it's hard coded.

I'd like to see format_name() replaced by theme('name', ...) so that everything our hearts desire would be easy.

kps’s picture

Now that I've had quick look at format_name(), I noticed another issue: a registered user's name is limited to 20 characters, even though in some contexts -- e.g. some themes' bylines -- there is no shortage of space, while anonymous names are not only not truncated, but have the '(not verified)' tag unconditionally attached.

Perhaps something like

function theme_name($object, $width)

where $width is the caller's estimate of the available space, perhaps expressed as a percentage of the page width.

Tommy Sundstrom’s picture

Is there a way to change the text "not verified" next to the anonymous users names in comments?

You can always do a serch and replace with php code in the template. Hackish and not a long term solution - but an easy way to solve the problem for now.

versions of Drupal having a MT-type comment system

Is it this one?

cel4145’s picture

You could use the locale module and change it to some other text.

alexis’s picture

What I did was something not so elegant but it works:

In comment.tpl.php I used:

<div class="submitted"><?php print str_replace('(not verified)','',$submitted); ?></div>

Alexis Bellido - Ventanazul web solutions

cel4145’s picture

That's not good. It should be changeable through locale. You might see if there is a bug report about this, and if not, submit it.

-----
Charlie Lowe | cyberdash
Tips for posting to the Drupal forums

nd_cer’s picture

Go to http://drupal.org/node/64248 to theme the username. You can do a lot of different things including changing or getting rid of (not verified).

mike3k’s picture

I'd like to prevent 'not verified' users from posting comments. Is there any way to do it?

I'm already preventing anonymous users from posting comments without approval, but the spammers are getting around it with unverified user names.
--
Mike Cohen, http://www.mcdevzone.com/

nevets’s picture

If I understand the question correctly you do not want people who are not logged in to be able to post comments. If so, goto
administer -> users -> configure -> permissions.

Unchecking 'post comments' and 'post comments without approval' for anonymous user should do it.

mike3k’s picture

I already have 'post comments without approval' disabled for anonymous users, but the spammers still manage to post with unverified user names, and I don't know how they do it.

To deal with it, I added a hack which checks for $name with $uid==0 and bails out from posting the comment. I've also added user name permissions to prevent registering any name containing poker, casino, etc.

--
Mike Cohen, http://www.mcdevzone.com/