[support] No template.php in bluemarine
bharani kumar
bharanikumariyerphp at gmail.com
Sun Jan 24 05:05:15 UTC 2010
Hi ,
I have enabled the *who's new *block ,
presently this block display list of user , So i like to add the userid with
username ,
so i did some changes in the template.php,,,,
I garland i got the expected out ,
Now Am using the blumarine theme,
In this folder there is no *template.php* file,
So i create the template.php inside the bluemarine folder ,
Then i pasted the below function ,
function _phptemplate_username($object) {
if ($object->uid && $object->name) {
// Shorten the name when it is too long or it will break many tables.
if (drupal_strlen($object->name) > 20) {
$name = drupal_substr($object->name, 0, 15) .'...';
}
else {
$name = $object->name;
}
if (user_access('access user profiles')) {
$output = l($name, 'user/'. $object->uid, array('attributes' =>
array('title' => t('View user profile.'))));
}
else {
$output = check_plain($name);
}
}
else if ($object->name) {
// Sometimes modules display content composed by people who are
// not registered members of the site (e.g. mailing list or news
// aggregator modules). This clause enables modules to display
// the true author of the content.
if (!empty($object->homepage)) {
$output = l($object->name, $object->homepage, array('attributes' =>
array('rel' => 'nofollow')));
}
else {
$output = check_plain($object->name);
}
$output .= ' ('. t('not verified') .')';
}
else {
$output = check_plain(variable_get('anonymous', t('Anonymous')));
}
$output .= ' ('. $object->uid .')';
return $output;
}
And also i tried something like
function phptemplate_username($object) {
// block of code changes
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20100124/d79d1ea0/attachment-0001.html
More information about the support
mailing list