Saturday 8 November 2014

T-shirts

There have been a few minor and very boring changes to the website, which are:

1. There is a new Other Writings page for a couple of old projects and a new collaborative blog called Write This for Me
2. The floating RSS links box is gone, it was annoying and no-one really subscribes to RSS feeds anyway. There is now just one link in the little icon box on the top right to an RSS page with a frame.

But the most important news is:
I have some T-shirts!

Quite a few years ago when I first had this web address, I created a custom spreadshirt shop to sell items with corndogs printed on them, I thought that maybe if someone wanted an apron or a thong with a corndog on it, they could but it from me and I could make back about 50p of my biennial domain renewal fee.

Business has been... lets not try and sugar-coat this, I have sold a grand total of nothing.

I guess I never really believed that anyone would buy anything, the only people that visit my website are people I know and I feel as though the only reason any of them would buy a piece of corndog merchandise is as a gift to the one person they know that is apparently obsessed with corndogs. In case you haven't guessed, that person is me and their lovely surprise gift would be sort of ruined if I got a notification from spreadshirt telling me that I had made a sale. I have to make an assumption that spreadshirt notifies you of these things, as I said, I've never sold anything.

I'm not even going to embarrass myself by putting a link to it, its not linked to my main website or anything these days, if you want to find it, I'm sure I have given you enough clues to locate it with any semi-decent search engine.

The event I am completely failing to tell you about (because in all likelihood you already know) is that I decided that I should own some of my own branded stuff, so I visited my very own shop, perused the selections I had made available many years ago, decided that they were all crap and designed a couple of new T-shirts, completely failed to add either of them to my existing spreadshirt shop, then paid to have them sent to my house, which you can see above being modelled by a couple of members of the band.

So rather than allowing me to claw back some of the (admittedly very little) money I spend on this website, it has now cost me the additional price of 2 t-shirts. But hey, who doesn't want t-shirts with corndogs on? Oh right, that would be everyone.

Friday 14 February 2014

Icons and Email Forms

There are just one or 2 minor changes today.

1. I noticed that on a recent post, the character limit left it in the middle of a picture, I didn't mind this too much, but it meant that the unfinished link swallowed the ... and made the link point to the picture. I added in an empty link before the ... to prevent this. It does not affect any others.
2. I decided to change the email me link to an email form rather than just a mailto.
3. There are now icons at the top right for the Email page and to twitter.
4. I changed the banner so that it is a link to the home page, that seems to be a thing that websites do.
4. The travel blog now has a pins in a map page.

Unfortunately I have no exciting coding adventures to share this time. I'm as disappointed as you are.

I think the website is done, but I thought that when I first made it.

Friday 7 February 2014

Life as a div

I just can't seem to leave this website alone, I keep seeing things and changing my mind about what should go where.

I am so glad that I split my pages as it makes it so much easier to maintain.

The changes ordered by when they were made will follow in a numbered list:

1. The losing time clock now has digits rather than spots and a colourful table now exists at the bottom
2. The RSS feed links now float vertically at the right of the page rather than sitting horizontally at the top.
3. The post tables on the main page now have the title field in black with white text and links along with an icon  on the right indicating where the post was made.

I like to list the changes at the start of the post, that way its more likely to fit within the character limit on the homepage and I can just ramble aimlessly in the rest of the post, hidden from view unless the post is opened.

Rambling begins now...

I first came across divs while writing in the travel blog, I marvelled at the way the pictures I added sat there letting the text wrap around them, in much the same way as they wouldn't if you just added them in line with the  text.

I first actually used them in work though, at work, we have a Sharepoint Intranet site, which is a good way to allow people to modify their own pages etc. I believe the installed program is much better, but the online editing tools we do have access to can be quite... frustrating. Its quite hard to position things and when you come to adding images, links and so on, it does have a tendency to get confused and throw in mysterious additional line breaks and so on. Unsurprisingly, it doesn't take long for me to jump into the html of the part I'm looking at, where everything makes sense and you can remove the mysterious additional line breaks yourself.

There were some sections added to the home page with button links to various web programs or important information, which at some point I had call to add a link in myself, this was when I realised how it had been made - It was in a table, with the row containing the icons and the next row containing the names of the names. I could understand how this made sense when creating this from the GUI point of view, but it was extremely messy when trying to edit the html as I came to do as html is sorted in a very specific way with the table row coming first then all the table cells coming individually until you come to the end of the row, then you start the next one with your 2nd table row and all the table cells. So all the icons were listed, then  all the names were separate, so if I wanted to add a new icon in the middle, I had to be careful to make sure I got it into the same position in the 2nd part. What if I forgot? All the icons would go askew from their counterpart name... I could not stand this, the first thing I did was to remove the 2nd row and to simply but a line break between the 2 sections - Things were starting to make a lot more sense already.



Shortly afterwards, with the increasing need for icons as I came to add another one, the inevitable happened - We reached the end of the area they fitted into in the screen and a decision had to be made about how to deal with the extra icons, would they stretch on to infinity and stretch people screens? Would we have to shrink the icons widths down to fit more in? Or perhaps most sensibly break onto a new line? Obviously the breaking onto a new line option was chosen, so we did. Initially this was done within the existing table, it wasn't perfect, the end and subsequent start of the next rows would have to be moved if new ones were added in (or removed) but it worked and it looked ok... Until I saw someone accessing it on a wider screen, it looked ridiculous, why did the line break 2 thirds of the way across? We could not live with that, things had to change - I took it upon myself to make that change, it seemed the best way to change it was to use those magical divs, if I put every icon inside a div of a fixed height and floated them to the left, they would just sit next to each other and they would just sit next to each other until the reached the end of the line, where they would automatically break onto the next one, wouldn't they?...

Yes. That is exactly what they do now, its beautiful. I have shown  others how to edit them, but it seems I'm the only one that does add to them now, I think it might now be part of my job...

I decided to use the same div effect on this website when creating the pictures page so that I could show all 20 items on one page quite easily with one quick line of code.

Then I decided the other day I decided to move the box of RSS links, it seemed that having them horizontally across the top made it look like they were links to sections within the website rather than an optional subscribey bit, I thought it would be better vertically on the right hand side. Initially I was going to just put them into the next table column, but that wasn't quite right, it shrank the middle section in a bit too much, so I thought if I floated it over the existing grey space it would look better, then by giving it a fixed position it could follow you up and down the page. I liked it now, the only drawback being if you zoom in it overlaps the rest of the page... I thought in its new position, it would work quite well on all the pages, so I put it in the top part of the page.

Next while altering the post tables, I decided to add the icon to the right hand side, I thought, hey those divs work quite well, I can just float them on the right hand side, but no, if there was more than one line of text it would fall to the right of the next row, I tried to mess around, push it up etc, I didn't want to have to move the div to the start of the row as that would either mean repeating the if functions or putting all of the information in the header into the if function. So then I just put it into another table, which worked great. Sometimes you just have to pick the right tools for the job

Monday 20 January 2014

Adventures in the magical world of php

Since creating a new website on the weekend, I have been making one or 2 changes.

In brief the changes are:
1. Icons at the top of the homepage feed for the rss instead of links, it just looks neater I think
2. I changed the date format at the top of the posts so that the day now comes before the month, I don't want to say whether the English or the American dating convention is the right one, but the English way is definitely the right way.
3. There is now a corndog pictures link on the left hand side.
4. There is a losing time link on the left  hand side, but what does that mean?

The main reason for making changes is because I want to challenge myself, much of the site is now in php, which for those of you uninitiated with web coding, is like writing html, except you try and make it write part of the code itself.

PHP I find really confusing, especially compared to html, html is really simple content and so on, you just learn what the tags are and you position them around your page forever, wouldn't it be great if all programming was like html, the whole world would be geniuses in no time, whereas php is all question marks, semicolons and brackets, miss one out and it is broken.

I first used php when trying to update the old version of my website, I had a links bar on the left hand side which is fine if you've got 2-3 pages, but my collection of pages just kept on growing, I had an unnatural and probably an unfair aversion to using frames, so i was on the lookout for a different way, the best way seemed to be with a php page, where I create a simple php page (ok so a html page with a .php suffix) for the links list and use ?php include to pull the links page in. Magical, instant time saver.

I was so taken with this effect that for the new version I created one page for the top and the left and all just include that and the content is just added to the large box part on the right, not only do I have an easy to update links list, but I could change the banner and the colour scheme just as easily.

