Perth barcamp 2007 – WordPress loop – Gary Barber

Uncategorized

Gary Barber is the Man with no blog and his slides are on slideshare, Doin’ da Loop with da WordPrez

  • He promised not to be too technical
  • Was going to do it all in lolcat speak
  • Presuming know plugins, widgets, can alter source code of WP blog, know what php is, not happy coding, not pulled template apart
  • What is the loop
    • Core of WordPress
    • PHP code distributed thoughout the system
    • Lets you display comments, posts, rest of blog
    • Loop is the single central control point
    • index.php
    • remove index.php – goes back to default theme. Remove default theme after that, then deadibones.

    How does the Loop works:

    • in index.php – middle bit btw header and end
    • 1. If have posts
    • 2. Gets the posts plus post meta data
    • 3. Gets it in the right format
    • 4. Does it over and over.

    Looking at default template

    • If want to make changes to happen after every post – then put it just after the <div> and before the <endwhile>
    • Look at where you add title and permalink

    Then in template div class align..

  • The loop is all through wordpress
  • Archive, comments
  • What can you do with the loop?
    • Customise the loop -display excerpt only
    • Customise CSS for different dates, times, catergories, authors, days of the week (Eg. Things written Tuesday have a blue background)
    • Change home page to static one
    • Can place items between blog posts – put it before the end while

    Before start hacking the code

    • Backup
    • Check to see whether there is a plugin or widget that does the same thing

Internal library staff blogs

Uncategorized

We have a pilot project for an internal WordPress blog at our library. It went live as we began ripping up the inside of the building. Staff were told it was there and they were welcome to experiment, but that it was going to be launched officially with training later. I’ve been flicking email stuff that I want archived there, and a couple of people have made a couple of posts…but otherwise staff haven’t had the time to learn something new.

In the next few weeks, we start revamping it as a reference desk blog. The original version tried to cover the whole library and replace a few email lists. We had a separate RSS feed for each category…nice idea but a bit too confusing for most people I think.

Co-incidentally, I’ve had a couple of email conversations with other Australian librarians about implementing internal blogs, so I think ’tis the season for it.

One person was wondering about blogging policies. A good swag are found in the comments on Karen Schneider’s post, Blogging Policies and Procedures. You may also get some useful information from the general discussion of internal communications wikis/blogs happening on the Library 2.0 Ning network.

Another discussion involved getting staff buy in and support of senior management. It’s a hard one as the advantages are long term ones – mainly an easily searchable archive. Most training will focus on the posting side of it and it will be months before there are enough posts there for the searchablility to be a big advantage. I’d keep stressing the final outcomes during training.

We are treating the internal blog as an experiment and a training opportunity. We can get used to the interface and iron out any problems before we implement any other blogs aimed at our community.

If an internal blog is replacing some email communication, there comes a point where buy in becomes less voluntary. It’s just annoying to have two places to check for the same information, so someone is going to have to formulate guidelines about what goes on the blog and what is emailed. Clear guidelines, which are sensible and useable. I think it will take more than just that to make people change their habits. Especially when it is actually easier to send an email than post to a blog.

I’ve concluded that making sure staff understand RSS, and are using an aggregator, comes first with most L2.0 initiatives. With coaxing, people can handle one extra place to go, but having to check two work wikis, three work blogs and a work Flickr account for changes would be really annoying. This is an issue for a password or IP protected internal blog – web-based aggregators like the highly popular bloglines and google reader won’t be let near the feed to harvest it. I don’t have a real solution, but may try using RSS Popper which integrates with Outlook. If Outlook is left logged in on a PC within the allowed IP range, then you can read the RSSPopper feed externally via webmail.

I was pondering this afternoon whether all this Library 2.0 stuff is really useful. If it is, then why do we need to work out ways to sell it? Many of us seem to be getting the skills and playing with the toys outside of work, even when we have workplaces like mine that make time for new technologies. Then I remembered staying up late writing web pages waaaaay, waaaaay back in the early nineties so I could demo to library staff the advantages of the internet. And being a bit worried that I was raving about a techno-hobby-horse that would never be relevant to what we did in libraries.

Converging/diverging

Uncategorized

Just upgraded WordPress to 2.0.6, and this is a test post.

To add colour here’s a snippet that impressed me from Connie Crosby. It’s from her notes about attending a Toronto Wiki Tuesday. Sounded fun:

“Wikis are good for converging ideas; blogs are good for diverging ideas.”

Discuss.

(Just as well I did this, as I found out that I need to update my Permalinks after an upgrade….just like the instructions said)

How to move your blog from Blogger Beta to WordPress

Uncategorized

Here’s how I migrated my blogger blog from Blogger Beta to WordPress on my own server. Hope it helps you if you are doing the same thing.

I’ve not included information about how to install WordPress on your server. Many hosts have tools for “one click” installation.

Between each step there should be one that says: “Check, play, fiddle, tweak, check”. Boring to repeat. Essential to do.

1.DECIDED TEMPLATE

  • Looked at some other liblogarians WordPress blogs to find formatting and functions to steal emulate.
  • Sketched what I wanted on a bit of paper.
  • Spent a couple of days trawling through WordPress themes to find one near enough.
  • Discovered iLoveMusic.
  • Fiddled with it for about a week on a test database, so that I just had to upload the plugin ready template to my new live installation.

