Because of the nature of downloading and uploading content with AnodyneXtras, it is not available on mobile devices. If you want to browse, search, and upload, please use a laptop or desktop computer.
You can also check out some of our other sites and services using the links below.
Allows characters to use a Display Name as an alternative to the First Name, Last Name, Suffix which is the default in Nova.
This extension allows characters to use a Display Name as an alternative to the First Name, Last Name, Suffix which is default in Nova. If Display Name is blank the default method will be displayed.
This extension requires:
applications/extensions/nova_ext_display_name
.Add the following to application/config/extensions.php
:
$config['extensions']['enabled'][] = 'nova_ext_display_name';
get_character_name
function to your application/models/characters_model.php
file.Installation is now complete!
ALTER TABLE nova_characters ADD COLUMN display_name VARCHAR(255) DEFAULT NULL;
applications/models/characters_model.php
file to overwrite get_character_name
function. public function get_character_name($character = '', $showRank = false, $showShortRank = false, $showBioLink = false)
{
$this->db->from('characters');
if ($showRank === true)
{
$this->db->join('ranks_'.GENRE, 'ranks_'.GENRE .'.rank_id = characters.rank');
}
$this->db->where('charid', $character);
$query = $this->db->get();
if ($query->num_rows() > 0)
{
$item = $query->row();
$array['rank'] = ($showRank === true) ? $item->rank_name : false;
$array['rank'] = ($showShortRank === true) ? $item->rank_short_name : $array['rank'];
if(!empty($item->display_name))
{
$array['display_name'] = $item->display_name;
}else {
$array['first_name'] = $item->first_name;
$array['last_name'] = $item->last_name;
$array['suffix'] = $item->suffix;
}
foreach ($array as $key => $value)
{
if (empty($value))
{
unset($array[$key]);
}
}
$string = implode(' ', $array);
if ($showBioLink === true)
{
return anchor('personnel/character/'.$item->charid, $string);
}
return $string;
}
return false;
}
}
Installation is now complete!
If you encounter a bug or have a feature request, please report it on GitHub in the issue tracker here: https://github.com/reecesavage/nova-ext-display-name/issues
Copyright (c) 2021 Reece Savage.
This module is open-source software licensed under the MIT License. The full text of the license may be found in the LICENSE
file.