I have to tell you... I am really happy I did the move to this Omega theming framework.
This is a poweful theming aid.

My question today:

Every content created/edited by author: John Edward Remington Rodriguez
gets truncated at 15 characters and then appears like this:
2012/01/06 - 13:16 -- John Edward Rem...
instead of :
2012/01/06 - 13:16 -- John Edward Remington Rodriguez

Anyone would have an idea where I could tweak this?

<footer class="submitted"><span property="dc:date dc:created" content="2012-01-06T13:16:10-05:00" datatype="xsd:dateTime">2012/01/06 - 13:16</span> -- <span rel="sioc:has_creator"><span class="username" xml:lang="" about="/site/users/john-edward-remington-rodriguez" typeof="sioc:UserAccount" property="foaf:name">John Edward Rem...</span></span></footer>

Thanks in adavance!

Comments

rory_o’s picture

This isn't an Omega thing, but a Drupal Core thing. Core truncates usernames automatically so you need to use a theme hook to put it back. Here's what I use

function THEME_preprocess_username(&$vars) {
	//putting back what drupal core messed with
	$vars['name'] = check_plain($vars['name_raw']);
}
Anticosti’s picture

Cool :)
Thanks rory_o :)

Kind Regards,

Anticosti’s picture

Excellent!!!!!!
It works as expected :):):)

Much appreciated!

rory_o’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

had an extra code tag

joco_sp’s picture

Issue summary: View changes

thank you! this worked :)

Ramonius’s picture

Great solution #1 thanks!

dimmech’s picture

This works for me in D8, I wanted it to be adjustable.

<?php
use Drupal\Component\Utility\Unicode;
function THEME_preprocess_username(&$variables) {
  $account = $variables['account'] ?: new AnonymousUserSession();
  $name = $account
    ->getDisplayName();
  $variables['name_raw'] = $account
    ->getUsername();
  if (mb_strlen($name) > 30) {
    $name = Unicode::truncate($name, 15, FALSE, TRUE);
    $variables['truncated'] = TRUE;
  }
  else {
    $variables['truncated'] = FALSE;
  }
  $variables['name'] = $name;
}