Friday, March 07, 2014

flickr hack for a (somewhat) classic view (with bookmarklets)

flickr hack (but not really a hack) for classic view of a photo stream, Add ?details=1 to the end of a url. Oddly enough there is an "edit" button above your photostream that will do the same thing. Who knew and why would they hide it there?

Example:

http://www.flickr.com/photos/sakraft1/?details=1

vs

http://www.flickr.com/photos/sakraft1/

For a classic view of a set, just add "detail" to the end (this one will not work of the url contains "with/" and then the number for one of your photos, you need to delete that from the url first):

http://www.flickr.com/photos/sakraft1/sets/1698787/detail

Now, instead of having to manually paste that in, lets make a bookmarklet. This one will add "?details=1" to the end of your url.

javascript:window.location.href=window.location.href + '?details=1';

Install it by making a new bookmark and making that the address or drag this to your bookmark bar:

?details=1

And here is one for "detail" (for sets):

javascript:window.location.href=window.location.href + 'detail';

or drag this to your bookmark bar

detail

You can rename the bookmark to anything you like for your convenience as long as you keep the address the same.

Still not exactly the way flickr used to be, but its as close as we'll get until Yahoo listens to the angry masses.

Labels: , , , ,

Monday, March 03, 2014

A quick dojo cheatsheet



I made a quick and simple cheatsheet for the dojo javascript library. Mind you, this is far from comprehensive, it only contains a few things that I use most frequently. And its for an older version: 1.7, because that's the version being used in a project I am on. This isn't some fancy infographic, just info I need handy. Click here for my dojo 1.7 cheatsheet.

Labels: , ,

Friday, February 21, 2014

Yahoo Store Tags Not Working - The Fix

