Search Posts Download 1.4

5.0
us Jason Denang 5 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.

Comments
ma Melo lobo Replied 2 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) .')';
ma Melo lobo Replied 2 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

in Balamurali Govindan Replied 3 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.

German Michael Zülsdorff Replied 3 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

German Michael Zülsdorff Replied 3 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

hk EI Engineering Replied 3 years ago

Dear ~Z~ Man,

Yes, People, Groups and Posts has the same problem.

more details:
- input "測試" to search box => shows general search result; URL is my.site.com/search?q=測試 (actual is https://my.site.com/search?q=%E6%B8%AC%E8%A9%A6)
- then if click Posts => shows all items (not expected result) ; URL is my.site.com/search?type=posts
or if click People => shows all items (not expected result) ; URL is my.site.com/search?type=people
or if click Groups => shows all items (not expected result) ; URL is my.site.com/search?type=groups
- and then if manually add &q=測試 to the tail of problem URL and press [enter] (like my.site.com/search?type=posts&q=測試), it can show the expected search result that posts has the word "測試".

German Michael Zülsdorff Replied 3 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?

hk EI Engineering Replied 3 years ago

in English search:
- input "test" to search box => it will go to https://my.site.com/search?q=test
- then click "Posts" at "RESULT TYPE" => https://my.site.com/search?type=posts&q=test content shows post items which contains the word "test"

in Chinese search:
- input "測試" to search box => it will go to https://my.site.com/search?q=%E6%B8%AC%E8%A9%A6
- then click "Posts" at "RESULT TYPE" => https://my.site.com/search?type=posts

** Seems the parameter q=[chinese_character] disappeared

German Michael Zülsdorff Replied 4 years ago

@El Engineering
simply enter these characters to the search input field ...
or what are you asking for?
please provide an example

hk EI Engineering Replied 4 years ago

Dear Jason,
How can do Unicode characters to search posts?

Thanks
EI

Component

Developer: Jason
License ossnv3
Type: Communication
Requires Ossn Version : 5.x
Latest Version: 1.4
Last Updated 5 years ago
Repository Url View Repository

Versions