Stearns posts

Stearns: Internet Explorer workarounds

We’ve had to do a bit of work to get our site working properly in IE, mostly version 6. I’ve recently started using a conditional stylesheet just for IE6 on my own site, like:

<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url')?>/styleIE6.css" />
<![endif]-->

and we did the same for Stearns.

Box Model

One issue we dealt with for IE6 in the conditional stylesheet was box model issues. IE6 handles margins, padding, and borders differently than other browsers, so we compensated for this in some places. One big issue was with our floated columns: The third would float below the second on some wide pages.

Continue reading post "Stearns: Internet Explorer workarounds"

Worpress Page Template Next & Previous Links

I ran into this problem on the Stearns events and recipes pages, which both use custom templates pulling in posts from a particular category.  We use the query_posts() function on those pages.  The next_posts_link() and previous_posts_link() functions are used on normal multi-post pages to navigate through more items than appear on one page.  Using the query_posts() function without the paging, such as:

query_posts("cat=4&limit=5")

the paging doesn’t work at all: It just shows the same results for each page. To get this to work, you must tack on the “paged” parameter with the “$paged” wordpress php variable, like:

query_posts("cat=4&limit=5&paged=".$paged)

and pagination will work just fine. You can only do this for one set of items, but you’d want to break out to a separate page for multiple anyway.


Stearns: Slideshow, Media Tags

We wanted an image slideshow for our sidebar. I looked at some of the plugins available for doing this, but none looked to be exactly what we wanted, nor did they look very simple. I’ve worked with jQuery before with various image things, so I used it to build my own slideshow (building it in OO added to the development time, but it should be fairly versatile now). Then I had to get the appropriate images from WordPress to work with my javascript, which was quite a bit of work as well.

We want the images to easily be updatable by Stearns.  I don’t know why I was dead-set on having them be able to use the media library, but I was.  They could FTP files into a folder, which would be much easier for me.  But they might not even know how to do this, and letting them handle everything through the wordpress interface is preferable.  They’d have to crop and size them properly.  The images in the folder also wouldn’t have captions.  So I pressed on.

I thought perhaps I could have them update a gallery on a particular page, after having thought the gallery function wass very neat.  But it seems there is no way to add items from the media library to a gallery for a page (not in regular wordpress anyway) and I’m not sure that the “delete” link does what I want for removing items from the gallery (and I’m not willing to try).

Continue reading post "Stearns: Slideshow, Media Tags"

Stearns: Two Content Columns Per Page

Our layout has some pages with a three column layout and some pages with only two columns.  The left column is always the same, but the other two will have one or two columns based on individual page content.  For a while, we’ve had the third column on the home page and an empty third column on other pages, but we ran into troubles when we wanted to add the third column content to the other pages.

The columns use float to get their positioning and can’t be inside each other or the text from one would flow under the other.  A few options came to mind.  We tried closing template divs and opening others in the HTML editor of the page content: this did not work for us, somehow removing the background that was supplied by a wrapper.  It would be trouble for Stearns anyway.  We also tried removing the container for the center column from the template and putting one div into two column pages, two into three column pages.  This gave some difficulties with the editor, would require the divs on every page, and would be difficult for Stearns and us to work with.

Continue reading post "Stearns: Two Content Columns Per Page"

Stearns: Flutter now Magic Fields, Adminimize

Flutter/Magic Fields

Magic Fields is a fork of Flutter that is open source GPL and seems to have more active development going on.  It also seems to be much more streamlined and simplified.  It doesn’t have all of the features of Flutter, but I didn’t know what those features were anyway and wasn’t using them.  I switched to it for these reasons and in hopes that it would fix a problem I’m having.

The problem is that posts created outside of the Flutter write panels do not appear inside of that panels “Manage” pane, nor do posts on write panels that have no custom fields.  Two of the panels had no custom fields, and some items were not added with the write panel at all, so the “manage” panels were not working for us.  I discovered that Flutter associates its custom fields with posts in a particular table, and the “manage” pane only shows items in that table.

Moving to Magic Fields, I thought it might fix this.  They provide a script to move all panels and items from Flutter, which made that easy.  Unfortunately, the plugin still uses the same method of populating the “manage” panes, and so didn’t fix my problem at all.

I really just want that pane to have all items from the related category, whether they have populated custom fields or not, whether they were added through the write panel or the posts panel.  I may have to modify the plugin to make this happen.  Otherwise, I will have to somehow craft a script to find unassociated items from a given category, insert a custom field with the relevant name for that type, and then insert the cross-reference row.  That would be a complicated affair and would do nothing for new items created after the script is run.  But I am worried that not having an associated field set in the database will cause problems when those items are displayed.  We’ll see what I can manage and have time for.

Adminimize

This plugin was recommended by Kevin Behrens, maker of Role Scoper.  It allows removal of panels and individual items from the admin section based on role/group.  So far, I only have used it to remove the “Add New” pane of the posts section, but I think it will allow me to remove the HTML tab from TinyMCE as well as a few other things to clean up the interface for the Stearns folk.  The easier we make it for them, the better.


Stearns: Move, Menu, Flutter and Permissions

The Move

We finally bought the domain name and hosting account for Stearns, at stearnshomestead.com.  We were expecting them to want a .org due to their nonprofit status, but I guess they wanted the familiarity of the .com.  They have no company credit card, so Angela had to set up the account and will bill them for a check.  I don’t know what they’ll do in the future:  They’ll probably have to have one of their members do a similar thing.

We moved our WordPress install from its temporary location in a subfolder of one of Angela’s sites to the root of the new site.  There was perhaps a bit of trouble moving the site, but once we figured it out, the install worked perfectly.  To move, we transferred from one site to the other via FTP all site files.  We then used PHPMyAdmin to export the site data as SQL and then import it to the new site (didn’t have to use PHPMyAdmin for the new site, as the host has an import function in their control panel).  We then had to update the config file for WordPress to reference the new database.  Finally, we had to change two URLs in the options table in the database.  Everything now works.

