Friday, November 30, 2007
Fixed: ExpressionEngine index.php Include Method Pagination Error
I did a lot of cleaning up today on this website, such as removing the little bugs and making it conform the the XHTML 1.0 Strict Doctype. (It appears that most pages work, with the exception of the Amazon affiliate links for my individual book review pages. But I’m not too concerned about that.) The Firefox Web Developer toolbar was invaluable for this process.
One of the things I discovered was two of my pagination links on the bottom of my homepage did not work. These are dynamically generated, and I suspected it had something to do with how I have EE configured to remove index.php from the URL. When I typed in http://annekowalski.com/P5/ I would get a 404 error. But when I typed in http://annekowalski.com/P10/ I wouldn’t.
If I wrote it as http://annekowalski.com/index.php/P5/ I would get the correct page, no errors.
It turns out that there’s a little bug, at least for my situation, with how the code for the .htaccess is written. I am using the include method, and the wiki for this section has the last conditionals written as P[0-9]{2,8}. It worked when I changed it to P[0-9]{1,8} , as described in an EE forums post.
I wonder why it is written that way in the wiki, when other people seem to be having the same problem with the first two page links not working.
ExpressionEngine • Comments (0) • Trackbacks (0) • Permalink
Tuesday, November 27, 2007
IE 6 Funeral
As far as I’m concerned, it can’t happen soon enough.
IE 7 has been out for about a year, and the machines at the college I’m at are still running IE 6. I guess I have to wait for the next version of IE to come out before I can safely drop support for IE 6…
Sunday, November 25, 2007
Exploring EE Custom Weblog Fields and Pagination
I’ve done a bit more work on my Library and Portfolio sections today. This time I focused on custom weblog fields and explored different ways of handling pagination.
Custom weblog fields
For the library section I decided to change the look of the thumbnail page slightly, and add a review page for each book. This is the first time I experimented with the custom weblog field option, which is really neat. I think I finally understand the whole “EE is whatever you want it to be” now. Out of the box it is suited best for a blog site, which is why I guess it gets sometimes gets stuck in this category.
Just think of custom weblog fields as separate storage areas for your content.
Out of the box EE comes with three default weblog fields: summary, body, and extended text. An example of the way this would be set up on a blog site would be that there would be two templates: a homepage template, and an article template. The teaser (summary) for an entry appears on the homepage. This entry has a link on the bottom, such as “Read More” or “Complete Article”, which when clicked takes you to the full article. The full article page, in the article template, would have the body text, and perhaps the extended text. (The extended text could contain something like photos for the article.) Again, any content you somehow want sectioned off can be assigned a custom field.
Setting up a library with custom weblog fields
For my particular situation, I organized the library section with five custom fields: Book Cover, Buy Link, Author, Review, and ISBN. I also had two main templates for my library section: the index page (thumbnails of my books) and the individual review page. On my index page, I arranged my books as thumbnails with the only the book cover weblog field displayed. When either a title or book cover is clicked, it brings the reader to the review page for that particular title (which uses the review template). In my review template, I call all of my custom weblog fields: the book cover, author, ISBN, buy link, and review text. Each has their own CSS style(s) for formatting.
I would definitely recommend that anyone read more about custom fields before they start building a site with EE. It makes organizing the data on your site much easier. I found the EE documentation for this section wasn’t very helpful in showing practical application, but searching the forums reveals some very creative ways people have used custom fields.
Creating Gallery Pagination
The major renovations on my portfolio section were adding pagination links and fixing the category lookup. (Now, when a category link is clicked, thumbnails of the section are shown instead of the category page listing.)
With pagination, there’s two methods to consider: using the paginate tag, and Next/Previous entry linking.
Here’s the difference: the paginate tag is for when you have a bunch of entries generated, and only want to display a certain number at any given time. It defines a cutoff point for the amount of entries. Next/Previous entry linking is for linking to the previous and next entries relative to one specific entry. (This is applicable to comments as well.)
I made the mistake of trying to use the paginate tag as the navigation for my portfolio, and then wondered why I had such weird results. I needed to use Next/Previous entry linking instead.
Since Next/Previous entry linking is independent, you should define the weblog you want to link to. (In my case I added the weblog="portfolio" parameter to the tag so that only entries from my portfolio weblog would be linked.)
Reading the two user documents I have linked to above should answer most questions about how to use the pagination and Next/Previous entry linking methods.
ExpressionEngine • Comments (0) • Trackbacks (0) • Permalink
Monday, November 19, 2007
Blondes Aren’t Dumb, Men Are
From the WSJ:
A study published in the Journal of Experimental Psychology found that men’s scores fell in tests after they had been shown a picture of a fair-headed woman. Further analysis ruled out that the poor performance came down to any distraction the image might have caused. Instead, the subjects “mimic the unconscious stereotype of the dumb blonde,” said Thierry Meyer, joint author of the study and professor of social psychology at the University of Paris X-Nanterre.
As a blonde chick this amuses me to no end.
Uncategorized • Comments (0) • Trackbacks (0) • Permalink
Wednesday, November 14, 2007
ABC PhotoLab
A couple of days ago I uploaded and ordered prints of a few of my photos at ABC PhotoLab. I got them back today, and they look great. If you look at their pricing they are pretty competitive. Cheaper than Shutterfly by a significant amount. The only issue I had was that at the end of the checkout, after I entered my CC number I got a server error message. But I guess it didn’t matter in the end because I got my order.
I was thinking of getting one of those dye sublimation printers, but it seems easier and cheaper in the end to just have them printed at a lab.
Photography • Comments (0) • Trackbacks (0) • Permalink
