Tuesday, January 31, 2006
WIP
Just been farting around with my template again over at my TaoTest blog. After seeing the cute and excellent site design over at OrderedList I decided to take mine to a "low tech, single post" level.
In order to do this effectively I would have to limit the size of the inital view of the latest posting to a few lines and then introduce a "Read More" item at the bottom for people to load the full thing up.
I did a search for Blogger Hacks and found this posting by Nerdier than thou! on how to create such a thing.
The only issue I can see with this is that you have to insert some CSS code into your post to get it to work correctly - which I don't want to do. I just want to make a posting and have the first portion of it displayed automatically.
So... Off to JavaScript land I went and came up with something that actually works!
Here's the code bit i stuck in my template:
<mainorarchivepage>
<script type="text/javascript">
var str_length=400;
str = '<$BlogItemBody$>';
last_dot = str.indexOf('.',str_length);
document.write(str.substring(0,last_dot + 1));
</script>
<br><a href="<$BlogItemPermalinkURL$>">Read more!</a>
</mainorarchivepage>
<itempage>
<$BlogItemBody$>
</itempage>
The blog post is written into the variable str and then the post is scanned for the next full stop after the number of characters specified in the str_length variable. To show more content, increase the value of str_length.
The post is then re-written using the document.write command as far as that full stop character to allow for proper sentences to be displayed rather than being cut off in mid flow.
The JavaScript is between the <mainorarchivepage> tags to allow it to be shown on the front page.
A normal <$BlogItemBody$> tag is shown between the <itempage> tags to allow it to be displayed in full when you click the "Read More!" link.
This is still a Work In Progress - so please don't take it as gospel - but I think it works ok. Not sure how it will work with pictures though.
Rather than messing with CSS code, I was thinking of putting some keywords into the text such as !start! and !end! to signify the start and end of the posting you want to be displayed before the "Read More!" link. That should be pretty easy for JavaScript to sense and strip them out, and alot easier than going into the HTML code when posting.
Friday, January 27, 2006
360 Enabled

Wednesday, January 25, 2006
Think again...

It's not what you know...

Saturday, January 21, 2006
Infamy!
Sometimes, I do know what i'm talking about.
Plus, hello to my two new readers, Wendy and Darren who popped round tonight for drinks and nibbles. We did'nt mention the wife swapping stuff yet... break em' in gently!
ps.. i'm joking!
Thursday, January 19, 2006
Shrinky Links
Just a collection of random links from my recent surfing...
Shrinkydinks? Still going strong!
A huge list of albums to download.
Some nice wallpapers here
e-books (site in russian)
PayPal Sucks! - apparently!
ZCult FM - a comic scans torrent site!
Wednesday, January 18, 2006
Friday, January 13, 2006
Dr Wicket will see you now

Wednesday, January 11, 2006
Techno Porn

I'm on the move
After "a good hard think" I have decided to make the switch away from Blogger.
Not that Blogger is crap or slow or full of spam blogs and is generally seen to be the AOL of the Blogging world or anything. Blogger has served me well over the years but I want more control over my blog, how it looks, functions and is accessible.
I am going to buy a domain name, some webspace and host a WordPress blog there.
I will also amalgamate this blog, my Photao Photoblog and Music Club blogs into one giant tri-headed beast.
Wordpress will also allow me to create sub-blogs for subjects - so I could have a personal blog, a tech blog and a blog about my pet rock, Mr Stone Knee Boy (joke! - honest). I kind of have a picture in my head of how it will all pan out and work - but we shall see. Webspace and a platform like Wordpress will allow me to customise the site to my needs.
The Newlinks boys made the switch away from Blogger quite a while ago and are still going strong on their nice Drupal based platform. Drupal is also possibly "in the running" for providing the front end for my new site. This is even more customisable than Wordpress but may be too much for what I need. I have got a website to design for Flights-Physiques.co.uk and wish I had got him to purchase a business hosting service so I could install Drupal or Wordpress. At least then he could update the news section of the site himself!
Taoski.co.uk is available as a domain name and I can use Wordpress to import all my Blogger posts and comments - so watch this space suckers!
Related links: Wordpress for beginners, Wordpress Themes, Working with Wordpress.
Technorati Tags: blogger, wordpress, blog, drupal, newlinks, pet rock, hosting, site, photao, music club
Subscribe to:
Posts (Atom)