Category Archives: Web Stuff

Self hosted Tumblr / Twitpic using WordPress

Do you have a self hosted WordPress? If so, why are you redirecting traffic away from your blog by using the likes of Twitpic or Tumblr? Aside from giving them traffic, you are also giving them permission to use YOUR content ‘royalty free’ anywhere in the word as per the terms and conditions on their sites (check it out!)

I sat down on Saturday afternoon with a determination to get a solution working in WordPress. About 2 hours later I had it worked out! This method set’s up categories so you can post pictures to your blog and not have them turn up on your front page, then have a link to the pictures in a sidebar like the “Twitter Photos” and “Updates on the Go” in the sidebar on this blog.

You will need the following WordPress plugins :

  • Simply Exclude – if you want to exclude the content posted for twitter from your usual posts.
  • Latest News Widget - a way to include a ‘feed’ in your widgets area.
  • Tweetable – so new updates are instantly tweeted (note this will mean all future posts will be published to twitter as well)

I’m sure there are alternate plugins that will work, but these are the ones which I’ve now set up on 2 blogs and what this post is based one.

Installing Tweetable

  1. Install the Tweetable plugin and ‘Activate’ it once installed.
  2. Click ‘Install’ which is under “Twitter” in the side panel. I have NOT had any luck setting up the link between this application and Twitter via the instructions presented on the page as it only gives ‘Read Only’ access. Go to http://dev.twitter.com/apps and click ‘Register New Application’ there (you may need to log in). Fill out the following fields there as per the instructions on Step 1 Tweetable’s Install. Note: The Description field needs at least 10 characters. See below for an example:

    Be sure to set the “Default Access type” to ‘Read & Write’ otherwise Tweetable WON’T be able to tweet from your WordPress!
    Complete the Captcha, and then click ‘Register Application’. Read through the Twitter API Terms of Service and if you agree, click “I Accept”. Leave the “Application details” screen up as you are going to need information from it in the next step of the Tweetable install.Go back to the Tweetable Installation Step 1 screen and click ‘Continue’.
  3. Tweetable’s Step 2 screen prompts for a “Consumer key” and “Consumer secret”. Copy and paste these from the Twitter “Application details” screen (that you didn’t close last step) and click ‘Save and Continue’.
  4. Tweetable’s Step 3 asks for your “Twitter Username”. Enter your Twitter Username then click ‘Save and Continue’.
  5. Tweetable’s Step 4 will “Authorise Your Twitter Account”. Click ‘Sign in with Twitter’ and follow the prompt to sign in, then click ‘Authorize app’.
  6. Tweetable’s Step 5 is the confirmation that Twitter has been linked to the account. Click ‘Finish’ and you will be taken to Tweetable’s setting screen.

Configuring Tweetable

  1. If you aren’t there, in WordPress, click on ‘Settings’ in the “Twitter” section on the sidebar.
  2. Update the following settings (we will change settings later):
    URL Shortner: In my situation I was using bit.ly. I was able to link it to my account so I could see click throughs etc.
    Tweetmeme button: You can have both Tweetmeme and Tweetable installed, they work together. Initial investigation, Tweetable puts the link at the bottom of the post where as Tweetmeme puts it up the top right!
    Auto-Tweet Posts: UNCHECK!!!! (we will enable this later)
    Remove Stylesheet: For the feature we are setting up, check this box so the additional stylesheets aren’t loaded.
  3. Click ‘Save Changes’

Create New Categories

  1. In WordPress, click on ‘Categories’ in the “Posts” section on the sidebar.
  2. Create 1 (or more if you want to use this like Tumblr for short posts) New Category. eg:
    It doesn’t have to be “Twitter Photos”, it can be anything you would like. That’s just what I’ve chosen for this site. If you want to do a short post update (ala Tumblr), you could create a category for that as well.
  3. Click ‘Add New Category’.

Simply Exclude

  1. Install the Simply Exclude plugin and ‘Activate’ it once installed.
  2. Click on ‘Exclude Categories’ under “Simply Exclude” in the sidebar.
  3. Set the “Inclusion/Exclusion” to ‘Exclude’ for “Front”.
    Set the “Inclusion/Exclusion” to ‘No’ next to “Widget” (if set to Yes, Category lists will display ‘No Categories’).
  4. In the bottom part of the “Manage Category Exclusions”, find the “Category” you just created (or two). I don’t want my “Twitter Photos” to appear as a post on my “Front” page or in peoples RSS “Feed” (“Archive” needs to be unchecked so people can view the individual posts).I do want my ‘Updates on the go’ to appear on the front screen, so I leave everything unchecked.
  5. Click ‘Save Changes’.

Latest News Widget

  1. Install the “Latest News Widget” and ‘Activate’ it once installed.
  2. Click on ‘Widgets’ under “Appearance” in the sidebar.
  3. Drag the “Latest News Widget” to where you want your twitter photos to appear on your blog.
  4. Set a Title (I’ve set it to “Twitter Photos”), then set the first of the “Categories to Pull Posts From” to the Category you specified earlier and the others to ‘None’.
    Check “Show Post Title” and specify a number of “Posts to Show”. Set “Hide the Content”.This will show just the “Title” of the post in the Widget Area you specified, it won’t show the image. This widget won’t shrink images to display properly, so they will appear as text only. 

  5. Click ‘Save’.

Note, if you want to set up a small Tumbler type post, add another “Latest News Widget”, specify the second Category you set up, in my case it was “Updates on the Go”, then in this Widget, select ‘Show Post Title’ and set the “Content Limit” to about ’30′. I think that’s a nice way to display those posts in the sidebar.

Test post

I’d recommend doing a test post so you know what this will look like on your blog first.

  1. Open the WordPress application on your smart phone and create a new post.
  2. The title of the post in future will be the contents of your tweet, so be caution of the 140 character limit. Be sure to specify the Category as the one you have created. In Media, click ‘Add’. Find the image you want to test with and publish the post.

What we’ve got so far

If you have set up everything as above, you should NOT see the post published on your mail blog. Where you widget is, you should see a text link which is the subject:

Clicking the text will open up the post with the image:

Setting up an automatic Tweet

  1. Click on ‘Settings’ under “Twitter” in the sidebar.
  2. Check “Auto-Tweet Posts” and add content to the “Auto-Tweet Posts Prefix”. I’ve just specified “New Stuff:” (10 characters)
    Note: Once this is set, all future posts will be tweeted to your Twitter account with whatever you typed in the “Auto-Tweet Posts Prefix” before your post title in your tweet.
  3. Click ‘Save Changes’

Mobile Theme

If might also be a good idea to install a mobile theme for your blog. That way when people who are using smart phones access your blog, they will see a mobile friendly version of the post which improves their user experience (IMHO).

Post away!

Start creating Posts in your Twitter Application on your smart phone or via the web client.

Just be sure to specify the Category when you post so it will appear in the correct location on your blog!

Small thing to note

As you are posting these photos IN WordPress, when someone opens the post of the image, the next/previous may link them to an actual blog post and viceversa.

Conclusion

So now, you can post images and short blog posts ala TwitPic / Tumblr and have it all hosted on your own site. It won’t clog up the main blog roll and will direct more traffic to your site!

If you found this post useful, and set up something on your site, please let me know in the comments below and maybe even say a little thank you by sending a donation my way.


Few updates, lots of things happening

5 Months between updates!  Well, it’s been an interesting few months.

Personal Life

I’ve mentioned before my son has eczema and food allergies.  In February (I had started to type up a post but never got around to it) on my Wife’s Birthday, my Son had an anaphylaxis reaction to something.  Whilst he didn’t have the reaction to later in the day (2pm), we think it might have been caused by some cashew nuts which we had at the movies earlier in the day.  Even after changing clothes, washing our hands thoroughly and brushing our teeth / using mouth wash, which we thought would be enough, he had a reaction which led to him being administered with an Epipen.

The experience was an eye opener to my wife, our families and me.  Having to watch everything my son touches when we are out to making sure food doesn’t include nuts (and the other number of foods which my Son is allergic to).  A couple of things have caught me off guard.  One instance was a Carrot cake at work.  Only realising when getting to the edge that there was a walnut sitting on top of the cake, whether there were any nuts in the cake I’m not sure, but as soon as I saw it I quickly washed my hands / mouth and desk.

Since then, we finally got in to seeing a doctor which a number of people who in passing in shopping malls etc have suggested we visit, Dr George Samra in Kogarah.  To give you an idea, it took 6 months to get the initial appointment.  His initial consultation led to taking beef and dairy foods out of his diet and us getting two blood tests done (Note: getting a 3 year old to get a blood sample took 7 people in total in the room).  One test was for airborne allergens, the other for food allergens.  The food allergens test done by Australian Biologics Testing Services.  The 210 test tests how the blood reacts to 210 different foods.  A number of the foods at the top of the list (which indicates that his body works the most of process them), were his main diet.  Being Oats, Cow’s/Sheep/Goat Milk, Soy/Rice, wheat, potato & yeast. Cows milk ruling out ALL dairy.  As a milk substitute, we are using Elecare.  The only cheese which he is OK to consume is Buffalo.  As for a replacement to bread, we have found corn cakes/tortillas.  Even with those, we are limited because some brands/products include sesame seeds or other foods which he is allergic to.

After we changed his diet to cater for everything which was indicated by the 210 test, he skin did start to change.  The redness started to disappear and open ‘wounds’ on his face started to get thinner as it they were sitting on the surface as opposed to under it.  That’s the only way I can think of describing it.  It appears that the diet change is working.

Having gone to the RPA Allergy clinic for 2 years and having seen very little result, to see such a change over the course of a month was quite breathtaking.

We went back to the Allergy clinic for a routine check up and to ask them about the 210 test and as to why they don’t use it for diagnostics their response was quite amazing.  Now the consultant whom we spoke to (think title was Dr.) indicated that in the past, 10 years ago was mentioned, the clinic had sent blood samples to see if this test was worth it.  Giving blind tests, in some instances 2 lots from the same person, the test didn’t give the same result for each, there was a variation.  Initially when I saw the results of the test I wondered as to its accuracy, ie most of his diet were listed at the top of the list, mind you that might account for his skin.  All that I know is that once we removed all the food which his body reacted highly to in the test and started him on the ‘safe’ foods, his skin changed.  Ironically, the Allergy clinics dietician’s response was ‘Well the diet change seems to be working for him”.

What to do?  Well we are going back to Dr Samra and we are goin to go by his guidance, even though the allergy clinic classes him as a ‘fringe doctor’ with his methods.  All I know is that it’s working for us.  And if his track record is anything to go by, it’s cleared up a number of other children as well.

More recently, in the last week my Son was in hospital due to a chest infection.  He was on Ventolin, oxygen (his blood oxygen level was down) and a number of antibiotics to get rid of the infection.  Subsequently his skin improved almost to the point his face was clear!  In the week since, unfortunately it’s partly returned to the way he was before his hospital visit.

WWW Stuff

Prior to my last post, I had spent some time creating a new website for a client, Yarnandkisses, a yarn store specialising in Malabrigo yarn.

In the last month, I’ve rewritten a fair bit of code on another website I maintain for an annual Swing dance event, the Sydney Lindy Exchange (SLX).  What started as a basic site with a registration form (which was emailed) has developed in to a basic CMS / event management site along with a basic newsletter module.

Whilst the code I’ve written for SLX isn’t in a state to be released to the public, I’ve spent the last couple of months considering writing my own CMS (truth be told, it’s really been years).  The decision has and is a rollercoaster ride for me whilst a question whether to write my own CMS or start writing plug-ins/modules for others, but I’ve started to write down ideas, notes, workflows and start to code it.  Now, whilst my knowledge of PHP/MySQL is only basic (it’s expanding every day), that’s all a CMS really needs to be, basic (but with the functionality!).  The main goal will be to make it small & modular, with a number of modules available when I make it public.  I’m going to be posting my progress here.

Music

Unfortunately at the moment, my music is on hold.  I haven’t touched my guitar or piano in about 2 months or more.  I played around with a few songs in the months before, but nothing completed.

Outlook (not the application)

I plan on getting the CMS mostly started, myself started up on my MCSE/MCSA (finally) and then getting back in to it.  It sounds strange, but putting it down for the moment has actually taken some stress off me.  I know when I pick it up again I will be refreshed and I’ll come out all guns/guitars blazing.  Oh and blogging more!

Sydney Lindy Exchange Website

Well it has been a while. I’ve actually been quite busy the past few months.

Outside of work a fair chunk of my time has been devoted to a rewrite of the core code of the Sydney Lindy Exchange website. I’ve been it’s Web Admin for 5 years now. What started as a few HTML pages the first year with a simple form mailer for registration has now progressed to an (almost) full CMS.

The rewrite allowed me to break the code in to easier to manage chunks/modules of code. I didn’t achieve everything I wanted to this year as I just ran out of time.  Early on whilst re-coding the site, I wanted it to be developed around a ‘Form builder and manager’ interface, as the main purpose of the site is registration for the event which is a form.

I did make quite a bit of headway with the form builder, however it was starting to get clunky and the deadline approached faster than I realised, so I ended up rehashing the rest of the code.

I did also remove all tables out of the layout this year thanks to css, however realised after the event when I was showing the site off to a collegue that the site didn’t display correct in IE6 thanks to it’s wierd and wonderful way of processing CSS :-S.

The other big challenge I had with this site was a mailing list.  In the past I had a script which bulk sent all the email messages at once.  This worked the first year, however second year not all recipients got the messages.  I found out after the event had ended the reason for this was that a limitation of the host was 200 email messages (or more recipients) per hour.  So this year I wrote a script which a cron job runs every 5 minutes to send a number of emails.  I need to do more work on this so all email from the site (registrations etc) need to be run through the mail queue, plus better management of that to ensure that 200 emails per hour is not met.

I still have all the code for the Form Builder, so in the new year I hope to look at that again.

(And yes this post did take a month to write :-S)

Another WordPress theme….

This time for my father’s website… bluesnoopy.com I had downloaded a theme which I used on my website when I first started to blog called ‘Simply-Blue’ (I can’t find a link to the authors home page as it wasn’t listed in the original template).  My father really liked the look of it, however, for some reason it wouldn’t support the NextGEN Gallery lightbox effect that he wanted so much.

So about a month ago I found this great barebone template called ‘Starkers‘ which is basically the wordpress default theme with ALL css div elements removed from it, which give you a great base platform for developing themes from.  You just need to grab the latest version of the comments.php from the default themes so it will support gravitars which was implemented after Starkers was created.

I migrated the Simply Blue theme in to it and it looks great and now his Next Gen Gallery works and IMHO looks even better in this theme than the old theme which he was using.

Been Busy…..

First post in a while… have been quite busy at work and home.

Have been helping out my wife by designing a WordPress Theme for her, which you can check out here.  The reason I’ve been helping my wife with her theme is that she is starting a new business providing hand dyed yarns and rovings and other knitting accessories.  So with a fresh layout (and soon to be very similar looking store), she will be on her way.

I have also been working on a theme for my site as well.. going for a ’50′s diner’ style, which is something I’ve been wanting to do for AGES!  At this point in time I’ve still got a fair bit of work to do on it, cleaning up the code as much as I can.  It actually started out as the default WordPress theme and I customised the HELL out of it :-D   It was a great theme to start with, however as I plan on using it a slightly different way, can clean up the css file a fair bit.

Oh… note.. IE is very sensitive to CSS.  I had the layout working in FireFox, however it wasn’t displaying in Internet Explorer.  The problem had to do with one space!

background: url(images/nav_top.jpg)top left no-repeat;

background: url(images/nav_top.jpg) top left no-repeat;

The top one didn’t display the image in IE, the bottom one did!!!!!!  Even the w3c validator didn’t pick this up as an error.

Aside from websites, we went to the allergy clinic last week for my son.  Confirmed he is allergic to Egg’s, Nut’s and Dust.  He is also intolerant to a number of foods… which is one of the contributing causes to the eczema on his face, hands and feet.  We are changing his diet to get him to a controllable level, meaning he’s currently eating a lot of bland foods, which means he is no longer eating Vegemite (which he loved), reducing his banana intake (he used to eat 1-2 a day, he’s now on 1-2 a week).  So once he’s at a controllable level we will introduce different foods for a week and see how he reacts to them.

I haven’t written any complete songs in the last couple of months.  I did hear about a songwriting competition put on by the NAB (link).  I’ve been playing around with a couple of ideas which I hope to enter one in to the competition with.  Will post the demo up here when it’s done.

So that’s about it… will try and type more in the next few months..

Switch to our mobile site