07 December 2007

random photoshop tip - straightening wonky horizontals [or verticals]

we've all got photographs were the horizontals or verticals aren't quite perpendicular. 


you can try to avoid this problem by not taking photographs while drunk but it's much more fun to use photoshop  to fix things up later.  this tip also works for teetotallers who just cannae get their perpendiculars perpendicular either.


1. first find an afflicted image. here's one i've deliberately 'wonkified' to an exaggerated degree. if your horizons are consistently sloping this much, maybe try a lower strength beer.
2. if you click and hold on photoshop's  eyedropper tool, a popup window will appear in which you will see the much ignored ruler tool, which is generally intended for measuring distances on your images.  not much use in your everyday photoshop work, the ruler tool does have one clever party trick which makes straightening  out  wonky images a veritable piece of piss.

3. use the ruler tool to drag out a line along a part of your image which is meant to be horizontal [or vertical - either method works]. here i've dragged out along my horizon line which - obviously - should be horizontal.  but if the image was of a building or tree, i could drag a line with the ruler down the side of the building or trunk of the tree.  you're just looking for something in the image which is supposed to be perfectly horizontal or vertical


4. now look under the image menu for rotate canvas and select arbitrary...  this is the option which allows you to type by how many degrees you wish to rotate your image.


5. now here's the clever bit!  when the rotate canvas > arbitrary dialogue box opens, it will contain a value already filled in.  this value will be the angle that photoshop measured before, when you dragged out your line with the ruler tool, across your wonky horizon. photoshop is smart enough to know whether or not to select clockwise [CW] or counter-clockwise [CCW] as the required direction in which to rotate the canvas to make that line perfectly horizontal [or vertical], so all you need to do is click OK


6. hey presto! - your sloping horizon is now perfectly horizontal.   however, it stands to reason that by rotating the image slightly to straighten the horizon, you've now introduced some whitespace at the edges. this will need to be removed by cropping the image.  because i exaggerated the crookedness in this image, i'm going to have to crop quite a bit off my image.  unless you're really cack-handed, your own images are unlikely need so much adjustment, so you'll most likely only have to crop a tiny part, to tidy things up

7. select the crop tool

8. drag over your image to select as much of it as you can, without including any of the white around the edges and then hit return.



9. and there you have it.  not as large as the original image, but we now have a horizontal  horizon and poor stío disnae look as if he's clinging for grim death, onto the side of a mountain  any more.



using 'categories' with blogger

last week one of the students, who had previously used wordpress, asked me if blogger 'did categories' because [s]he wanted to file their posts under categories reflecting which college project they referred to.

'no...'  i replied with the robust confidence of someone talking out of his nether regions '... blogger disnae support categories.  the best you can do is organise posts by date'. 

well, even a towering intellect like myself can occasionally get things wrong and, after further tinkering i have discovered that, whilst blogger disnae support categories per se, there is a way to make it behave as if it does, taking advantage of the fact that blogger does support attaching keywords to a post [or labels in blogger parlance] and does allow you to add some custom menus to your template layout [providing you're using one of the modern templates].

so here's how to use categories in blogger:

1. login to blogger and from the dashboard page click on layout to take you to the template section.  then click on page elements. 


2. now click on the add a page element  link in the box at the top of your list of sidebar items [ profile and archives will already be there as defaults]


3. in the window which pops up find the labels item and click add to blog.


4. after you've added it you can click edit to customise the title.  you may prefer to call it categories instead of labels.  i've changed mine to tags.

5. you can also rearrange the order of the sidebar items.  by dragging them.  i've put my profile on top [and renamed it about me], labels  [renamed tags ] underneath and archives [renamed previous drivel] at the bottom.

6. now whenever you write a post and want to file it under a certain category.  use that category name as a label.  the labels box is at the bottom of the posting box.  to file a post under multiple categories separate them with a comma.  if you've used a category name before, blogger will suggest it as you begin to type [below i've typed 'blogg' and blogger is guessing i'm referring to my previously used blogger category.  to accept blogger's guess, just hit the tab key - it'll fill in the rest of the word for you and even add a comma, ready for the next one.

7. once you've done all that, you'll have a nice wordpress-esque categories menu on your blog, allowing  you to archive your posts by category as well as date.

04 December 2007

set up tracking for your blog

in ten... oh, alright then... 'eleven' simple steps.

one of the lesser known goodies that you gain access to, when you sign up for a google account is google analytics - a service which lets you track visitors to your blog and view lots of interesting geeky detail about them, such as where in the world they surfed in from, what browser they used and the ego-bruising bottom line; 'how many people are actually reading this crap?'
anyway, for you stat-junkies out there, here's how to add google analytics to your blog:

1. go to analytics.google.com and login with your google username and password. then click the sign up button on the analytics home page

2. you'll be asked to fill in a form giving the details of the site you want to track. put your blog address in the website's URL box and whatever you want in account name - that's just there for you to identify the site yourself.

3. woohoo! - another form to fill in.  on this one, make sure to give google your real phone number, so they can cold-call you for the rest of your life trying to sell you google underpants and google flavoured corn-based snacks. click to accept the customary small print on the screen which follows this one.

4. you'll now be given a block of code which you need to embed in your blog, so that google analytics can start tracking your visitors. make sure to select all the code and copy it. [apple+C]

5. now head back to blogger and login to your blog.  click on the settings tab

6. then click  on the template tab and the edit HTML sub-tab [is that even a word?] underneath it

7. google recommends you paste the code you copied from google analytics just before the end </body> tag of your page.  strictly speaking it disnae need to go exactly there, but it's as good a place as any - and better than losing it in the middle of the template code somewhere, so let's put it there.  

scroll right down to the bottom of the template's HTML and paste [apple+V]  the code you previously copied from google analytics just before the </body> tag.  it's OK to hit return a few times to make a bit of room [HTML isnae bothered about empty whitespace] but, if you do so, make sure to insert the extra space on an empty line - don't split an HTML code tag or you'll knacker your page layout.  remember to save the changes to your template after inserting the analytics code.

[it might also be a good idea to preview before saving the changes and make sure your blog looks OK, just in case you've messed something up]  

8. now you've embedded the analytics code in your blog, it's back to google analytics to finish setting things up at that end.  when you login to google analytics, you'll see your blog listed under website profiles [you can track as many sites as you want - but you'll need direct access to each site's HTML code, so in answer to the question i've been asked several times already - no.  it willnae work on your myspace or facebook page ].

beside the name of your blog you'll see a panel reading  tracking code not verified.  click on the check status link below this and google analytics will check that the previously supplied code has in fact been embedded in your blog.

9. if you embedded the tracking code in your blog correctly, you'll be presented with a panel telling you that analytics has been successfully installed...  if not and you get an error message about google analytics not being able to access the tracker code, you'll have to go back to blogger again and make sure you embedded the code properly into your blog's template - you did remember to save template after you did this, didn't you?

10. assuming all has gone well, when you revisit the website profiles panel on the analytics frontpage, you should see that the message next to your blog now reads  tracking code installed.  

11. you can now click on view reports next to the name of your blog site, to see lots of luvverly graphs and piecharts illustrating your enormous global popularity.  be aware tho' that the statistics are only updated once every 24 hours, so there willnae be any reports available for you to view until a day or two has gone by.  still, in the best traditions of blue peter – 'here's one i prepared earlier...' 

this shows the map report for another of my sites.  i can rollover the map of the globe  and see how many visitors to my site have come from various countries. betcha never knew i was  'big in brasil'!

geek-tastic, eh?

more on PDPs

as part of their coursework, students at our college are required to keep a PDP [personal development plan] - a studio diary in which they chart their progression through the course by way of discussing works in progress, referencing other works which influence them and - as part of the critical studies element of the course - writing a couple of reviews.


in the past, this PDP has always had to be presented in physical form which, as you can imagine, gives rise to numerous opportunities for the perennial  student excuses such as  "the dog ate my PDP....", "our house got robbed at the weekend and they took the DVD player, the computer and my PDP...", "i left my PDP on the bus..." and the like – quite apart from the logistics involved in collecting and assessing well over a hundred such volumes.




so this year i suggested we drag ourselves kicking and screaming into the twenty-first century and allow the students to keep their PDPs in digital format. 

gary and joanne, the course-leaders okayed the idea and so i've spent the last week or two corralling small groups of students together and supervising their setting up blogs on blogger, in which they can begin the first wave of digitally compiled PDPs.   why blogger? - well, in spite of my instinctive mistrust of companies which seem determined to take over the entire known universe [which is why i'll not have any microsoft software at all on my comp], i've always thought google slightly less tainted by association with  beelzebubb and all his legions than a lot of other megacorporations.  add to this the fact that google own blogger, picasa and youtube and this makes it piss easy for the students to incorporate photos, slideshows and video into their PDPs with only one login/password combo to remember.


from a staff point of view, subscribing to an RSS feed from every student's blog via google reader allows us to see at a glance who is or isnae updating their PDPs regularly and kick the arse of  have a friendly discussion with any student who's falling behind with this part of their coursework.


03 December 2007

first tweakage

inveterate tinkerer that i am, i wasnae able to leave the default template alone for long.  although it's the cleanest looking of the templates available, there were a few things about it which bugged me, so i made some initial adjustments.  no doubt i'll be returning to tinker at a later date.  for now i've:

  • moved the sidebar to the left - where it should be [IMHO]
  • widened the whole layout.  there was a lot of screenspace going to waste there.
  • created a 'clear'  class.  it was referenced in the code but not defined.  it's used to keep things clear of floated images  [such as  the dotted line under the profile pic].
  • removed the annoying grey border from around images in posts.
  • knocked the default fontsize up 10% - it was s-o-o-o wee!
  • defined some CSS for <blockquote> and <code> tags
  • a couple of other minor twiddles to margins and padding, here and there.
that'll do for the first hacking session!

the traditionally tedious first post

in my capacity as most popular lecturer in the design & visual arts department of city college manchester, i am often asked to share my encyclopaedic knowledge with hordes of saucer-eyed students, who gaze at me in admiration and hang on my every syllable.


this past two weeks i have been talking the students through the process of setting up blogs and showing them the mechanics of adding photos, slideshows & video – generally availing of the various tentacles of the google global empire; blogger, picasa and youtube.  this is so the students can maintain a studio diary [or PDP - 'personal development plan' - in city college parlance] as part of their coursework.


anyway, it occurred to me that it might be a good idea if i led by example and set up a similar blog for myself, wherein i could post random work-related musings. of course, i already have an incredibly popular personal blog which is read regularly by up to one person globally  - but since that consists mainly of my beer and drug fuelled rantings about things which piss me off [generally the entire human race] i thought maybe i'd set up this 'ere new blog to show the mature, intellectual, professional side of my character for - allegedly - such a thing does exist!


those of you who just want to read lots of sweary immature verbal diarhoea should look away now.