Subscribe to
Posts
Comments

I have spend quite some time lately to set up my blog and try to make it different from other blogs that are using the same theme. But it doesn’t look much different. You can tell it is still a mistyook theme which you can download from here. There are two changes I made to the theme. I added the random header image. The header image changes every time a page is reloaded. I explained how to do it in this post. The second thing is that I replace the original wordpress search box with custom Google search.

In response to my first comment, I try to explain how to made this change here.

In order to do that a new template file need to be created in the mistyook folder. You can name it search_results.php. Open the file in notepad and put the following code in there:


< ?php
/*
Template Name: Search Results
*/
?>
< ?php get_header(); ?>
<div id=”content”>
<div id=”content-main”>
< ?php
$searchstring = (!empty($_GET['q'])) ? "Search Results For '".$_GET['q']."'" : "Please Enter Your Search Phrases";
?>
<h2 class=”pagetitle”> < ?php echo $searchstring; ?> </h2>
<!—- Google Search Result Snippet Begins —->
<div id=”googleSearchUnitIframe”></div>
<script type=”text/javascript”>
var googleSearchIframeName = ‘googleSearchUnitIframe’;
var googleSearchFrameWidth = 510;
var googleSearchFrameborder = 0 ;
var googleSearchDomain = ‘www.google.com’;
</script>
<script type=”text/javascript”
src=”http://www.google.com/afsonline/show_afs_search.js”>
</script>
<!—- Google Search Result Snippet Ends —->
</div>
< ?php get_sidebar(); ?>
< ?php get_footer(); ?>

After that you will need to modify the header file header.php. Replace the following line


<li class="search"><form method="get" id="searchform" action="your blog URL“><input type=”text” value=”" name=”s” id=”s” /><input type=”submit” id=”searchsubmit” value=”Search” /></form></li>

with these few lines


<li class="search">
<!– SiteSearch Google –>
<form method=”get” id=”searchform” action=”<?php bloginfo(’home’)?><?php echo “/search-results/” ?>” target=”_top”>
<input type=”radio” name=”sitesearch” value=”" <?php if($_GET[’sitesearch’]!=”your domain“){echo “checked=”checked”"; } ?> id=”ss0″/>Search The World <input type=”radio” name=”sitesearch” value=”your domain” <?php if($_GET[’sitesearch’]==”your domain“){echo “checked=”checked”"; } ?> id=”ss1″/>Search Siusic Only <input type=”text” name=”q” maxlength=”255″ value=”<?php echo $_GET[’q'] ?>” id=”s”/><input type=”submit” name=”sa” value=”Search” id=”searchsubmit”/>
<input type=”hidden” name=”domains” value=”your domain“/>
<input type=”hidden” name=”client” value=”your adsense account“/>
<input type=”hidden” name=”forid” value=”1″/>
<input type=”hidden” name=”ie” value=”ISO-8859-1″/>
<input type=”hidden” name=”oe” value=”ISO-8859-1″/>
<input type=”hidden” name=”cof” value=”GALT:#265e15; GL:1;DIV:#aaaaaa; VLC:265e15; AH:center;BGC:FFFFFF;LBGC:336699;ALC:265e15; LC:265e15;T:000000; GFNT:265e15;GIMP:265e15; FORID:11″ />
<input type=”hidden” name=”hl” value=”en”/>
</form>
<!– SiteSearch Google –>
</li>

Remember to change “Your domain” in the code to your own domain and change “your adsense account” to your own adsense account. After that you need to create a new page using the created template and you will need to go to mistylook options to hide the page from navigation. When all these are done you should able to see it works. Be sure to make a copy of the original file before making any changes.


Related Posts:

  • I Have Made Siusic.com a Search Engine as Powerful as Google
  • Upgrade to Wordpress 2.1? Forget about it!
  • Why Microsoft Wants to Buy Yahoo - Because Microsoft Search Ranking Algorithm Have Serious Flaw
  • Chinese Translation on Google.cn is Getting Amazing
  • Setting up The Top 10 Best Plugins


  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...

    RSS feed | Trackback URI

    2 Comments »

    Comment by hiutopor Subscribed to comments via email
    2007-09-17 06:58:44
    MyAvatars 0.2

    Hi all!

    Very interesting information! Thanks!

    G’night

     
    Comment by Rosyidi
    2008-05-06 13:15:50
    MyAvatars 0.2

    THanks a lot. But, google search now have a new script :(

     
    Name (required)
    E-mail (required - never shown publicly)
    URI
    Subscribe to comments via email
    Your Comment (smaller size | larger size)
    You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.