Today I was just doing some more work on my website.
I minified the various jquery and jquery plugin scripts that weren't already minified, then put all the jquery scripts in one file. I also added some Wordpress rules to stop wordpress and wordpress plugin scripts being inserted: Disable scripts and css being inserted by Wordpress and Wordpress plugins. Then I added the wordpress scripts into one minified js file.
I also did a similar thing with css, taking the Wordpress sociable css and the comment validation plugin css and adding it into my style.css file.
I didn't minify my main site css file, my blog's style.css file, or my main site's js file (that contains js I've written, the jquery library and plugins I saved in a separate file). This is because I will likely still need to make quite a few changes to them, so it doesn't make sense to minify them since I'd need to minify them again every time I make a change (unless i made the changes to the minified versions, which would be difficult and annoying).
Next I looked to see if there was a way I could serve the images in my blog post via one of the site's static subdomains. The images I'd uploaded through the Wordpress post editor CMS, which had saved them in siteroot/blog/wp-content/uploads. My static domains had their roots pointed at siteroot/CSI. Doing some googling I came across WordPress Tips + Things You Can Do After Installing Wordpress, which explains both how to move/change the wordpress uploads folder and also how to have content from there served from a different domain/web address to the main content of the blog.
All you need to do is in the Wordpress control panel, go to Settings, then Miscellaneous, then change 'Store uploads in this folder' and 'Full URL path to files'. So I set these to '../CSI/wp-uploads' and 'http://static1.photosite.com/wp-uploads'.
Now, I found that in the wordpress uploads folder it had created thumbnail versions of all the images I'd uploaded. So I found how to disable this: How to Disable Image Thumbnail on Wordpress - you just go to the Wordpress Settings, then choose 'Media' (under the Settings), and change the sizes to 0 for the thumbnail, medium size and large size options.
I also tried to solve the stack overflow I was getting in IE on the website's homepage. Unfortunately the error doesn't trigger a break in Visual Web Developer or the Microsoft Script Debugger, so debugging was a case of comment different stuff out until you find what causes the problem. This was made more difficult though by the fact that the error is intermitent.
Eventually I tracked it down to loading too many images via new Image() in javascript, and storing all the images in a javascript object. The reason for doing this is so that the images can be downloaded while the slideshow is playing, and it also makes it easy for the slideshow to loop - you just loop through the images stored in the javascript object.
However, it seems this will not be possible, so I did some googling to see if there were any good slideshow scripts I could use. Unfortunately the majority seem to use images that already exist on the page, and those that didn't, it seemed would have the same problem as my slideshow. So I asked on The Web Squeeze if anyone knew of a good slideshow script that would do what I wanted.
I also uploaded the site to my webhost, and copied across the databases from Ubuntu to the Web Server. In the Wordpress database, I had to change a few values in the wp_options table that had the website address I am using locally, to the real website address. I had some trouble logging into Wordpress, but it was getting late, so I thought I'd leave that for tomorrow.
Also, for most of the evening I played on Super Mario Bros Wii with Moccle and L.
The weather was nice, but windy all day. There was a decent sunset bit for a bout half a minute when the sun was going along the edge of a cloud, but that was it as far as the sunset went.
Food
Breakfast: Blackcurrant jam toast sandwich; cup o' tea.
Lunch: Mature cheddar cheese sandwich; cherry tomatoes; Clementine; Small sponge cake with buttercream; Fox's Classic; cup o' tea.
Dinner: Home-made pizza; chips; lettuce. Pudding was a big home-made choc-chip cookie. Coffee; Sainsbury's Caramel Chocolate.
Supper: Cup o' tea; Dark chocolate digestive; shortbread finger.
Thursday, 26 November 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment