WWW posts page 40

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"

Samba: Another Freelance Project

Yay! I’ve got another freelance project now, and this one I’ll actually get paid for. It won’t be much pay, I gave them a very low price, but it sounds like I will get paid more from this job in the future: They want me to be their go-to guy for updating the site and new features. They will probably have me do things like update dates and add images, so it may be like an hour a month or something, not a lot, but something.

So finally, the project is for Samba Soccer Club, a small Cleveland youth soccer club. I got the lead from Ronda Leffel, the coordinator of the eBusiness program I was in at Tri-C. I met with them Saturday at Baker’s Square to talk the project over.

They had a site at one point, but let that lapse, and now want a completely new site, from scratch. They still have the URL, so they will just have to get a host and transfer it, or however that works (I’ve never done it yet). I’m going to have to do a bit of research on hosts for them, but I might suggest they just let me manage their site on my hosting account. I’ve not done this before, but it sounds like Dreamhost‘s version of reselling is just letting us create users for our clients and bill them ourselves. They shouldn’t have too much traffic, so this should work fine.

Continue reading post "Samba: Another Freelance Project"

Lynda.com: Building an Online Shopping Cart

I’ve completed another Lynda.com certificate, my first since starting my solo lynda account. This one was titled Building an Online Shopping Cart. I don’t really have experience with eCommerce yet. I worked with the forms and some of the database information at my RPM internship, but the actual processing was already built and out of site, and all I was doing was modifications to something that existed.

The course had a fair amount of good information for doing eCommerce. It did kinda focus on Cartweaver a lot, which is unfortunate considering that I don’t do Coldfusion and don’t really have a desire to. The basic concepts of that could be applied to any shopping cart application though. It also didn’t go into enough detail for me about the specifics of working with gateways/processors or, to a lesser extent, SSL certificate companies. I will definitely have to actually do one to truly understand how to do it and what options there are.

Anyway, I think knowing this could easily help in getting a job or maybe a freelance project. Then I’d get some actual experience which will really help getting more.


New Theme Again

It wasn’t long with that last theme. It had some undesirable issues, such as the cut off code blocks, no page tabs, and a few general appearance things. I had looked at this Monochrome theme before and skipped over it because it lacked differentiation for “code” blocks. However, I’ve discovered that it does put any “pre” blocks into boxes, and they have overflow set so that any cut off width can be scrolled to. So now I’ll just have to go back and put everything in “pre” blocks, and it should be much more readable.

The theme is very clean and simple and almost monochromatic, fitting better with the current theme on my own site. I like how post meta information is set to the side in such a way that makes it more readable as well as the post. I don’t like the dates on pages, but I’ll live with that. There is a fair amount of “white” space, making things more readable, comfortable, airy.

I would like it to have a flexible width, so that my code blocks don’t have to be so scrunched if they don’t need to be. It lacks header differentiation, but it doesn’t seem to matter as much since the headers stand out less in general and the break in meta information differentiates posts. It uses a fair amount of medium-gray on semi-dark gray, which does not pass WCAG luminosity ratio requirements and thus can be hard to read: I’ll live with that for the other benefits I’m getting.


PHP Functions: Array as Argument

A while back, I wrote about using the JSONesque literal value parameters in Javascript, like jQuery does. This allows arguments to be passed: with names, in no particular order, all being optional. I set it up so that multiple arguments could be used as well, allowing for existing functions to still work or people who prefer that syntax to have it. I will now write about something similar for PHP.

In PHP, it is not quite as elegant, but almost. An array with key-value pairs is passed as the single argument for named argument mode. So you could call like this:

testFunction(array("arg1"=>"value1","arg3"=>"value3","argCallback"=>"testCallback"));

or with regular arguments:

testFunction("value1",null,"value3","testCallback");
Continue reading post "PHP Functions: Array as Argument"

Awstats

I am using Awstats for my site statistics on both my home server and my dreamhost host. Dreamhost provides statistics with Analog automatically installed, but I prefer Awstats. Awstats is very good at accounting for robots and has a nicer interface. It is also more configurable since I have access to the full configuration files.

I used the following method to use one install of Awstats for the multiple sites I have hosted on each server. I use SSH. If you don’t have that available, you can modify the instructions to work with FTP. The symbolic link (ln -s) bits would have to be modified. You’d simply put the actual configuration files in the cgi-bin directory (the conf directory was merely a convenience for upgrades) and probably put the actual “wwwroot” directory in the proper location on the site.

These are just my setup notes, so apologies if they are cryptic:

Continue reading post "Awstats"

WordPress.com: Webmaster Tools and Site Explorer

I’ve been using Google’s Webmaster Tools and more recently Yahoo’s Site Explorer for my other sites.  They allow me to see crawl errors, keywords and some query ranking info, crawl statistics, and some other search engine related info as well as set some settings for how these engines handle my sites.

Because of the way these sites validate ownership of submitted sites (an uploaded file or a meta tag), I didn’t think I’d be able to use them with WordPress.com.  However, with a little searching, I found this page, which says how to do it.  In fact, had I payed more attention when exploring the admin section of my account, I might have noticed that the capability is built into the “Tools” page.

You just submit the URL like for other sites, then choose to validate with the meta tag.  Copy the meta tag and paste it into a specified field in that “Tools” page.  “Save Changes” and then press the validate button on Google or Yahoo.

This worked instantly on Google.  For some reason, Yahoo is just saying “Failed”.  Since it says it may take 24 hours to validate, I guess I’ll have to wait.  You’d figure a message other than failed would be used to say that it hasn’t been validated yet, but I’ve looked at the source of the page and verified the meta tag was there.

[Update 1/24/10] Finally Yahoo has validated by retrying. I had done this a few times spaced out after the initial setup, but it had just failed. I’m not sure why it finally worked. [update]


New WordPress.com Theme

I searched through every 2-column theme with widget support in WordPress.com’s repository (there were 58) in an attempt to improve the appearance of my blog. The main problems with the old one were that levels of headers weren’t differentiated well enough (the second level ones looked like first level) and the code blocks weren’t separated from other content well enough. I couldn’t find one template that I was fully happy with. Every one had something I didn’t like, and very few even had both good code block separation and good header differentiation.

This theme (Neat!) is one of the few that did well enough with those issues and overall for me to choose. It has nice distinct code blocks and I can easily tell the difference between headers. I’m not big on the colors or the header (though that’s configurable). It removed my tabs for pages, but that was no biggie. A few other minor issues. I may stick with it for my tenure at WordPress.com.

Continue reading post "New WordPress.com Theme"

Lynda.com Training Again

Since I am not in school or working at the moment, I think I am going to learn some more using Lynda.com, with a normal subscription this time. Hopefully I’ll be able to pick up some skills that will help me get a job, or maybe help make me more attractive for freelance work.

Lynda isn’t as much into development as design courses, but they do have some that’ll help me. I plan to learn Drupal, Joomla, and ASP.NET, which are popular items in the job postings I find. I could learn some of this without paying any money, but Lynda I can just sit and go through without searching and reading random articles or reading large books, and I can still do those as well if the Lynda course isn’t giving me enough.

I considered picking up a class or two at Tri C. However, one class would cost more than a year of Lynda, and the classes are on a rigid time schedule, not at my own pace where I can start and stop as I please. The classes I wanted are all online there anyway, so I wouldn’t get the classroom benefit.

Continue reading post "Lynda.com Training Again"

WordPress: XML Sitemap with XSLT WordPress Theme

For the Canine site, we wanted to have an XML sitemap to help search engines index the site. The sitemap can help search engines find all content on the site as well as tell it which pages are most important, how often they are updated, and when they were last modified.

There seems to be a number of plugins to generate the sitemap automatically for WordPress, but the Google XML Sitemaps plugin seems to have the highest rating and have gotten the most mention in blogs. Jason had used this plugin already for his site, so we knew a little about it already, thus we went with it.

After some minor configuration, it worked just fine. It regenerates a static file every time a page or post is updated. Not as dynamic, but it saves processor time. I doubt the plugin will work with Pods at all, since that’s outside the posts/pages dataset. Our Pods content probably won’t be as important anyway. I could potentially look into modifying the plugin if need be for that.

Continue reading post "WordPress: XML Sitemap with XSLT WordPress Theme"