Hi All,
I'm having a lot of trouble with this one. I would like to also make search consider wall posts and comments. Where should I be working?
Thank you,
Jason
.
I think I found a solution but that requires your approval of course. I modified the ossn_com
file as follows:
$wall = new OssnWall;
$query = input('q');
$search_options = array("search_type" => true, "description" => $query, 'type' => 'user',
'distinct' => true);
//if not admin user add where caluse to limit reach
if(!ossn_isAdminLoggedin()){
$posts = $wall->SearchPosts($search_options);
$search_options['count'] = true;
$count = $wall->SearchPosts($search_options);
}else{
$posts = $wall->getAllPosts(array('search_type' => true,
'description' => $query,
'type' => 'user',
'distinct' => true));
$count = $wall->getAllPosts(array(
'search_type' => true,
'description' => $query,
'type' => 'user',
'distinct' => true,
'count' => true,
));
}
$found['users'] = $posts;
$search = ossn_plugin_view('searchposts/search/view', $found);
$search .= ossn_view_pagination($count);
if(empty($posts)) {
return ossn_print('ossn:search:no:result');
}
return $search;
Thank you so much for making a complete component available, Jason.
I think this may not only motivate other members to contribute their own Ossn enhancements, but also helps to find bugs, optimize the code, or discuss completely different solutions.
Hi Z-man,
I tried to add a response with examples, but I got an error message stating "Can not add reply". I also tried wrapping my code examples in the code braces atop this editor, but it was breaking in the preview.
I have created a repository on github. I added the component here
Best,
Jason
You may edit my posts, yes, but I doubt you can save your edition.
BTW I would like to take this opportunity to remind you of the terms and conditions of this forum that you agreed to when you registered. In particular:
> If you solved your issue you should post the steps you followed to
> solve issue.
Of course we're all happy that you solved your idea "in surprisingly a very short period of time", but we would be happier if you would have told us HOW you did it.
Also, Z-Man... I'm able to edit your posts. Once I'm logged in I have the ability to edit anyone's post or response. ** Edit ** I am trying to show the image, but this editor is making the following entry instead https://imgur.com/PM7gc2b
! [ Screen Sho t ][ 1 ]
Thanks everyone for the input and help (Rishi). I was able to get this done in surprisingly a very short period of time. Working great and exactly what I wanted. Thanks again.
Jason
You asked what you're missing.
Reading the documentation in first place, perhaps? As explained in https://www.opensource-socialnetwork.org/wiki/view/704/should-i-modify-core-files
altering of core files is a no-go.
Thanks to the modular concept of Ossn any new feature or improvement can be achieved by additional components. Aside from that: Any Database operation needs extra care and understanding - without results may be dangerous and unpredictable. Thus instead of blindly 'cloning' existing code I'd recommend to
Hi Bansh Rishi. I have just sent an email to you. I also just downloaded a copy of Who is Online to begin working. Should be pretty easy, but we shall see.
Thank you!
Jason
you can email me about this if you want, I was able to modify the free WhoIsOnline component pretty easily to search post contents. Should be simple enough to add comments to that if you are so inclined. [emailremoved]
Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.
$199 (Life Time)