nant wrote:
This is exactly the mentality of the CB Team - hacks are good but they cannot compare to well thought-out features.
That's good to hear!
And now I'm giving a bit back to the community, hopefully it'll help someone.
At my site, I have some articles imported from an old homepage (before we had an CMS), which are not associated to any member, but have an Author Alias. They are submitted with the Administrator-Account, and of course I don't want that name to show up, but the original instead. Plus, I want (in all other cases) the username shown, not the name!
Thus, here's a modified AuthorBot:
[code:1]
function CBAuthorBot (&$row, &$params, $page) {
if (!$row->created_by_alias){
global $database;
$query="select username from #__users where id=".$row->created_by;
$database->setQuery($query);
$name=$database->loadResult();
$row->author="<a href=\"".sefRelToAbs('index.php?option=com_comprofiler&task=userProfile&user='.$row->created_by)."\">".$name."</a>";
}
}
[/code:1]
Slightly related to that: Can the Mambot be modified in a way to change the names in the tables (category / section overview) too? Looks strange to have peoples' real names there, instead of the username...