$search['data']['show_images'], 'image_bg_color' => '#FFFFFF', 'image_transparency' => 1, 'image_crop_location' => w_isset_def($search['data']['image_crop_location'], "c"), 'image_width' => $search['data']['image_width'], 'image_height' => $search['data']['image_height'], 'image_source1' => $search['data']['image_source1'], 'image_source2' => $search['data']['image_source2'], 'image_source3' => $search['data']['image_source3'], 'image_source4' => $search['data']['image_source4'], 'image_source5' => $search['data']['image_source5'], 'image_default' => $search['data']['image_default'], 'image_custom_field' => $search['data']['image_custom_field'] ); // ----------------- Recalculate image width/height --------------- switch ($search['data']['resultstype']) { case "horizontal": /* Same width as height */ $search['data']['image_options']['image_width'] = wpdreams_width_from_px($search['data']['image_options']['hreswidth']); $search['data']['image_options']['image_height'] = wpdreams_width_from_px($search['data']['image_options']['hreswidth']); break; case "polaroid": $search['data']['image_options']['image_width'] = intval($search['data']['preswidth']); $search['data']['image_options']['image_height'] = intval($search['data']['preswidth']); break; case "isotopic": $search['data']['image_options']['image_width'] = intval($search['data']['i_item_width'] * 1.5); $search['data']['image_options']['image_height'] = intval($search['data']['i_item_height'] * 1.5); break; } if (isset($search['data']['selected-imagesettings'])) { $search['data']['settings-imagesettings'] = $search['data']['selected-imagesettings']; } /*if (isset($search) && $search['data']['exactonly']!=1) { $_s = explode(" ", $s); }*/ if (isset($_POST['options'])) { parse_str($_POST['options'], $search['options']); } $blogresults = array(); $allpageposts = array(); $pageposts = array(); do_action('asl_before_search', $s); $params = array('data' => $search['data'], 'options' => $search['options']); $_posts = new wpdreams_searchContent($params); $pageposts = $_posts->search($s); $allpageposts = array_merge($allpageposts, $pageposts); do_action('asl_after_pagepost_results', $s, $pageposts); $allpageposts = apply_filters('asl_pagepost_results', $allpageposts); $results = array_merge( $allpageposts ); // Keyword suggestions if ( count($results) <= 0 && w_isset_def($search['data']['kw_suggestions'], 1) == 1 ) { $keywords = array(); $types = array(); $sd = $search['data']; if ($sd['searchinposts'] == 1) $types[] = "post"; if ($sd['searchinpages'] == 1) $types[] = "page"; if (isset($sd['selected-customtypes']) && count($sd['selected-customtypes']) > 0) $types = array_merge($types, $sd['selected-customtypes']); $t = new wpd_keywordSuggest("google", array( 'maxCount' => w_isset_def( $sd['kw_count'], 10 ), 'maxCharsPerWord' => w_isset_def($sd['kw_length'], 60), 'postTypes' => $types, 'lang' => w_isset_def( $sd['kw_google_lang'], "en" ), 'overrideUrl' => '' )); $keywords = $t->getKeywords($s); if ($keywords != false) { $results['keywords'] = $keywords; $results['nores'] = 1; $results = apply_filters('asl_only_keyword_results', $results); } } else if (count($results > 0)) { $results = apply_filters('asl_only_non_keyword_results', $results); } $results = apply_filters('asl_results', $results); do_action('asl_after_search', $s, $results); // Generate the results here $html_results = asl_generate_html_results( $results, $search['data'] ); /* Clear output buffer, possible warnings */ print "!!ASLSTART!!"; //var_dump($results);die(); print_r($html_results); print "!!ASLEND!!"; die(); }