By Hideto on Thursday, 08 June 2017
Posted in Technical Issues
Likes 0
Views 424
Votes 0
Hello,

We are using EasyProfile's custom field "Display Name" as Author Name in EasyBlog.

Please refer to the following discussion for details:
https://stackideas.com/forums/name-display-format-how-to-retrieve-from-other-table
(I've edited profile.php so that when Name Display Format is set to Nickname in EasyBlog config, EasyProfile's "Display Name" should be retrieved as Author name.)

It's working successfully.
But we have an issue in "Search Bloggers" function.

Will you please advice us on how and what to modify in order to make it search for "Display Name" instead of nickname?


Thanks again for your help,
rikao
You can modify on this file.
JoomlaFolder/administrator/components/com_easyblog/models/blogger.php
[gist type="php"]
// LINE 395
$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;
}
}
[/gist]
·
Thursday, 08 June 2017 22:20
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Arlex,
Thank you so much for navigating me where to look at.
It was a great help!

rikao
·
Friday, 09 June 2017 21:03
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome.

As a gentle reminder, kindly start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiry. I will lock and mark this thread as resolved.
·
Friday, 09 June 2017 21:49
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post