Feb 26

I did some hacking with Word Press today to replace its built-in search with Google Adsense Search. It was fairly easy, and I’ll explain how in this post.

First you’ll need to setup your Adsense account and get your search code. During the setup process you will be asked an important set of questions which controls how the search results are displayed. By default, Google opens a separate window to display your search results. This resulted in an ugly format, and lacked my WordPress theme. Choose the options as shown in the window below:

adsense.png

This should result in Google providing you to pieces of code, the Search Box code, and Search Results code. Use the Search box code in your leftcolumn.php theme file to replace the search box that WordPress defines.
I made some changes to Google’s generated code to make it fit my left column, and to make sure it posted to the index.php. Google uses a lot of hidden form fields to define the search results. We will use one of these hidden fields to tell our theme index.php file to display search results instead of the blog posts.

Here’s the portion of my hacked theme index.php that displays Google’s Adsense-enabled search:

At the top of my index.php, before the blog post code:

<div class=”centreblock”>
<?php if(isset($_GET[’client’])) { ?>

<!– Google Search Result Snippet Begins –>
<div id=”googleSearchUnitIframe”>&tl;/div>

<script type=”text/javascript”>
var googleSearchIframeName = ‘googleSearchUnitIframe’;
var googleSearchFrameWidth = 700;
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 –>
<?php } else {?>

Now, further down the file, you will see this:

<?php
include_once(’leftcolumn.php’);
include_once(’rightcolumn.php’);
?>
</div> <!– centreblock –>

We need to add the following line:

<?php } // end google search if ?>
<?php
include_once(’leftcolumn.php’);
include_once(’rightcolumn.php’);
?>
</div> <!– centreblock –>

Of course, depending on your WordPress theme, your actual code might be different.

Feb 08

What is this?
This guide tells you how to install OSX 10.4.9 on your Intel or AMD Windows machine, dual booting with Vista. This guide is for information purposes only.

Why is this guide better than the previous ones I found here?
This revision is written for uphucks new install DVD and I cleared up all confusion about step 12.

Read this before reading the guide:
There are only two ways to install OSX 10.4.9 legally on your Windows computer:
1. Become an Apple developer
2. You can also buy an Intel Mac (I would recommend the Mac Pro!), install Windows Vista on it using Apple’s Boot Camp and remove OSX completely, so that you have a legally bought osx86 licence. This method isn’t confirmed and some people say it’s illegal because the EULA says that you aren’t allowed to install OSX on non-Apple hardware.
This means that for most people it is ILLEGAL to install osx on their computer. If you aren’t an Apple developer, leave page now. This site is in no way liable or responsible for the actions of its visitors.

IMPORTANT: DOWNLOADING OSX86 (a prepatched OSX 10.4.9 install image) IS ILLEGAL. Don’t ask me where you can download OSX86, not in a comment, not by e-mail, not by phone, not by sending a telegram and not by any other way you can imagine. Just don’t ask me. If you don’t know it and still want it, become an Apple developer or BUY A MAC!

EVEN MORE IMPORTANT: You need a processor that supports at least SSE2 to make this work.
You can check this with a program called CPU-Z (
http://cpuid.com/cpuz.php).

MINIMUM REQUIREMENTS

- processor that supports at least SSE2 (see above)
- prepatched OSX 10.4.9 install image (see step 1. for more info)
- Vista install DVD
- chain0 (search google, you’ll find it within a few seconds)

Free Web Hosting

Got at least SSE2? Go on and install and dual boot OSX 10.4.9 and Vista on your computer!

1. Get a prepatched OSX 10.4.9 install image. Search for ‘uphuck’ on usenet or bittorrent for more information about this: don’t ask me where you can find it!

2. Burn the image to an empty DVD recordable (+R or –R, no rewritable dvd!)

Use your favorite burn program for this (I recommend Nero Burning Rom or Alcohol 120%)

3. Create at least 6GB of unallocated space:

- Press the windows logo in the bottom left corner of you screen (assuming that you’re using Windows Vista)
- Right click ‘computer’ and select ‘manage’
- Select ‘Disk Management’ in the ‘Computer Management’ screen.
- Select a partition with at least 6GB of free space
- Right click it and hit ’shrink volume”, type in the amount of space to shrink (at least 6GB) and hit ‘Shrink’.
- Close all open windows.

4. Hit WINDOWS BUTTON + R and type ‘diskpart’ (without quotes)

5. Type in (press enter after you typed in a line):

list disk
select disk [the number of your disk]
create partition primary id=af
list partition
select partition [the number of your new osx partition]
active (if this doesn’t work, try ’set active’ without quotes)

6. Insert the OSX install disk and reboot your computer, follow the installation steps on your screen. Read everything carefully and select the right packages!

7. After finishing the installation, OSX should boot up. Play with it for a few moments and then proceed to the next step.

8. Insert your Vista install disk and press reboot. Boot up Vista’s install disk.

9. After booting the install disk, click repair system and press next. Open the command window and type ‘diskpart’. Then type:

list disk
select disk [the number of your disk]
list partition
select partition [the number of your windows partition]
active (if this doesn’t work, try ’set active’ without quotes)

10. Reboot into Windows Vista.

11. Copy chain0 to the root of the Vista partition (mostly C:/)

12. Press WIN+R and type ‘cmd’. And type:

bcdedit /copy {current} /d “Mac OS X” (just leave the {current} there and don’t change it)
bcdedit /enum active
bcdedit /set [ID] PATH \chain0 (replace [ID] with you identifier: http://janschneiders.googlepages.com/idosx.gif)

13. Now you can reboot your computer and you’ll see a nice dual boot menu!

14. You now have a fully working OSX 10.4.9 system.

15. Go to this page for tips about making OSX faster and changing the resolution. If you want support, If you want support, head over to our IRC channel and ask your question! To make things easier, please provide all information that you can give when asking a question (computer specifications, screenshot or photo of the error, previous Tiger installs worked (yes/no) etc.)

Free Web Hosting

...