April 7, 2012

Header Update

You may or may not have noticed, but I have a "new" header for the blog.  I wanted to put in headers that would rotate whenever you refresh the page (went to a specific post, etc.)

Not as easy as I thought it would be.  The first set of instructions I could find wouldn't work because Blogger doesn't allow PHP scripting.  Too bad because that was dead simple.

Searching some more I found some instructions that look ok, but the directions didn't make sense.  I did read further on and realized that these instructions were a couple years old.

I found one more set of instructions that wanted me to put some text in the <body>  tag, which my Blogger HTML didn't actually have.....I know that doesn't make sense, but I have <body XXX where XXX is just some more HTML.

I went ahead and added the bit of javascript from this blogger tip after that <body XXX and it kind of worked.  Instead of rotating my imaged through in place of my header it was cycling them through behind my header.  My original header was a PNG file with some transparency and I could see the other headers through a small bit of the transparency.

I saved everything (I had already backed the template up) and went ahead and tried to delete the current header.  When I did that, the new headers didn't show up either.  Ugh.  I restored the backup and fixed the header to where it was and then commented out the script.  I really didn't want to remove the header anyway since there is essential information in there.

Of course I tried several combinations of things and I was getting nowhere.  The only instructions I could find simply don't work for whatever reason.  This exercise seemed futile and I was going to give up.  All I had to do was restore and earlier backup.  First though I needed a shower and to walk Tessa because it was getting later than I usually like to take her out.

On the way back home from the park it dawns on me.....I was able to get the new headers to show up behind the old header and I didn't really want to remove the old header......and finally it dawns on me.  Instead of trying to get just one thing to work I can edit the main header to only show the text portion of the graphic and the script headers can show all the pictures.  After editing all the graphics in Photoshop and uploading them to my webserver all I had to do was un-comment out the code.  Worked like a charm.  The only issue, and it is a minor one, is that on the mobile version of the blog only the main header appears, without any pictures.

I can live with that.

Now when you load my blog you will get some random pictures across the top.  I'm in every one of those pictures......



0 comments: