Setting Up EE

Tuesday, May 18, 2004

Background

  • I moved my blog from pMachine Pro to Expression Engine, and I had a lot of things to comment along the way, so I made it into a post. I also use LiveJournal.

Installation

  • EASY. Upload, chmod files, run installation script, done! I sure am getting used to installing scripts.

Importing pMachine entries

  • NOT FUN. The time zone that my webhost server is on is different from the time zone that I'm in. I'm in the EST zone, with daylight savings time, and that's what I put in the EE configuration when I was installing. When I imported my data from pMachine, I noticed all the post times for the entries were 4 hours off. I didn't like that, and I didn't want to delete 790+ of imported entries and lose those ID numbers in the database (because I'm picky) so I deleted the database and went through the installation process again, trying to guess the correct time zone to use. It took me THREE more tries to get it right! Which takes longer than you might think because I had to add in all the categories and set up the custom fields. (I finally figured out the correct setting - webhost's server is in PST, but not with daylight savings time) Other than that as far as I can tell the import worked fine.

Matching up of pMachine fields to EE fields

  • Blurb - Blurb
  • Body - Body
  • More - More (which was originally Extended Text, I renamed it to More because I was used to calling it that anyway)
  • Custom1 - Music (new field, I'll have to fix this later)
  • Custom2 - More Title (new field)

My Custom Fields

Music

  • will hold the current song I'm listening to, just like in LiveJournal
  • field type: textarea, no formatting. I would have liked it to be of type Text Input (as I can't imagine putting anything too long in there), but the pMachine import wouldn't let me. Understandable, since data coming in could be longer
  • problem is in pMachine I used the Custom1 field to hold both current music and current mood, so I'll have to manually edit them and move the mood data to another field
  • queried the database in phpMyAdmin and there's 491 entries to do - Ack

Mood

  • now this is really exciting!
  • this will hold my current mood, as in LJ
  • field type: dropdown
  • select options - I just copied a list of moods from LJ. Which is PERFECT, because it makes it easy to select a mood, AND I get to use my LJ mood themes on my blog!
  • disadvantage: will have to manually update moods on previous posts. I'm debating whether I should even bother with the older entries

More Title

  • as implemented in my pMachine blog, except with EE I expect there won't be as much hacking to get it set up
  • field type: Textarea, again because of pMachine import, otherwise I would have had it as a Text Input too

Notes on Custom Fields

  • if you're going to use text input as the field type, you have to type in something in the "Maxlength" area. Otherwise you can't type anything in there when you want to make a post.
  • text input field type is restricted to 127 characters
  • cannot change from one field type to another

Thoughts on Default templates

  • comment count and trackback count are before the comment link and trackback link, but I am used to them afterwards, e.g. Comments (2) instead of (2) Comments. It is very annoying, because I keep on clicking on the wrong link, I am going to have to change this.
  • I had a huge scare when I looked in the weblog and I couldn't find my "more" text. Maybe it wasn't imported properly? I looked in the permalink and comments page. I ended up checking the database before I realized that maybe the "more" text wasn't shown because of the template and not because it didn't exist. Added { more } to the comments page and it showed up (whew!)
  • conclusion: default templates look nice, but I'm going to have to redo the templates completely.

Yet Another Thought

  • if I end up getting this set up the way that I'd like it, it would be really hard to switch to another system, because of all the custom fields etc. Is that a good thing or a bad thing? Not that I am planning on switching soon, since it took me a while to get this all figured out.
  • with custom fields there is no way to move entries from one blog to another, which sucks because I liked that feature in pMachine sad

Setting up another blog

  • it was easy enough to create a new weblog, a new category group and a new template group. Then I had to assign the new groups to the new weblog.
  • had to repeat this step 4 times, as I had 4 other blogs to import in

Blog URLs

  • renamed index.php to just index, because the current URL structure index.php/weblog/comments makes it look like index.php is a directory
  • process was simple enough
  • it's going to be a pain to update all old entries to reflect new permalink URLs, but it has to be done

Templates

  • template notes are useful as a scratchpad
  • I won't need revision history, especially this stage when I'm playing with templates
  • old blog was skinnable, so new blog should be too, but will forget about skinning for now
  • time to really read through the user guide!

Learning template tags

  • started by looking at the current index template and looking up each tag that was used in the docs
  • tedious, but it worked (see useful tool)
  • then went to pMachine template and index.php file and compared the two to the new EE template
  • cut and pasted parts of old template/file into new template
  • to simulate static pBlocks in pMachine, I created new template group called "common", and then added a new template for each pBlock, and used them through the embed tag
  • played around a lot - would add just one parameter to a tag and refresh to see what it did smile

Mood Theme Again

  • yep, ended up editing ALL of the entries and updating the current mood
  • used global variables to hold a) the directory of where the mood theme images were b) image width c) image height d) image files extension (e.g. gif, jpg) as I have several I could use
  • went back and added a new line in my custom field select option called NONE, which would be the default when I don't select a mood
  • code goes something like this:
    {if mood!='NONE'}
    <div class="entryMood">
    <img src="{mood_theme_location}{mood}{mood_theme_ext}" width="{mood_theme_width}" height="{mood_theme_height}" alt="{mood}" />
    <br />{mood}</div>
    {/if}

More Title Again

  • code goes something like this:
    {if more!=""}
    {if more_title!=""}
    ( <a href="{title_permalink="weblog/comments"}" class="more">{more_title}</a> )
    {/if}
    {if more_title==""}
    ( <a href="{title_permalink="weblog/comments"}" class="more">Read more...</a> )
    {/if}
    {/if}

Emoticons

  • changed the default smiley pictures by editing system/modules/emoticon/emoticons.php
  • then had to edit mod.emoticon.php and mcp.emoticon.php because they both had border="0" and that doesn't validate under XHTML strict

Notes on templates

  • had this problem where I have a template called "archives" and a weblog entry called "archives". I think EE got confused about which to call when I tried to access my index/archives page. It took me more than I day to realize what the problem was
  • conditional variables only have if, and not else, but I can get around that by calling another if
  • love the backspace parameter!
  • the "type of template" part (web page, css stylesheet or rss page) is a worded a bit strangely, especially in the case of sub-templates. My sub-templates are just code snippets that exist specifically to be embedded into another template, so they aren't actual "web pages" in themselves. And yet if you knew how to access the sub-templates (e.g. /index.php/sub/template1) you would be able to access it.
  • really dislike the implementation of weblog archives, because it's impossible to style! (Had to use very messy CSS)

Non-Weblog Content

  • EE really is a CMS
  • so should I create a weblog and template group to manage non-weblog content, or leave things as is (i.e. out of EE)?
  • I decided to go with a weblog
  • took me a LONG time to figure out how I would go about it

Non-Weblog Content Implementation

  • use of URL segments
  • I have two non-weblog "sections" - an about the site section, an about me section
  • created a new weblog, pages, where I will post non-weblog content
  • each section = a category (about, girl)
  • also created a new template group
  • created a new template for each section
  • the idea is that in each template I will display all entries from a category (category id will have to be hard-coded)
  • got more complicated - maybe I should make another post on it instead tongue

Non-Weblog Content - Javascript

  • old site used to link to .js files for javascript functions
  • I wanted to be able to access them via EE
  • first thought of global variable, but I wanted to link to them
  • created a new template called javascript and set the template type as a CSS stylesheet

Multiple Blogs on Subdomains

  • had to hard code some URLs to get it to point to the right place
  • also had to change the cookie settings in the CP

The Final Transition

  • should I have imported my entries at the beginning instead of the end? On one hand it helped me figure out custom weblog fields etc, but on the other hand I was still posting on my old pMachine blog while working on this one - I had 4 new entries to import over
  • did it by dumping my pm_weblog database and editing out everything except for the last 4 entries, and then importing it into a temporary database and running the pMachine import utility again - it worked fine but the TIME ZONES WERE MESSED UP AGAIN! I wasn't as mad because it was only 4 entries to edit
  • also had to change the cookie settings in the CP
  • renaming the old pMachine references index.php?id=P1000 to index/some_entry - I edited as much as I could find through the search function, but I'm probably missing a few, but I'll deal with it when I find them

To Do

  • learn about plugins
  • install some useful plugins
  • implement calendar
  • change member templates
  • skinning!

Miscellaneous

  • no search function within the control panel - again, something missing from pMachine
  • duplicate titles - I was reading this discussion in the forums about not allowing duplicate titles - but I have multiple titles from my pMachine entries, but once I tried to edit a duplicate title entry it gave me a warning

In the End

  • Expression Engine rocks, it really does.
  • Trying to understand these new concepts and templates wasn't easy, but in the end it was worth it.

Comments & Trackbacks

Post a comment.

The trackback URL for this entry is:

Gravatar for Junaidi

1. Junaidi Australia said:

on May 27 2004 @ 08:38 AM

Hey there. i’m trying to import my posts from pMachine and came across the same timezone problems as you did. I managed to get the right time for the server time, but then some of my posts during certain months were 1 hour behind the post time. Did you have that problem too? I think I may have to manually edit all the affected posts, but if you know of a quicker way please let me know.

How did you deal with any links from your old site that have been crawled by search engines?

Thanks.

2. Trackback from Mama Write's Sideblog

on May 27 2004 @ 07:35 PM

Mama Write's Sideblog - Setting up ExpEng...
Avatar for Yvonne

3. Yvonne Canada said:

on May 28 2004 @ 12:30 AM

Junaidi – Hmmm, when I had the timezone problems it affected all of the entries, not just certain entries. You may have to just edit them manually. sad

As for dealing with old links, I was never really concerned with search engine hits etc. But I did add a permanent redirect (like this so when anyone tried to access my index.php file it’d be redirected to the new site.

Post a Comment

Commenting is not available in this weblog entry.

Live Preview

Avatar

Comment Author

Apr 24 2014 @ 12:33 PM