September 18, 2006

Peekaboo posts hack is ready to use

I had announced Expandable posts with Peekaboo view earlier. After trying it, Hans reported the error dump that he got while clicking "Older posts" in the main page. But it seems to happen even in blogs that don't use this hack and seems to be a bug in Blogger. Hopefully, Blogger folks will fix this. Other problem that Vivek reported was that the style (font size etc) of the expanded portion doesn't match with the style of the summary. I have fixed this problem and updated the instructions in my previous post. All those who have already applied my hack, please change your blog template and post template as per the new instructions. [Rest of the post is technical, skip it if you would like to.]

I fixed Vivek's issue by replacing div tags with span tags. With div, if I don't specify a class, it doesn't seem to use the parent div's class. When I enclosed the "fullpost" within span, this problem goes away. The reason why I didn't use span before is that there could be several spans within the post for bold, italic text etc. Now, I give unique ids called "fullpost" and "readmore" and identify the span portions that I am interested in. Hans, please note that the showFullPost() function's code has been changed.

17 comments:

Anonymous said...

"Hopefully, Blogger folks will fix this. " You should know from experience that they won't fix shite unless it's reported. And the more folks report it, the faster it gets fixed. So, have you reported it? Report The Problems!

SQT said...

The peekaboo hack is really great. Fortunately for me, you make everything very easy to follow. So far I have the 3 column template, the label tabs and now the peekaboo posts.

I feel so tech savvy even though you did all the work! ;)

Unknown said...

sqt, good to hear your blog is "Hack-rich". just spread the word about Hackosphere.

SQT said...

sqt, good to hear your blog is "Hack-rich". just spread the word about Hackosphere

Absolutely! Especially once you come up with your own templates. Then I'm telling everyone!

Hoc Tro Viet said...

Hi Ramani,

Just want to say thank you for this wonderful hack. I implemented on my site today and for the first time I check on "About Me" and see the full text :-)

I don't know if someone mentioned this or not, but if I don't want to use span on a post in order to let the viewer see the whole post, do I still get the "Read more" text or not?

Cheers,

Unknown said...

Hoctro, I didn't understand. Is there any problem with using span?

Abhilash Rajendran said...

Thanks, this and many of your hacks have been of great help. Keep doing the good work.

Jason Doan said...

I think what Hoctro was asking was if there is a way to not have the "Read More..." appear on some posts, eg. a really short post. I'm also curious if this is possible.

Hoc Tro Viet said...

Ramani,

No, there's no problem with using span. It's just that if a post is too short, it doesn't need to divide into two parts, so we don't have to apply the span tag to that post at all, right?

But, even though you don't have the span tag, the post will still say "Read more". And when you click on it, "Read more" disappears. Is there a way to detect if a post doesn't have the fullpost span tag, it will not show the word "Read more"?

Unknown said...

Hoctro, Jason,

I understood your question later. Hans and I are trying to get this done. It should be out soon.

SQT said...

I think what Hoctro was asking was if there is a way to not have the "Read More..." appear on some posts, eg. a really short post. I'm also curious if this is possible.

I know if you go to the "edit HTML" when you're writing the post and take out the code, you'll end up with a regular post. Is that what you want? Or do you want the post to still expand but without the "read more" text?

Unknown said...

SQT,

They're asking for "Read more" link to appear only if the post is divided into summary and fullpost. It's a good idea to implement. Hans and I are on it.

SQT said...

They're asking for "Read more" link to appear only if the post is divided into summary and fullpost. It's a good idea to implement. Hans and I are on it.

It all makes sense now. Thanks

Anonymous said...

Ramani, I finally got the stuff up and running. I called them Super Peek-A-Boo Posts, and they are online now.

So folks, you can have posts that expand and collapse with one click.

And if your post has no summary, the "read more" link will not show up.

This co-production of Ramani and me works fine, as you can see here at Hackosphere. Check it out at Beautiful Beta as well.

If you installed my previous hack on you Blog, please switch over to Ramani's javascript-code, as we decided to join forces on this and standardize stuff.

Unknown said...

oh wow, Hans you already wrote about it. My job is now easy. I will just point to your post.

Unknown said...

Ramani, thanks for your great works! You really did a great job and enhance all the bloggers'
and readers' experiences.

I've also got the problem with the "older posts" at my blog. Is it casued by peekaboo hack? I checked with phydeaux3's blog:

http://phydeaux3.blogspot.com/

and it seems that his blog is perfectly OK with the "older posts".

Really hope that we can get rid of that annoying error dump.

Unknown said...

Wesley,

No, its not because of peekaboo hack as I had clarified. Phydeaux3 seems to have modified older posts page not to show entire posts and thats why its ok. Yesterday, I tried his blog and it did have the problem. Only Blogger can fix it.