2.DECIDED PLUGINS

  • I searched google, WordPress support and WordPress codex to find plugins to do what I wanted. I entered things like “embed YouTube” or “print pages”, rather than techie terms.
  • I followed comments on the plugin pages back to blogs that used the plugin, so I could check the plugin in action.
  • Here’s what I used:
  • Anarchy Media Player. Allows me to embed YouTube clips in my posts, or a media player to play many different file formats
  • Blogger Image Import see 5. below.
  • Simple-Recent-Comments WordPress doesn’t have code to display recent comments, so this does the trick
  • Dr Dave’s Spam Karma A must-have. After using it for 6 months on LINT, only 3 spams have got through – and they seem to be hand entered. We have up to 200 spams stopped per day.
  • Ultimate Tag Warrior Tags, tag cloud, relevant posts…and much more than I implemented.
  • WP-Print This one’s for Walt Crawford. Clicking on “print this post” strips the crap from your post and produces a short and sweet version ready for printing.

3.Posted a message on my old blog that I was fiddling about in case I accidentally flooded people’s aggregators.

4. IMPORTED POSTS AND COMMENTS FROM BLOGGER BETA TO WORDPRESS

  • i) Use the script while you can, as one small tweak from blogger and it will no longer work
  • ii) Remove the script from your server when it is finished,as it is a security risk
  • It worked like a dream. The only thing I did differently was to add a footer to the blogger RSS feed so that the imported posts indicated they were from the old version of the blog.
  • 5. IMPORTED IMAGES FROM BLOGGER BETA

    • Used Notions’ Blogger Image Import. This copies the images from the blogger server, loads them locally, then changes the links in the posts to point to the local copy.

    6. AFTER THE IMPORT – WHAT I DID

    • Checked and configured all WordPress Options.
    • Activated plugins and configured.
    • Changed any formatting from blogger.
    • Checked that the existing feeds worked OK.
    • I already had a Feedburner feed, so I changed the originating feed from my blogger feed to my WordPress one.
    • Burnt a Feedburner feed for the comments.
    • Added a “number of readers” badge to the side bar – available from Feedburner.
    • Followed the instructions at Feedburner to change the header file so that browsers autodiscover the Feedburner feeds, not the existing ones.
    • Added a sitemeter
    • I decided not to go to Bloglines and claim the feed then mark it as a duplicate of the Feedburner one, but YMMV.
    • Went to technorati and claimed the blog
    • From the WordPress dashboard, went to Options > Writing to add the ping for technorati to my blog
    • Found and embedded an appropriate Creative Commons license.
    • Used MicroAngelo to create a tiny image to use as the favicon to display in Firefox. The Gimp doesn’t create .ico files.
    • Created a favicon.ico file on the root directory where the blog was.
    • Went to any sites where I’d registered my website and changed it.

    7. Still to do:

    • Strip the arial font and purple colour I used on all blogger posts.
    • Add tags to all posts.

    Hope this helps.

    TODAY’S HIPPIE CARD: New Beginning

    Brewing another blog beast.

    Uncategorized

    I’m setting up an internal communications blog for our academic library using WordPress. Why?

    1. We have too many email lists for internal communications
    2. All of us are saving emails in our own subdirectories on the same server
    3. To create a searchable archive
    4. To introduce staff to RSS feeds
    5. Experimenting so that we know how to create a ridgy-didge one to talk with our users

    Image: Hubble bubble. There is no cookbook.

    We hope to have it up by Friday. FRIDAY!!!

    CW and I huddled around a PC one weekend at her house to set up LINT, so I’ve done a WordPress install before, but I’m finding out about .php, .css, ftp, plugins and the Gimp as I use them. I know I’m just learning – but I still keep beating myself up about not providing the perfect introduction to blogging bliss for the library staff.

    Because I’m not Grand Zen Master Coder, I know it won’t look exactly how I want it or do exactly what I want. I still want it to be something that people will “get”, and hopefully enjoy. When you’re asking people to change work methods, fun and enjoyment is not usually the result, so maybe I’m being a bit naive there.

    We’re replacing several email lists with the one blog, so I’ve set up categories with RSS feeds to match each list. The idea is that staff will subscribe to the categories that match the lists they already get, plus have access to all the other information whizzing about – all in a searchable archive.

    I’m using these plugins:

    • Category LiveBookmarks Plus Allows browsers to autodiscover category feeds, plus inserts an RSS icon next to the category name in the sidebar.
    • Ultimate Tag Warrior so that we can tag posts and create tag clouds.
    • Dagon Design Import Users . If you give it a file with usernames and their emails, it automatically adds them as users, creates a password and emails it to them.
    • WordPress Suicide. So I can blow away the data on the test version and upload templates etc. from the copy I’ve been working on here.
    • I’ve also added a patch, Ticket #1790: category-title-in-category-feeds.patch that inserts the category name after the blog name in the RSS title. (Pretty useless if all the feeds have the same title!)

    In another post, I’ll describe some of the decisions we needed to make in setting up the blog, just in case you’re thinking of doing the same.

    TODAY’S HIPPIE CARD: Action