Test 123

Testing WordPress Multsite on this domain, but so far I haven’t been able to get my test site to load at all. I think it had something to do with the wildcard domain, and apparently that takes about an hour to work after setup with my host. Hopefully it will start working soon and I can get on with this testing.

Raspberry Pi

I just got my Raspberry Pi in the mail! Booted it up and connected to the internet. It’s pretty impressive to be able to have a computer as tiny as the Raspberry Pi is.

My initial reaction is that it’s a little slow. But that may be because I am so used to relatvely powerful computers that can run and do everything.

For example, I am writing this post on my Raspberry Pi and as I type there is a little bit of lag before the type displays on screen. Also the CPU monitor in the bottom right of the screen is maxed out…all green. I’m no expert but that seems bad.

I am excited to try some new things with the pi, and will be looking forward to trying to interface with physical things.

Clearly it won’t be my main computer, but if it is all I had, I would be rather excited with it. and I can already see the potential if I were a kid today. Being able to run a program or gain access to the internet, that can definitely impact a kid.

Unfortunately it is not as powerful as I had hoped, so I don’t think it will be able to perform the task I had initially hoped it could.

I’m on Github

I have looked into version control for a while, I learned a little about it when I wanted to get my Ultimate Admin Bar plugin into the WordPress.org plugins directory, but I have also heard a lot about Github and wanted to check it out.

Last night, I spent a little time working on a better default index.php file for my LAMP localhost setup. It’s something I thought other people may find useful and I figured I would put it up on Github so others could use it if they wanted, but also so that I could get it anytime I wanted (since I work on multiple machines).

After a while, and a number of searches, I got the setup complete and was able to ‘commit’ to Github.

I called the project ‘lamp-index’, and basically I am trying to re-create a little of the default index.php that comes with Wamp, although I’m guessing Mamp has something similar. I would not be surprised if something already exists, but I wanted to learn some of the php things anyway.

Anyway, check it out if you want, and feel free to send any improvements my way.

And here is my github page.

Admin menu bar proposal, now released as a plugin

So I realized that what I was suggesting in my previous post was actually a decent idea for a plugin. So I turned it into one. It is now up in the main WordPress repository, which was kind of an interesting process. If you get a chance, check out my plugin, the Ultimate Admin Bar.

The process to get a plugin into the repository requires you to use Subversion, a version control system. I had not previously used it, so I had to learn it. Not sure I do it 100% correct, but I think I am getting it. And hey, my plugin is in the repo so I must have done it well enough. I actually had to make a minor change shortly after I got it in there, but after some Googling and a couple tutorials later, I was able to make the change.

The Ultimate Admin Bar was designed to work with the not yet released WordPress 3.3, it sort of works with 3.2.1, but looks much better in 3.3. This is due to some of the changes to core and specifically the stock Admin Bar.

WordPress admin menu proposal, merge with admin bar

Update: I am working on a plugin to do the admin menu bar from the photos. It looks like this will only work with 3.3. I might also try to replace the admin bar with my envisioned expanded admin menu bar.

I have thought for a while that with the addition of the admin bar, the admin menu (what I am using to refer to the admin menu that existed on its own before the admin bar, the menu that is on the left of the admin pages) is either un-needed or should be combined into the admin bar. Essentially, with the addition of the admin bar, we went from having one menu that people knew, to having two menus that do many of the same things. Which makes me wonder if both are necessary.

I am sure WordPress has a plan in mind, and I wouldn’t be too surprised if that plan consists of only having an admin bar that better accounts for the normal admin menu functionality. Personally I don’t like having the two menus, or at least one vertical and one horizontal. I usually use WordPress with the vertical menu collapsed, but it still feels weird to me to have both. My thought was to make the admin menu more bar like and make it horizontal and move it to be next to the admin bar, like right below it. This leaves the wpcontent area open to be used entirely by content. I get easy access to all menus and they are located near each other, which could be a little annoying (hovering accidentally over the wrong menu triggers a fly out menu), but in my brief use of my experiment, I like it.

In WP3.3 the admin bar is changing a little from 3.2. Here are some of the changes I noticed:

  • There is the new WordPress menu
  • Visit Site has been changed to the name of the site (but still does the same thing)
  • The Comments menu has been moved and changed to a talk bubble icon
  • The Add New menu has dropped theme and plugin from the list of things you can add
  • The Appearance menu has been removed entirely
  • The Search has been removed entirely
  • The Howdy/profile/logout has been added to the admin bar

It seems like WordPress is trying out some things with the admin bar, which I like, but they are working out some of the kinks before it is made the only admin menu. That’s just my opinion, but it seems like the logical progression. Also, make small changes until everyone gets used to it, then you wouldn’t have the backlash changes like that typically bring. We are also talking about millions of users, so this approach makes sense, in my opinion.

Since pictures are usually much easier to understand then descriptions, here is what I modified the admin menu to look/behave like:

Perhaps this would be a good transition step before the admin menu we know completely disappears, maybe not. It’s just an idea though.

WordPress saves the day, with custom posts types

At my day job I was working on a better way to organize posts and handle a slideshow on our homepage. I was using the attachments of one post and pulling those into the slideshow, but it didn’t do everything I wanted and I had to use the “Caption” on the images for the link I wanted the images to link to, so it just wasn’t an ideal situation. It did allow for easy manipulation of the order of the images, since I could just drag and drop the order.

I have been thinking about a solution for a little while, trying to think through the best thing for my needs. I initially thought I could use a post category and then query the attachments of the category, but that’s kind of cumbersome (i tried).

Then I thought, what about a custom post type for the slides. I’m not sure it is necessary, but there are some things that it does very well by using a Custom Post Type. With the addition of a plugin, Post Expirator, I am able to have slides expire at a certain time/date. And with the WP built in schedule post functionality, I am able to have posts appear based on date/time. This is great, one of the features I was looking for since the slides are typically monthly promotions we promote.

This means I can have the monthly promotions switch automatically and not have to worry about going in and manually doing it, since sometimes the beginning of a month is on a Saturday or Sunday. This also means I don’t have something waiting for me on Monday mornings.

Something I hadn’t really thought through, but as a little bonus to doing it this way, I am now able to switch the status of a post from Published to Draft or put it in the Trash, and it will not show on the site. This is great too because I can re-publish them at anytime with one click of the Publish button. Since we sometimes promote products multiple times.

A slight drawback is that ordering the slides is not as easy. But since the order is based on Publish time, you simply need to set the time published of each post to be in the order you want them. Not as easy as drag and drop, but I prefer the scheduling ability over the rather minimal effort it will take to order them.

Overall I am pleased with the result, it feels more of the WordPress way to do it and in case someone were to have to come in and figure out how it works, it makes much more sense than having to find the page id of my original method buried in the functions.php file, if they even had a clue what that is. The new way provides an admin menu and visual interface that I think anyone would be able to do it.

Had an idea about WordPress admin navigation

So basically my idea is this:

Custom Post Types are still Posts right? So is separating all different custom post types into their own menus necessarily the best idea? I’m not saying it isn’t, I’m just hoping to start a discussion about it. I actually see in some cases it being good, and in other cases it being bad.

For example, currently if you have three different custom post types, your menu is going to look something like:

This isn’t necessarily bad, it’s actually clear that these are different than posts, but at the same time, custom post types generally represent some type of content. So would it be better to combine that into one menu so that it would look something like:

And then when you expand the “Content” menu you would have all your different types of content listed…maybe something like this:

I had the idea, and kind of wanted to see what that might look like and edited some screen grabs to flesh out the general idea. Let me know what you think, is this better or worse than having separate Post Type menus? More importantly why is it better or worse.

UPDATE – When I was writing this I thought “surely someone else has thought about this”…did a quick G Search and saw that Nacin had worked something out about adding your CPT menus to submenus, which is good, but then I wonder if it would be better to default to CPT menu’s being submenu’s instead of top level admin menus? I still wonder if it would be better to have Posts & Pages under one “Content” menu item..and then have CPT default to showing under “Content”? Plugin/Theme authors could still override it and make their menu item be top level, but that is more work for them. Which means most of them may not put in the extra effort, where as now plugin and theme authors have to put in more work to clean up the admin interface.

Additionally adding the light blue background breaks up the submenu list and signals that these are somehow different. The light blue may not be best, since that is the same as the hover color, but you get the idea. And if everything is in the submenu without any separation then I’m not exactly sure that’s great for new users whose themes add a lot of submenus or if they enable plugins that add a bunch too. Adding to the submenu looks like:

That “CPT3″ represents a custom post type, but how does a user know this is a custom post type? I could see plugin/theme authors thinking “if I add this as a submenu item, my users won’t know that’s not something to do with a “post”, so then they opt to make a top level menu, just so their users see it easier.

Anyway, just a thought I had.

Sublime Text 2

I have been using the Sublime Text 2 editor at home a little and little bit more at work. It’s pretty nice. I really need to put in a little more time and learn all the quick code shortcuts and how to use them more efficiently.

I have been using ZenCoding in Komodo Edit which has been working really well, but I find Komodo a little slow sometimes. So far Sublime Text 2 seems pretty fast and responsive, which I like a lot.

Anyway, I wanted to post something in case someone else runs into this problem when trying to install the ZenCoding plugin in Sublime Text 2. Basically here is what you want to do to install it.

1. Go to the Nettuts article on ST2 and follow step #7 called “Package Control”
2. In the same article follow step 8 for installing the Alignment plugin and then go ahead and do the same for ZenCoding.

This is where it took me a while to figure out what to do.
3. There is a little prompt you can open called Koan. On Windows it should be opened when you press “ctrl + alt + enter”. Here you can enter your ZenCode and see it built as you type, which is a handy little feature since it helps you see the result of what your ZenCode. On the page I got the Koan information it says “alt + e” should expand a ZenCode part when typing it in the editor, but I cannot get that to work. But I kind of like the Koan prompt and seeing the html being built as I type in the ZenCode.

UPDATE = Once it is installed (at least this works on windows XP), you should be able to use the TAB key to expand.

Anyway, hope others find this and it helps if they are trying to figure this out.

Code Example

This is a test of a plugin that displays code on the blog:

function check_me_out() {
$foo = 'Check me out';
return $foo;
}
body {
margin: 0 auto;
}
h1 {
color: #005daa;
background-color: #ddd;
}

WordCamp SF

I am going to WordCamp SF this year, can’t wait. It should be really good, and I will enjoy checking out some things in San Francisco.

Would love to have a libation with Matt but let’s be realistic.