Support

  1. Hideto Oshima
  2. Support
  3. Wednesday, May 17 2017, 03:16 PM
  4.  Subscribe via email
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)
Easy Profile Support 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
Hideto Oshima Accepted Answer
Pro
Thank you so much!!!
Your solution works perfectly :)

I'm really glad that now EasyProfile and EasyBlog works seamlessly.
Thanks,

Hideto
  1. more than a month ago
  2. Support
  3. # 2
Hideto Oshima Accepted Answer
Pro
Hello,

Thanks to your solution, we are now using EasyProfile's "Custom Display Format Name" as Author Name of EasyBlog.

However, we have an issue in "Search Bloggers" function. (Screenshot attached)

EasyBlog's developer kindly instructed me which file to modify.
(/administrator/components/com_easyblog/models/blogger.php)


$searchQuery = '';
if (!empty($search)) {
$searchQuery .= ' AND ';

switch( $nameDisplayFormat )
{
case 'name':
$searchQuery .= '`name` LIKE ' . $db->Quote( '%' . $search . '%' );
break;
case 'username':
$searchQuery .= '`username` LIKE ' . $db->Quote( '%' . $search . '%');
break;
default:
$searchQuery .= '`nickname` LIKE ' . $db->Quote( '%' . $search . '%' );
break;
}
}


Will you please advice us on how to modify the file in order to make it search for "Custom Display Format Name" instead of nickname, if possible?


Thanks again for your help,
Hideto
Attachments (2)
  1. 2 weeks ago
  2. Support
  3. # 3
Easy Profile Support 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. 2 weeks ago
  2. Support
  3. # 4
Hideto Oshima Accepted Answer
Pro
Hello,

Thank you so much for your prompt reply :)
I understand that there is no simple sollution...

Our "Custom Display Format Name" is comprised of a single custom field named "displayname", by the way.
It's not a combination of multiple fields.

Will there be any other solution in that case?

Thanks,
Hideto
  1. 2 weeks ago
  2. Support
  3. # 5
Easy Profile Support 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. 2 weeks ago
  2. Support
  3. # 6
Hideto Oshima Accepted Answer
Pro
Yes!!! :D
That modification solved the issue and works perfectly now :)

Thank you soooo much for your great support!!!

Hideto
  1. 2 weeks 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.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.