Continue reading post "Stearns: Move, Menu, Flutter and Permissions"

Stearns: WordPress Custom Queries

For the Stearns site, we need to list upcoming events on the home page.  Using Flutter, I created a custom write panel for the events (and other items).  The events are simply posts that have a custom date field attached to them.

I was attempting to use the “query_posts()” function to get the posts I need.  I discovered that it is possible to use this function multiple times on a single page.  I previously thought you were unable to because of “the loop”, but you only have to make a few accommodations for the page name and other such WordPress variables getting changed.  I was able to use this to output the page data on our home page plus two categories of posts.

Unfortunately, “query_posts()” allows limiting by category and sorting by a custom key, but no less than, greater than, or other such comparisons with the meta key [wrong, see end of post].  So I decided to make my own SQL query, to be run with the “$wp_db->get_results()” function.  The function allows a straight SQL query to be run.  Then some other functions are used to put the result set into “the loop”.  So, the code to run my custom query looks like the following:

Continue reading post "Stearns: WordPress Custom Queries"

Stearns: Using WordPress as CMS

I mentioned my concerns of using WordPress as a CMS in a previous post, but now it is getting to be the time to find solutions to our problems.  We have installed a test wordpress site and have begun working on it.  The style is still bare, but I am looking at functionality issues.  I used those links from the previous post plus some other sites found on Google to find potential solutions.  I haven’t made any final decisions yet on what should work for us, but I’ll document some of my considerations

Events and Recipes

One issue we will have is needing custom data fields for the events and the recipes.  WordPress has custom fields built in, but it would be best if the fields could be there automatically, without them having to add them and get the names exactly right each time.

Flutter is one plugin solution that looks nice.  It allows custom write panels to be created in the admin section, so that events or recipes could be managed and added separately from the normal posts.  It allows custom fields to be defined for each panel as well.  It even allows data types to be defined, so dates for the events could be entered easily.  It does have some issues, such as some bugginess and rumored slowness when post numbers get high.  This did sell me on the custom write panel idea though.

Continue reading post "Stearns: Using WordPress as CMS"

Nonprofit Donation Services

I am researching services that will take online donations for nonprofits. There seem to be many available, but it is hard to find good information on them. I found a large list at The Nonprofit Matrix.  Unfortunately, unlike most matrixes, it doesn’t organize them or allow easy comparisons.

From a previous Web II class, a student named Sarah found Justgive.org.  It seems to be the best that I’ve found yet.  Some have lower transaction fees but much higher (than free) monthly fees.  Since Stearns will likely not get enough to offset those monthly fees, it makes sense to go with Justgive.  Some Details:

  • Cost: no setup fee, no monthly fees, 3% transaction fee
  • Services: Collects online donations using credit cards (of course).  Provides a tax receipt for the donor, allows recurring donations to be made, maintains a donor list for the organization, and mails checks of earnings monthly.
  • Reviews: Forbes, FoundationCenter, KillerStartups
  • Example sites using: SMSFolk.org (justgive page)

If I find more information, I will update this post or link to another.

[Update] A comparison table can be found at AffinityResources with many options and their fees.  An article discusses the options (generally, not specifically).  Another unrelated article discusses options, with more information about building your own donation app versus using an external one.  Still, justgive seems the best option.[/update]

[Update 11/06]Google Checkout seems to offer a nonprofit option for accepting donations.  This one has 30¢ plus 2.9% transaction fee.  High volumes (greater that $3000 a month) get lower transaction fees, but I highly doubt Stearns will get there.  Google has an API for putting a form on your site and has the recognition of Google, but it doesn’t have special tax receipts that I’m aware of, doesn’t have a donors list that I’m aware of, requires regestration with Google (stores credit card, etc), and evidently states require some sort of registration with them that places like JustGive have taken care of (since they are pass-through).  These legal concerns are things I’m unsure about.  Paypal seems to be about the same.[/update]


Stearns Design Mockup Chosen

On Monday we met with Debbie to show off our design mockups.  Wednesday Debbie came back, bringing in three board members who would need to be involved in the decision.  They discussed various things about the site, including what it will be including and what they have for it.

They also were ready to make a decision on the mockup they wanted.  They had done some user testing of the mockups.  Rocki’s was chosen.  It has a picture of the front of the farm in the header, which they liked because it would be the first thing you’d see if you went there.  But they did want some changes to it.  They wanted a lighter brown for the wood grain that makes up the other part of the header.  They wanted a more solid navigation menu rather than the hanging signs currently in use.  And they wanted a less cluttered appearance for the home page.

They gave Jason’s second place.  His was very clean, also using a wood grain and a horizontal drop-down menu.  His drop-down seemed to be more along the lines of what they wanted, so something like that may be placed into Rocki’s.  Many of us were thinking that Jason’s would be chosen.  But you can never be sure.

So finally we will get to start building the actual site.  This should be the fun part, certainly the part that I have more experience with.  The site will be built using WordPress, so there won’t be a lot of actual programming most likely.  We may need to figure out how to interface other data with WordPress and add admin pages for it.  We will certainly need to figure out how to use “feeds” to get the information we want where we want it.  We’ll need to figure out how to set everything up so that it is easy for them to update.  Most of this should be doable within WordPress or using plugins, no hardcore programming. We’ll see though.

A lot of time will certainly be spent turning Rocki’s Photoshop theme into a real WordPress theme.  Then of course there is the insertion of the pages and filling them with content.  It will need to be organized in a way that will be easy to update for the Stearns people.  This may be hard.

I’m looking forward to some fun and some learning.