In my spare time I am building an e-commerce website for a friend. As it is my first e-commerce site (I've built many a static site before) I steered him towards a Yahoo! Merchant Starter account. I am already familiar with their small business webhosting tools and I figured the store and cart tools would be similarly easy to use.

Not quite. At first I was looking at their store editor tool. This is barbaric to say the least. Luckily I am a web designer so I decided to build the site myself. I had planned to do so from the outset but I wanted to see if the store builder could give me a starting point. Not really. The merchant started account is acutally two accounts in one, one side is if you are using the store editor. You don't have access to things like HTML files, you are forced to use the aforementioned barbaric store editor tool that was probably written in 1996 and never updated. The other side is the web hosting side, which I am familiar with and where you can make your own pages from scratch.

Going with the later you then have to get information from the catalog manager into your own page. This is done with Yahoo's own Store Tags. The look like an HTML comment or a server side include if you're familiar with those. Something like <!--#iamatag--> or some such magic.

At first I designed a static page without the store tags just to make sure everything would look correct once the data populated. Then I replaced things like product images and descriptions with the store tags, uploaded to the server and... ...nothing. I made sure the catalog was published. Yup. Searching the help area tells me nothing I don't already know. Time to email customer support.

Customer support is good but not great. They respond quickly but not accurately. For each question I have it takes 3 or 4 emails back and forth, usually escalating to different people, before I get information that is useful and should have been in something known in most circles as documentation.

At any rate, it turns out that either my OS or Dreamweaver were setting my file permissions to be too strict! It doesn't matter which because this was easily fixed by telling my FTP application to change the permissions on upload. The owner, at least needs to be able to execute the file, not just read and write. Even if I couldn't do this automatically, I could change files one by one on the server after upload (not ideal). I had to post this because it drove be crazy. For a while I thought it was the file encoding and I tried every encoding combo under the sun. Permissions! Got it? Good.

Labels:

Monday, August 01, 2011

Yahoo Small business webhosting is down

at the moment. What is interesting is that some of my sakraft.com blogs seem to be showing content, just not background images. I guess its good to not put all of your eggs in one basket (I ♥ blogger, except when it craps out too). When I try to go through the admin site to contact them it just leads me to a site-wide message:

Open System Status Messages

System Status Message
08/01/11

06:27 AM PST: Unable to view web sites

Some Yahoo! Small Business customers may have difficulties accessing their web sites.

Customers may see a "Page Cannot Be Displayed" or "The connection has timed out" error message while trying to view their web sites.

We are aware of this issue and are working to resolve this issue as quickly as possible.


I just hope my database info is intact. I'm kind of afraid to attempt making a backup while the front end of my site(s) are still down...

Labels: , , ,

Thursday, June 23, 2011

Test


Test

Google Webfonts API


google font is linked in the body of this post, not recommended but ok for a test. Normally the link would be in the head tag.

Labels: ,

Thursday, August 19, 2010

Stupid Bookmark Tricks

Bookmarklets to change styles...

These work in Firefox, at least:

Turn all paragraph tags to red
javascript:(function%20(){var cssNode = document.createElement('style');cssNode.type = 'text/css';cssNode.rel = 'stylesheet';cssNode.innerHTML = 'p{color:red;}';document.getElementsByTagName("head")[0].appendChild(cssNode);})();

Set all image tags to display:none
javascript:(function%20(){var cssNode = document.createElement('style');cssNode.type = 'text/css';cssNode.rel = 'stylesheet';cssNode.innerHTML = 'img{display:none;}';document.getElementsByTagName("head")[0].appendChild(cssNode);})();

When clicked, these each use javascript to dynamically create a new style tag inside the head tag and also create a style within it.

Labels:

Wednesday, July 15, 2009

Web Design's Worst Practices

I've always wanted to make a list of worst practices in web user interface. No, I am not talking about use the marquee tag, thats a relatively minor offense in my book. Most of the worst practices that concern me are ones that interfere with a given user's browsing habits. Obviously you can't accommodate every last human when it comes to how they interact, but a few practices are both common and reprehensible.

Most of these involve javascript alerts that interrupt normal browsing habbits, and the one I would like to point out today is any javascript alert that prevents right click on links. I find this maddening as I frequently use right click to open links for later reading. Authors usually suppose this will help them prevent content-stealing, but the fact is, it won't. Not probably won't, just plain old won't. If people want it, they're going to get it, and there is nothing you can do to stop them short of not putting up content in the first place.

So, you are not deterring downloading and you are degrading user experience. So don't use it. Thats my rant.

Labels: ,

Tuesday, February 10, 2009

My first dabblings in jquery

Wednesday, December 03, 2008

My Favorite Dreamweaver Keyboard Shortcuts

Here are the hotkeys I use most frequently on my PC at work:

ctrl + [ Select an opening tag, then use this to highlight the opening and closing tag, as well as everything in between

ctrl + m In a table, this creates a new row above the one you're in

ctrl + shift + m Deletes the table row where you currently have your cursor

ctrl + z You know what that one does :)

Labels:

Thursday, March 20, 2008

New Safari features!

A new version of Safari is out. It supports HTML 5 audio and video tags, downloadable fonts and CSS animation!

I think the new downloadable font thing opens up a bad can of worms. There is bound to be some awful abuse when the feature becomes widespread in other browsers.

Labels:

Thursday, March 13, 2008

How to add a background image to your blog

Last month I told you how to add a custom header to a blogger blog that uses the minima template. If you also add a background image, you can really make it pop. I'm not talking about some repeating image of your sister's cat or the starship enterprise, I mean some much better. Check out my wedding blog to see what I mean. You can use a background image separate the main area from the side areas.

To do that, you need to make an image in photoshop that has a middle area that is at least 660 pixels wide (the width of the header). You should leave this area clear of an patterns, borders, etc. On the edges outside of this middle area you can put some borders and gradients that fade into what will be the background color of the page. For an example, check out this image. The white area in the middle is for the blog content (as you see it on the wedding blog). The image is tall because of my repeating background. If you don't have a repeating background or you have a simpler one, it does not have to be as tall. Smaller is better as it will load faster. The tan you see at the very edges of the image is what the background color will be set to for the body in the CSS of the template.

Once you have an image that is wide enough, you will need to put it up on you server or where ever you host images. Then you will need to put a wrapper div just inside the <body> tags in the template, like this:

<body>
<div id="superWrapper">

<!-- There should be lots of stuff in you template here! -->

</div>
</body>

Then, between the style tags further up in the template, you need to style the superWrapper div like this"

#superWrapper {
margin: 0px auto; /* this centers the div */
width : 700 px; /* make this the width of your background image */
background-image: url(http://yoursite.com/assets/background.gif);
background-repeat: repeat-y;
}

You will also want to change the background color of you page in your CSS. This towards the top your CSS. It is probably white (#fff) or black (#000) by default (in the minima template). Change this color to match the edge of your background image.

I mostly wrote this to remember for myself, so you are probably pretty darned confused by now. Plus I'm half asleep. So if none of this makes sense when I'm more awake, I'll either add to it or take the post down. Cheers!

Labels: ,

Monday, March 10, 2008

This should make it all better

Saturday, March 01, 2008

Photography site updated

I have updated my photography site. No, there are not any new photos, but the gallery now incorporates fancy lightbox effects. Light boxes are getting to be common these days, there are tons of them freely available for use. I used shadow box, which is pretty nifty and easy to implement. The one thing that was not obvious was how to get one light box to go to another. I figured out that you have to out a gallery name in the rel attribute of each anchor you want to be in the sequence. For example:

<a href="someimage1.gif" rel="shadowbox[galleryname1]">Your link to image 1</ a>
<a href="someimage2.gif" rel="shadowbox[galleryname1]">Your link to image 2</ a>

If you wanted more than one sequence to live on the same page, you would just change galleryname1 to galleryname2 or butterflies or watertowers or what ever you wanted.

Just thought I'd share. I think I like shadowbox better than the boxover popups in my wedding gallery. I'll have to convert them :)

Labels: ,

Thursday, February 14, 2008

New blog headers

I finally got around to making some new blog headers. They're simple, but they make the pages look a lot better than the standard header you get with the blogger Minima template (see the header on this page for an example of that). The new headers appear on The Pirate Shack and on my wedding website. In a future post, I will tell you how to add your very own header to the Minima template.

Labels: ,