Friday 26 January 2007

test

just for testing

This has been under the cloaks for quite a while, but I thought I might just give out the code, so that maybe someone can come up with a better one, improve upon this, or just start using it for their own blogs! The main thought behind this was the fact that many people were complaining how expandable posts tutorials were incomplete, as in that the link would appear everywhere to view the whole post (even with the whole post). I thought up of a way which might just add a second to page load times, but gives a much cleaner result. You can see it working on the first few posts here.

Working

What the code does is run through your post content, and look for [hide]...[/hide] containers. It then replaces it with normal HTML tags to hide the part contained within those, and create a link to make that part visible. Once clicked, the link disappears. The problem is that you can't hide the post again (not yet atleast). I am sure that shouldn't be too much of a hindrance.This has been under the cloaks for quite a while, but I thought I might just give out the code, so that maybe someone can come up with a better one, improve upon this, or just start using it for their own blogs! The main thought behind this was the fact that many people were complaining how expandable posts tutorials were incomplete, as in that the link would appear everywhere to view the whole post (even with the whole post). I thought up of a way which might just add a second to page load times, but gives a much cleaner result. You can see it working on the first few posts here.

Working

What the code does is run through your post content, and look for [hide]...[/hide] containers. It then replaces it with normal HTML tags to hide the part contained within those, and create a link to make that part visible. Once clicked, the link disappears. The problem is that you can't hide the post again (not yet atleast). I am sure that shouldn't be too much of a hindrance.

No comments: