I’d like to jot down some experiences using SiteGrinder 2 and how one might integrate it into a WordPress theme. Specifically I am interested in using SiteGrinder’s “-grow” hint to allow for WordPress content. So far my experience has been that it’s a slightly challenging maneuver.

This is still REALLY rough, but here’s what I’ve discovered so far. My overall plan involves modifying an existing WordPress theme so that the WordPress header and footer are more or less replaced with the SiteGrinder header and footer. You can also do this with SiteGrinder’s -xmedia hint and the “require PHP” option, but I’ll save that for another post.

Steps

  1. Design a site in Photoshop. Think in terms of (a) the stuff at the top of the page, (b) where the WordPress content will go, and (c) what stuff will get pushed down when the WP content grows.
  2. Draw a text box where the WP content in its own layer. Add the hints “-text” and “-grow” to the end of this layer’s name. Layers with content above this text box will not get pushed down with the WP content. Also, any layers with stuff that vertically intersects this text box will not get pushed down. But any layers with stuff below the text box will get pushed down as the WP content grows. Put the text “FOO” in that text box.
  3. Run the SiteGrinder plugin and build the site. This will give you (a) an HTML file named after your photoshop file, (b) a common.css file, and (c) a media folder with all your SiteGrinded images.
  4. Install a simple theme on your WordPress site. We’ll remove the header and footer, so pick one based on the middle bits. Or duplicate one of the default themes and edit the top comments of “style.css” in order to give it a distinct theme name.
  5. Upload the media folder and the common.css file to the theme’s directory on the web server.
  6. Open up the WP theme’s header.php file. Add a link to the new common.css file after all the other .css includes. You know, something like:
    <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/common.css" type="text/css" media="screen" />
  7. Open the SiteGrinder HTML file and copy the code beginning from (but not including) the <body> tag, through to the word “FOO”. Back in header.php, paste in the SiteGrinder html you copied, right at the end of the file.
  8. Disable the theme’s header elements by enclosing them in comments: <!– –> Leave in the container, content divs?
  9. Open footer.php. We’re going to copy some more code from the SiteGrinder html file, so make sure that’s open too. Copy the SiteGrinder html from the text “FOO” through to just before the </body> tag. Paste it into footer.php at the top of the file.
  10. Disable the theme’s footer elements with comment brackets.
  11. In some case you may have to change the name of a SiteGrinder div such as “footer” if the name is already in use in the php file. Make sure to change in the common.css file too.

Still Very Rough, not meant for actual use yet.

Special Note to frustrated users of require PHP! If you can’t figure out where the option to choose “require PHP” is, then you’re like me and probably wasted shit-tons of time searching the forums for where it is. You click on the thing everyone tells you to click on, but all it says is “No Match”. WTF? Well, it turns out you have to type the name of a php file (eg, “wtf.php”) into the text field first, followed by clicking Update. Then everything changes, and “require PHP” is automatically selected. Pretty intuitive huh?! No, not really. YAY!

· · · ◊ ◊ ◊ · · ·

So I started investigating and playing around with custom cursor pointers embedded in web pages. It seems like there’s two distinct approaches:

  1. Actually change the OS’s default cursor using a .cur or .ani file referenced as a url in the CSS
  2. Make a small image (or chain of images) follow the cursor around, probably using the onMouseMove function or something

The problem with (2) is that the default OS cursor still remain on the screen. There may be a way to change the OS cursor to a crosshair or something to make it less visible, though.

The problem with (1) is that it only seems to work on Internet Explorer 6 and higher.

But anyway, here’s what you do to achieve the first (1) one:

  1. Make a custom cursor using a cursor editing program. I downloaded one called “Sib Cursor Editor” by sibcode.com (good name, guys) and it’s pretty decent. Save the cursor as a .cur or .ani file. Let’s say it’s “foo.cur”.
  2. Upload the cursor file to your site, how about in the same dir as the page.
  3. Add the following code to the HEAD section of the web page:
    <style>
    <!--
    BODY{
    cursor:url(\"foo.cur\");
    }
    -->
    </style>
  4. Open the page in IE 6+

Yeah!

· · · ◊ ◊ ◊ · · ·

It’s sort of involved, but not too bad.

  1. Log in to Crystaltech’s webcontrol center at: http://www.webcontrolcenter.com/
  2. Click on DNS>Domain Registration Admin
  3. For the domain in question, select the Registry Key Code, press Ctrl-C to copy it to the clipboard, and click on the Manage link. This is basically a link to Melbourne IT.
  4. On Melbourne’s site, enter the domain name and press Ctrl-V to paste the registry key code.
  5. Click on Transfer Management to Melbourne and follow those steps.
  6. View all domains, and click on the domain in question to Manage it.
  7. Click on Change Nameservers and set them to ns1.bluehost.com and ns2.bluehost.com, and click Continue.
  8. Click on View Domain Password. It will appear in orange at the top-right of the screen. Took me a sec to find it at first! Select it and Copy it to the clipboard.
  9. Log in to Bluehost’s control center at: http://www.bluehost.com/
  10. Click on Transfer Domain.
  11. Enter the domain name in question and click Proceed.
  12. Paste the Registry Auth Code into the box and click Email The Code. Now a Proceed button should appear at the very bottom of this long page.
  13. Click the Proceed button!
  14. Pay for the transfer and 1 year extension ($10).
  15. Go back to the Bluehost control panel and click on Addon Domains. Fill out the form and click Add Domain.
  16. Go back to Crystaltech’s webcontrol center and remove the domain from DNS>Extra Domain Admin by clicking Delete.

Bye.

· · · ◊ ◊ ◊ · · ·
  1. Go to http://www.google.com/analytics/
  2. Apparently an Analytics account is associated with a Google or gmail account. Probly multiple sites per Google account, who knows. So, that’s needed.
  3. Then you fill out some personal information with which you hope Google won’t do anything evil.
  4. Finally you get a snippet of code that you stick in the footer.php of your WordPress blog. Put it before the </body> tag.
  5. The Google Analytics site will now show you a table with your site listed. Apparently it takes several hours for the stats to start showing up.

Sites
http://wordpress.tv/2009/05/29/getting-started-with-google-analytics/
http://www.google.com/analytics/

· · · ◊ ◊ ◊ · · ·
Categories
Archives
 
February 2012
M T W T F S S
« Jan    
 12345
6789101112
13141516171819
20212223242526
272829