Arsalan Shah
7 years ago
This component allows users to search for text that was used in a post that was written to the wall or to a group. Adds a "view post" button to each returned result. Adds a "Posts" link to the search menu.
2.3
Updated to make it work on latest version $arsalanshah
Know issue
Melo lobo
Replied 4 years ago
after having studied the code well, it seems to me that the component is designed to search in the publications of friends only. The description of the aforementioned component gives the impression that searches are made in all the publications of the site. In any case it is a beautiful work thank you for your contribution Jason
//bof build array of friends user id's
$user = new OssnUser;
$friends = $user->getFriends(ossn_loggedin_user()->guid);
//add self user id so we can find self's posts too
$fuid_list = array(ossn_loggedin_user()->guid);
if($friends){
foreach($friends as $friend){
$fuid_list[] = $friend->guid;
}
}
//eof build array of friends user id's
$search_options['wheres'] = 'owner_guid IN ('.implode(",",$fuid_list) .')';
Melo lobo
Replied 4 years ago
Hello Jason.
I think I detected a small bug.. the search results of posts display only posts published by friends. other posts posted by other members on the website are not displayed even if they are public. if you test with an administrator account you will not notice the difference. do the test with a normal user account
Balamurali Govindan
Replied 5 years ago
Presently the search is defaulting to search on "People". Can this be changed to search by default on the Posts? Please help. Thank You.
Michael Zülsdorff
Replied 5 years ago
@ El Engeneering
not reproducable here with Ossn 5.6 and Chrome, Firefox, Edge
So please provide more details as mentioned in https://www.opensource-socialnetwork.org/wiki/view/1101/how-to-report-a-bug-error
We need access to your System Info page and we need to know which browser/device you are using
Michael Zülsdorff
Replied 5 years ago
Thanks for your investigations, El Engeneering.
So it looks like a general issue of OssnSearch and I have filed a bug report here
https://github.com/opensource-socialnetwork/opensource-socialnetwork/issues/1863
EI Engineering
Replied 5 years ago
Dear Z Man,
Yes, People, Groups and Posts has the same problem.
more details:
Michael Zülsdorff
Replied 5 years ago
Thanks for the detailed description.
Question: Does the Chinese search term disappear only when searching for posts,
or do you have same problem when searching for groups or people?
EI Engineering
Replied 5 years ago
in English search:
in Chinese search:
** Seems the parameter q=[chinese_character] disappeared
Michael Zülsdorff
Replied 6 years ago
@El Engineering
simply enter these characters to the search input field ...
or what are you asking for?
please provide an example
EI Engineering
Replied 6 years ago
Dear Jason,
How can do Unicode characters to search posts?
Thanks
EI