Now having the php pages was one thing, I had the structure sorted, but I thought, surely I can manage more than one line of php, right? So I created a news feed using a code I found on the internet, it pulled through my newly combined rss feeds and it was there, I couldn't believe what I had achieved! To be honest, not much, some anonymous person from some dark corner of the internet created that, I would have to do some more to feel that same sense of achievement, it become instantly clear that when echoing text and so on into the page, you simply revert to html, oh how things start to become clear then, i could use my favourite visual organisational tool the table quite easily, just start the table fields in the first echo and close the table off in the last one, with a bit of shuffling I got the date onto the same line as the title and with 1 simple line I was able to restrict the body to 1000 characters, so far so good.

Then I came up with another idea, what if my posts worked out which blog they were from, wouldn't that be great? I found the equivalent code for IF functions online and had it read the link field, 4 times one for each blog and it worked! the largest change I had made yet, I was quickly figuring out this php stuff, I was able to replicate this success on a separate news page, where I could remove the link from the top and put it at the bottom as a 'comments' link, no particular benefit to this, something just told me I wanted a separate page for this, to try and differentiate the 2, they are not limited on the news page.

Now that I felt I was coming to understand php (it was delusion, I was not), I thought I wonder what else comes in rss feeds, ooh, what about flickr? I havge a flickr feed, that would be good - Now don't get me wrong, I do not believe that having a pictures page on my website is any better than just linking directly to the flickr photostream, in fact the rss feed only shows the last 20, so it is far less efficient, but I thought I would have a go.

Then I came across a stumbling block, the pictures themselves were in a media:content tag, this was not what I expected, I tried including it in the same way but it didn't work, it turns out this is a namespace and I found some codes I could use, though they were not the same as what I had, all the items I had were listed in 1 $item array, whereas the code I found was to pull through the item by itself. I decided I didn't want to do this, to do this would be to admit I had learned nothing and that the code I had was somehow wrong, I was sure I could turn the line of code into a bit of an array... I could, it was amazing, the result is here, my pictures page.

It turns out that I am of the genuine belief that people want to read about coding, but without any of the pesky advice telling them how to actually do it.

Sunday 19 January 2014

New year - New website

I have tried to maintain websites before, the main problem I tend to come across is that I just cannot be bothered, then the other day I realised something that spurred me into action.

Recently I registered for a forum, which is something I had not done for quite a while and decided to add an image, I thought, hey I'll just add it to wannacorndog, so I did, I clicked to preview my shiny new post and... "Your hosting account does not support hotlinking".

Ok, so I can't really get indignant, I don't actually pay for hosting, so the restrictions imposed by the host is just something I have to accept, but I don't feel like I'm asking for much, if unlimited images can be uploaded and shared on imageshack, flickr, photobucket and so on, then surely my web host can do the same? If I actually expected to make any money from my website, then I wouldn't mind paying for this service, those banners on the left column of the page would just net me some bonus credit or a few pence off my phone-bill if anyone signed up after clicking them, so already with the bi-annual domain name renewal fee and the time put into maintaining it, it is very much a loss making enterprise.

So yesterday, I packed up my virtual things and registered for a new hosting service, so here we are on fresh new servers at holdonhosting.net - Isn't it nice?

Having moved, I felt like a little change was in order, the first page on wannacorndog.co.uk used to point to a collection of pages, that I had spent quite a while filling in and creating areas creating sections and promising content that never quite came to be, so a while ago, I changed it and pointed straight towards the corndog blog.

Now, I want a website again, but this time I want it to be less work, so I decided that what I would do is basically aggregate my blogs on it, I have started many blogs in my time, so I just needed the essential ones, so I have the corndog blog, which I add corndog pictures to on a very occasional basis, a blog that Isn't about corndogs which is basically another one I created to record the occasional thoughts I have that do not feature corndogs, I recently took my Travel Blog out of long term storage in order to write about holidays to other countries and finally this one, which I started years ago, wrote one post about making corndogs and then forgot about, so it seemed perfectly placed to be used instead as a kind of website news blog.

The majority of the work then was in figuring out how to display the content of an rss feed, I was so pleased when I put the articles into tables, managed to restrict the character count on the list on the homepage and my proudest bit, having it work out which blog it was on. This is obviously easy for some, but I'm relatively new to php.

Now its great, I can update most of it by simply filling in a blog, look for more soon, or not, doesn't matter, just subscribe to the rss feeds if you really want, I wouldn't, I'm not that interesting