WWW posts page 42

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"

Javascript: Literal value function parameters

I’ve been messing around with Javascript a bit lately, creating an AJAX object just now, doing stuff for school as well. One of my classes is very much focused on Javascript. I’ve noticed JQuery and some other examples making use of a single JSONesque (javascript literal values, of which JSON is a subset) parameter for functions to allow many parameters to be entered. They are all potentially optional and can be in no particular order. Seems wonderful, especially for Javascript, where there’s no overloading of functions. This is sort of what I thought Objective C would allow, since it requires naming of all variables. Unfortunately, objective C requires them to be named as well as in the exact order, and none can be missing unless they’re optional and at the end, so it is really just a pain there. But in Javascript, this method does indeed allow what I want. So you do have to know the exact parameter names, but don’t have to remember order, and can just as easily not put in parameters if the function will operate without.

It’s rather simple to handle. I was even able to modify an already in use function to use one literal value parameter or the many that it originally used, simply by checking the arguments.length function property to see if it is one, and populating the appropriate variables if so. So to handle the properties, they are appended to the argument and accessed by the key in dot notation. Example function:

function ExampleFunction(argJson){
    document.write("Key1 = " + argJson.key1);
    document.write("Key2 = " + argJson.key2);
}
Continue reading post "Javascript: Literal value function parameters"

Lynda JQuery Certificate

We had the day off for Veteran’s Day, so I’ve had some extra free time.  I spent part of it doing some of the other Lynda tutorials.  I worked on the SEO and JQuery ones.  The SEO one is crazy long and it felt like I was making no progress.  The JQuery one was about double the length of the Worpress one, but I finally finished it.  Yeah!  Here is my certificate for that one (Link no longer working).

I already knew most of the basics of JQuery, but the tutorial filled in many blanks for me.  It went over all of the main parts and functions of JQuery fairly well.

It also introduced me to JQuery UI.  That looks very neat for sure, but the full plugin, with the theme and what not, is something like 312kb.  That’s crazy huge for a web site.  Some (92kb) of that is images which would only load when needed, but the CSS for the theme is 28kb and the script itself is 192kb.  Definitely a good thing that it is so easy to customize what parts you want.  I generally try to keep my entire page loads, or at least the home page, under 100kb.  That is becoming harder and harder as more images and functionality are expected, but it’s good to keep load times fast.

I took some notes on this one, a lot of notes.  It’s really just as a reference for me.  I forget the specifics of this stuff very easily and am always having to look it up, even sometimes for things I do frequently.  I’m somewhat dependent on my notes.  So, if I can figure out how, I will attach them as a text file.  No point in adding them directly to this post, they will make it huge.  But I’ll have to worry about that later:  I have a usability event to go to (Link no longer working).


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]


Lynda.com WordPress Certificate

Our class decided to use Lynda.com to learn more about WordPress and some other topics that will help us with our Stearns project.  Our teacher has an account and was able to set up a limited time and course version for us at a reduced price.  We are doing five courses with a little over a month to complete them in.  I was worried this would be too short, but have been moving along pretty quick thus far.

Just recently, I completed the “Self-Hosting a WordPress Site” course, and they gave me this certificate for my trouble.  This was the most important for the course, so that is why I did it first.  I don’t know what weight these certificates would really have on a portfolio or resumé, but I think I will complete a few courses just for those.

So far, most of the videos I’ve watched have been about stuff I already know somewhat well, but there have been tidbits here and there to fill in some missing knowledge and a few videos about things I in fact know little or nothing about.  Some of the videos seem a little long winded, repetitive, slow moving, or boring at times, but they do seem like they’d be good for complete beginners.

I’ll continue with the other four courses we have available.  I’ll probably not be able to complete them all, but at least a couple more would be good.  We have an SEO one which would be especially helpful, but is also rather long.


Applied for Job: Bluestar

Angela Berlingeri, my instructor for my Web II class, forwarded me an email about a potential PHP developer job at bluestar-design.com.  There weren’t any details about the job, including information about what skill levels and sets were required, so I went ahead and sent my resume.  Julia Brigg sent me an email fairly quickly saying she might have an entry level position (the kind I’d need) in the near future.  Yay.

She also forwarded my resume to an associate, who called me immediately.  He needed a full time developer, which would conflict with my schooling, so I was unable to meet his need.  But he did say that he might be interested once I graduate.  Yay again.

Suddenly I have some job prospects here.  That is a good thing.  I was just starting to get a little concerned about going through my savings.  This was by far my most positive job application yet.


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.


Stearns Site Design Mockups

Over the past couple weeks we’ve been working on our mockups for the site design for Stearns. We each picked one or two of our wireframe concepts and have used Adobe Photoshop or Fireworks to create the fleshed out, full color and image versions of them.

I used Photoshop, since I’m familiar with it and have never dealt with Fireworks before (hadn’t even heard of it till this class).  As a non-designer, it took me a long time to do.  I tried to keep every piece separate and organized to make it fully modifiable.  This can be painful in Photoshop though, especially since you can’t modify some aspects of multiple layers at once.  And with all those little bits, they really bogged down even the powerful computers at school at times.

My version of Photoshop at home is old (7), so I couldn’t really work on them there.  Some of the stuff from CS4 didn’t fully translate, I don’t have all the fonts, and Photoshop 7 didn’t have the nested layer groups and other benefits that I was heavily using to keep organized and work on this thing.  I had to spend extra time at school and at my parents (my Mom has CS4).

Next time, I think I’ll be faster at this, as I know more what I’m doing, how to deal with all those pieces and what not.  Hopefully also I’ll be better at making a good design.  I’d like to learn that Fireworks, as it looks much better for this purpose.  I think it even makes it very easy to convert the mockup into actual HTML and CSS for the live site, which could save a lot of time with that.

So finally, my mockups.  I did two of my ideas, plus a modification of the one.  There are two pages for each.  They all have very similar (copied and then slightly modified) content sections.  They were all designed to be about 975 pixels wide and with 600 pixels as the above the fold height.  They have an additional 200 pixels of width to show the sides and as much as 600 pixels below the fold of height for content.


Geocities closure

My former roommate/bandmate had mentioned a few months back that geocities would be closing. I had my site on there until I started my own server and entered the world of server side scripting and databases. The site is still up, though I haven’t used it in years. The last thing I did with it was to simplify it, link only to the more important content, and make sure to have a notable mention of my new site. But I still wanted to preserve the old stuff. I’m not sure what I may have backed up from there still.

Geocities doesn’t offer any way to download files at all through its file manager, and I wanted an easier way than opening each file through the editor, copying and pasting into a local file.

A post mentioned using wget to download the whole site. I guess Mac OS X doesn’t come with wget (a nice utility for downloading http stuff from the command line), so I had to install that. Using it didn’t get all of my files though, because much of the old stuff was no longer linked, and some of the files were accessed with javascript. It also didn’t get files linked from within CSS or javascripts.

I tried using iCab to download everything. It has a nice site download feature that allow you to follow links and set limits on what is downloaded. But it kept failing at some point with a cryptic error -1100. It downloaded less than wget.

So I ended up having to get the items not gotten by wget by copying from the geocities editor and pasting into local files. The images had to be viewed and downloaded.

So now that is backed up before the shutoff date in just 11 days. I doubt I have any use for it, as I think all of the old stuff that was really in use was pretty well destroyed or disabled.