Saturday, December 31, 2011

Bushnell Trophy Cam XLT

The Bushnell Trophy Cam XLT is a stout little box, which seals up tight and reminds me of an "otter box". It has a highly sensitive Passive Infra-red sensor, it appears on high sensitivity mode that this sensor is activated by movement up to 50 yards away. Below are some pictures captured at different times of day under different conditions, original pics are much larger (8MB 3kx2k res or so)

night time shot
day time shot with plenty of light

next I'll try video ...

Sunday, December 11, 2011

convert phpbb to wordpress to blogger

I was in the search for a script or service that would assist me in not only migrating from phpbb to wordpress but actually to migrate from phpbb to blogger.

My first hurdle was the quality of responses on the internet, for some reason people couldn't understand the need to migrate data from a forum to a blog stating that these were very different systems.

You might want to rethink if you cant;
  • understand the need
or make the connection between
  • forum labels and blog tags
  • forum topics and blog posts
  • forum replies and blog comments
I see a service out there that makes you request a quote and apparently they base their price on the size of your data? say what?

Anyway, below is a quick and dirty sql script to go from phpbb2 to wordpress, use at your own risk

steps;
  1. get a working environment with mysql (I installed WAMPstack)
  2. import your phpbb db
  3. install wordpress
  4. edit and run the following on your mysql db
    begin;

    insert into wp_users (
    id,
    user_login,
    user_pass,
    user_nicename,
    user_email,
    user_url,
    user_registered,
    user_activation_key,
    user_status,
    display_name
    )
    select
    user_id,
    username,
    user_password,
    username,
    user_email,
    user_website,
    from_unixtime(user_regdate),
    'xxx',
    0,
    username
    from phpbb_users;

    insert into wp_posts (
    id,
    post_author, -- userid
    post_date_gmt,
    post_content,
    post_title,
    post_status,
    comment_status, -- open
    ping_status, -- open
    post_name,
    post_type
    )
    select
    p.topic_id,
    p.poster_id,
    from_unixtime(p.post_time),
    pt.post_text,
    pt.post_subject,
    'publish',
    'open',
    'open',
    pt.post_subject,
    'post'
    from phpbb_posts p
    join phpbb_posts_text pt ON p.post_id = pt.post_id
    where p.post_id in (
    select min(sp.post_id)
    from phpbb_posts as sp
    where sp.topic_id = p.topic_id
    )
    -- and p.forum_id in ();

    insert into wp_comments (
    comment_post_id,
    comment_author,
    comment_author_email,
    comment_author_url,
    comment_date,
    comment_content,
    comment_approved
    )
    select
    p.topic_id,
    u.username,
    u.user_email,
    u.user_website,
    from_unixtime(.p.post_time),
    pt.post_text,
    1
    from phpbb_posts p
    join phpbb_posts_text pt ON p.post_id = pt.post_id
    join phpbb_users u on p.poster_id = u.user_id
    where p.post_id not in (
    select min(sp.post_id)
    from phpbb_posts as sp
    where sp.topic_id = p.topic_id
    )
    -- and p.forum_id in ();

    insert into wp_terms (
    term_id,
    name,
    slug
    )
    select distinct
    forum_id,
    forum_name,
    forum_name from phpbb_forums
    --where forum_id in ();

    insert into wp_term_taxonomy (
    term_taxonomy_id,
    term_id,
    taxonomy
    )
    select forum_id, forum_id, 'category' from phpbb_forums
    -- where forum_id in ();


    insert into wp_term_relationships (
    object_id,
    term_taxonomy_id
    )
    select distinct topic_id, forum_id from phpbb_posts
    --where forum_id in ();

    commit;
  5. login to your wordpress admin
  6. confirm posts / comments
  7. export (under tools)
  8. convert your wordpress export at http://wordpress2blogger.appspot.com/
  9. import your converted wordpress export in bloggger