1. 4creator
  2. Support
  3. Wednesday, May 17 2017, 03:16 PM
Hello,

I'm using "Custom Display Format Name".

I want to show this custom display format name also as Author Name in user's blog posts (via EasyBlog).

EasyBlog's developer kindly instructed me which file to modify.
(JoomlaFolder/administrator/components/com_easyblog/tables/profile.php)
But I cannot figure out how, although I've read your "JsnUser Object" article.

Will you please instruct me how to modify the file in order to call "Custom Display Format Name"?

Attached is the file to be modified.
Please see function getName().

What I want to do is …
If nickname is selected in EasyBlog configuration (instead of realname or username), then custom display format name of EasyProfile should be used as Author's name.


Thanks for your help in advance,
Hideto
Attachments (1)
admin Accepted Answer
Admin
Hi,
at line 256 try to replace this:
if ($type == 'nickname' && !empty($this->nickname)) {
$name = $this->nickname;
}

with this:
if ($type == 'nickname') {
require_once(JPATH_SITE.'/components/com_jsn/helpers/helper.php');
$name=JsnHelper::getUser($this->id)->getFormatName();
}
  1. more than a month ago
  2. Support
  3. # 1
4creator Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 2
4creator Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 3
admin Accepted Answer
Admin
Hi,
sorry but this is not so simple because does not exists in DB a column for displayed FormatName.

the best way is to change from

$searchQuery .= '`nickname` LIKE ' . $db->Quote( '%' . $search . '%' );

to

$searchQuery .= '`name` LIKE ' . $db->Quote( '%' . $search . '%' );
  1. more than a month ago
  2. Support
  3. # 4
4creator Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 5
admin Accepted Answer
Admin
Try this:
1) at line 430 add this code:
$query .= ' 	inner join `#__jsn_users` as jsn on a.`id` = jsn.`id`';


2) at line 408 replace "nickname" with alias of your "displayname"
  1. more than a month ago
  2. Support
  3. # 6
4creator Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 7
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.