magicFields posts

Canine: WordPress Custom Searches

The WordPress search by default looks through the title and content of all available posts and pages for given query words. But sometimes you might want to only search a certain category or search custom fields or some other criteria. On the Canine Lifeline site, we have a dog section where we want to be able to list dogs based on a number of parameters, such as age, gender, adoption status, et cetera. We are currently storing dogs as posts in a particular category, and using Magic Fields to add custom fields for various aspects of each dog.

WordPress sends search queries as GET requests from its search form. The “s” variable contains the search query, but others are allowed. In fact, if you’re familiar with the “query_posts” function, many of the parameters for that are available, and the rest can be enabled, because the search is basically just a regular WordPress query with parameters appended from the GET variables.

Continue reading post "Canine: WordPress Custom Searches"

Canine Lifeline: Meeting and Start

Jason and I have begun work on the Canine Lifeline site I had mentioned as a freelance project.  It will be for free (they are a non-profit) but will be good experience and we will get our names and links in the footer.  As our first project outside of school together and my first real freelance project altogether, the experience should be great and free should make it more relaxed.

We met with the clients on Sunday to discuss the project.  We met at Yours Truly in Valley View and discussed the site over lunch.  They all were very nice and seemed to know a good bit about websites and what they want, which should help a lot.  They gave a good idea of the functionality and content they wanted, as well as some basic thematic ideas.

Their current site is a simple four pager built with a template and hosted for free with adverts.  We will be building a many-page CMS for them, using WordPress after our experiences with the Stearns project, so they can make frequent updates.  They want a dynamic site that entices people to visit frequently for updates.  They, like Stearns, will need some custom data types, so I will be using Magic Fields again as well as trying out Pod CMS, which should allow for more complex uses of data.  We shouldn’t need multi-column pages for this site, so we hopefully won’t run into the TinyMCE editor troubles we had with Stearns.

Stylistically, they want a blend of professional looking with bright and colorful.  Since Jason is the designer of our duo, I will let him handle most of the theme design while I work on the functionality of the site.  I do want to at least give a try at a couple of hand drawn mockups though.

Since this is about all I have going on, I will continue to post about this project, how its going, and anything I discover from it.


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.