Sunday, March 30, 2008

complete workflow for transfering wordpress site to iis

this workflow assumes you are using the WP-DB-Backup plugin (I highly recommend) to backups of your mysql/wordpress db. Also am assuming that you use the mysql gui tools to interact with your desktop db (also highly recommended)

  1. do a database backup with WP-DB-Backup
    1. optional: save the archived .gz in your backups folder, nested inside a dated directory, and expand here ... you will need to expand this either way
    2. expand downloaded .gz if you didn't do it in 1.1
  2. download wp folder (or whatever the name of your root install is) via ftp
    1. optional: download this into your backups folder, nested inside a dated directory. Copy the wp directory to your inetpub folder
    2. if haven't already done so in 2.1, move wp directory into inetpub folder
    3. change permissions on this folder so that user has read/script execute permissions on all child objects
  3. open up mysql query browser
    1. make your wp schema default (or create one if you don't already have a schema for wp)
    2. next, file > open script > [browse to path of (expanded) .sql file saved with WP-DB-Backup]
    3. execute this query
    4. inside the wp_options change the following parameters to equal your new localhost install rather than the previous web install
      1. siteurl
      2. home
      3. any other options from plugins which have an external path defined

Sunday, March 16, 2008

Adding a 3rd sidebar

I've begun adding a 3rd sidebar to my theme as a first step towards figuring out how to add widgets outside of sidebars. While it took me an hour or two to figure this out, the solution is quite simple. This post helped a lot.

  1. Duplicate sidebar.php within your theme folder. This will become your new sidebar.
  2. Remove all code between the php if function_exists tags. Also remove all except one li block (having class=widget)
  3. So far your code might look like this:
    1. <div id="new_sidebar">
      <ul class="sidebar_list">
      <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar(1)) : ?>
      <li class="widget">
      <h2>Blah</h2>
      <ul>
      Blah Blah
      </ul>
      </li>
      <?php endif; ?>
      </ul>
      </div>

  4. Next you will need to change two parameters so that wordpress knows it is looking for 3 (or more) sidebars each with an id 1-3
    1. First you will need to change the id parameter of the dynamic_sidebar function on each sidebar.php file for example you can see that the dynamic_sidebar function below has a parameter of 1 ... thus this sidebar.php file should relate to sidebar id 1 ... each sidebar.php should have a different integer here from 1-3 (for three sidebars)

      1. <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar(1)) : ?>
    2. Next we will change the parameter of the register_sidebars function (which is normally in functions.php but may be elsewhere in your wp install) to 3 (since we have three sidebars to register)
      1. register_sidebars(3);

Thursday, March 6, 2008

SWF Flash Maps

Are SWF maps worthwhile, or just a gimmick?

Many sites have been putting up some pretty slick SWF maps lately, and the big map api's (google, yahoo, mapquest -- ve?) have followed suite. There's obviously something cool about these SWF maps. However, when I tried to figure out if it would be worth creating one for the most recent CML application, I was hard pressed to figure out how to make a flash map do what I want it to to do, and would it be worth it. Therefore, I figured it would be useful to describe why these flash maps are cool: its because they're vectorized and all geometries are fully loaded after the flash is loaded. This allows all sorts of interaction with individual elements -- elements which don't need to be pulled from remote store. Yet, a prime concern also seems to be more control over styling, and quick integration with other adobe cs tools.

but for a site which needs to generate vectors on the fly from a spatial database, which would then be loaded into the map, is flash still worthwhile? the speed of static geometries would be sacrificed, much of the non-map ui enhancements done in flash can be replicated by using scriptaculus. Other features must be considered.

Especially consider the NYC Subway map -- very nice -- if I can get something like this working, it would be well worth doing in flash -- still though, none of these geographies are generated on the fly.

OOOOH ... I THINK WE JUST NEED TO INCLUDE ALL VECTORS AND JUST TURN THEM ON AND OFF BASED ON ATTRIBUTES IN THE DB OR XML!!!!


Check out these links:
http://www.onnyturf.com/subway/
http://coenraets.org/blog/2006/06/google-maps-collaboration-using-flex-flash-media-server-and-ajax-updated-for-flex-2-ga/
http://justin.everett-church.com/index.php/2005/11/08/maps-that-are-consistent-with-your-design/
http://developer.yahoo.com/flash/maps/
http://map.uoregon.edu/
http://www.theweathernetwork.com/