Firs I have to tell you that I am not a good writer.
The name of the plugin comes from the facebook autosugeest because it gives your blog the facebook style of search.
What can you customize?
In the file fb_autosuggest.php , from line 12 to 51 is the code used for give the serch results
$fb_keys = ”; //initialize the variable to store the search string
if(isset($_GET['fb_action'])) { //if the action is set
$fb_action = $_GET['fb_action']; //then the variable will receive the action from the GET
}
if (isset($_GET['fb_query'])) { //if the search string is received in GET
$fb_keys = $_GET['fb_query']; //then value will be stored in $fb_keys
}if ($fb_action == ‘query’) { //if the action is query, the we will prepare the resultsrequire_once (‘../../../wp-config.php’);global $wpdb;
$fb_keys = str_replace(‘ ‘,’%',$fb_keys); //separate the words by % to search for the words, not for the exact expression
$pageposts = $wpdb->get_results(“SELECT * FROM $wpdb->posts WHERE (post_title LIKE ‘%$fb_keys%’ or post_content LIKE ‘%$fb_keys%’) AND post_status = ‘publish’ ORDER BY post_date DESC limit “.get_fb_option(‘fb_maxresults’,20)); //search in the database
//this query will search in the title and in the content of the posts order by date desc and with a limit set in Max Results (default is 20)
$chars=get_fb_option(‘fb_chars’,100); //here we are getting how many chars will be displayed from the content of the post, default is 100
foreach ($pageposts as $post) { //fo each post we will display the result
setup_postdata($post);
?>
<div id=”ellist”> //div of each result, it is important to have the id=”ellist”, in this div you can change as you want to display the results
<a href=”<?=the_permalink()?>” class=”ev”> //here is the link to follow when the reader cliks on result or when pres enter on a selected result
<?=the_post_thumbnail(‘thumbnail’)?> //here we are displayng the post thumbnail
<b> <?=the_title()?> </b> <br> //displayng the title of the thumbnail
<?=mb_substr(strip_tags( get_the_content(),’<br><b><strong><i>’),0,$chars)?>… //diaplay an excerpt of the post content
</a>
</div>
//before and after this div you can display anything you want, important is that if the div is a selectable result, to set the id=”ellist” and for the action to set class=”ev” and in href of the anchor what link to follow
<?php
}
die();
}
If you want to change the styles, you can make changes in fb_autosuggestion.css, located in css folder.

