[support] ***DHSPAM*** long username getting truncated at the bottom of blog posts

Jean Gazis jgazis at gmail.com
Tue Jun 12 01:21:35 UTC 2007


I actually changed the line above like this:

 if (drupal_strlen($object->name) > 22) {
      $name = drupal_substr($object->name, 0, 15)

- where the 22 used to be 20. She happens to have a 21-letter name, what are
the odds? (Probably not actually that small.)

Anyway, it seems to have worked fine. Thanks to you and whoever else it was
that answered my question.

Jean Gazis

On 6/6/07, Michael Prasuhn <mike at mikeyp.net> wrote:
>
> That is probably because theme_username purposely truncates
> usernames. In the code it is documented as "Shorten the name when it
> is too long or it will break many tables."
>
> If you wanted to override this, you could define a new function in
> the template.php file of your theme. To do this, simply copy the of
> the existing function from <http://api.drupal.org/api/5/function/
> theme_username> and rename it to your-theme's-name_username. Then
> depending on what you want to do, you could simply comment out the line
>
> $name = drupal_substr($object->name, 0, 15) .'...';
>
> or change the value (15) to something long enough to allow the user's
> name to not be truncated. You could even code it so that, only this
> user's name is exempt from the filter, or subject to different
> filtering.
>
> Hope this helps
>
> -Mikey P
>
>
> On Jun 6, 2007, at 2:13 PM, Jean Gazis wrote:
>
> > I have a user with a long (real name as user) name - the "Submitted
> > by" under her blog posts is truncating it as "Submitted by
> > Firstname La...". There is extra space in the container - the
> > author and date don't fill the entire width, but it's cutting off
> > the name before the date field. How can I make it show the full
> > user name? I can't tell from searching whether this needs to be
> > fixed in the theme css or in the template files or what. It's not
> > even an unusual name.
>
> __________________
> Michael Prasuhn
> mike at mikeyp.net
> http://mikeyp.net
> 714.356.0168
>
>
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>



-- 
Jean Gazis
www.jeangazis.com
www.boxofrain.us

"Believe those who are seeking the truth; doubt those who find it." - André
Gide
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20070611/1f9afe86/attachment.htm 


More information about the support mailing list