Exemple #1
0
			<?php 
    //ktz_navigation();
    ?>
		</nav>
		<?php 
} else {
    $termstring = $s;
    if (ot_get_option('ktz_agc_activated') == "yes") {
        if ($s != '') {
            $googleresults = perform_google_web_search($termstring);
            if (is_array($googleresults)) {
                foreach ($googleresults as $result) {
                    $link = urldecode(CleanFileNameBan(strip_tags($result['Oriurl'])));
                    print '<div class="box-post ktz-agc-search">';
                    print '<h2><a href="' . get_search_link(CleanFileNameBan(hilangkan_spesial_karakter($result['title']))) . '">' . CleanFileNameBan(hilangkan_spesial_karakter($result['title'])) . '</a></h2>';
                    print '<p>' . CleanFileNameBan(hilangkan_spesial_karakter($result['abstract'])) . '</p>';
                    print '<p>Sumber: ' . $result['Oriurl'] . '</p>';
                    print '</div>';
                }
            }
        }
    } else {
        //ktz_post_notfound();
    }
}
?>
		</section>
		</div>
	<?php 
get_sidebar();
?>
Exemple #2
0
function ktz_get_AGC_single()
{
    if (ot_get_option('ktz_agc_activated') == "yes") {
        $orititle = get_the_title();
        $orititle = trim($orititle);
        $termstring = $orititle;
        if ($orititle != '') {
            echo '<div class="box-post single relpost">';
            echo '<h4 class="ktz-agc-title"><span class="ktz-blocktitle">' . __('Related Search', ktz_theme_textdomain) . '</span></h4>';
            echo '<ul class="ktz-agc-single">';
            $googleresults = perform_google_web_search_single($termstring);
            if (is_array($googleresults)) {
                $i = 0;
                foreach ($googleresults as $result) {
                    $link = urldecode(CleanFileNameBan(strip_tags($result['Oriurl'])));
                    $i++;
                    if ($i < 5) {
                        echo '<li class="clearfix">';
                        echo '<div class="content-related">';
                        echo '<a title="' . CleanFileNameBan(hilangkan_spesial_karakter($result['title'])) . '" href="' . get_search_link(CleanFileNameBan(hilangkan_spesial_karakter($result['title']))) . '">' . CleanFileNameBan(hilangkan_spesial_karakter($result['title'])) . '</a>';
                        echo '</div></li>';
                    }
                }
            }
            echo '</ul>';
            echo '</div>';
        }
    }
}
	function show_recent_searches( $before_list, $after_list, $between_items ) {
		$options = get_option( 'recent_searches_widget' );
		if ( !is_array( $options ) ) {
			$options = $this->get_default_options();
		}
		
		$data = get_option( 'recent_searches_widget_data' );
		if ( !is_array( $data ) ) {
			if ( isset( $options['data'] ) ) {
				$data = $options['data'];
			}
			if ( !is_array( $data ) ) {
				$data = array();
			}
		}
		if ( count( $data ) > 0 ) {
			echo $before_list;
			$first = true;
			foreach ( $data as $search ) {
				if ( $first ) {
					$first = false;
				} else {
					echo $between_items;
				}
		
				echo '<a href="'.home_url().'/'.get_theme_option('nama_agc').'/',ubah_tanda(hilangkan_spesial_karakter( wp_specialchars( $search ))), '"';
				if ( $options['nofollow'] ) {
					echo ' rel="nofollow"';
				}
				echo '>', hilangkan_spesial_karakter(wp_specialchars( $search )), '</a>';
			}
			echo $after_list, "\n";
		} else {
			_e('No searches yet', 'recent-searches-widget');
		}
	}