Hoctro's Place - Góc Học Trò

I am now more avtively creating and adding contents to my music blog, please take a look. http://hoctroyoutube2010.blogspot.com/

Calling for New Ideas for an Advanced Related Posts

Hi,

I'm thinking of updating my "Related Posts" widget in lieu of the advancement in JavaScript libraries such as AJAX Feed, AJAX Search, JQuery, etc.

The new widget will certainly not a new main "Blog Widget" but acting like any other widget (you can move it around). I think I can now trying to use JQuery to look for all the posts' labels without doing the b:loop twice. I'm also thinking about using advance containers in JavaScript, if it has, such as map, set, etc. to store unique url values instead of doing the n-order check.

Let me know your idea.

I don't have lots of extra time, but will try to make room to rewrite this mashup.

Cheers,

Hoctro.
Labels: JavaScript, Related Articles, Widgets

4 comments:

Natxo said...

Hi there!
I'm usin your related post script in my blog, but noticed something's wrong. You see, some labels like "Gràcia" or "What's on" won't show properly as you can see here http://whattodoinbarcelona.blogspot.com/2010/08/gracias-annual-local-festival.html or http://whattodoinbarcelona.blogspot.com/2010/07/electric-shoes-in-concert.html
Seems like there's a problem with the script managing apostrophes and some punctuation. It'd be nice if you can fix that in your next script, and no good at all with java scripting!
Thanx for your time!

18/8/10 10:45
Natxo said...

i meant that "I am no good at all with java scripting" sorry, i'm not a native english speaker so i screw it up some times!

18/8/10 10:48
Hoctro said...

I understand your comments, so not to worry. Thanks for posting! Please try the new widget out from the new post I've just posted.

Cheers,

19/8/10 00:40
Hoctro said...

Hi Natxo,

You use a widget I did long, long time ago when I didn't know how to use the encodeURIComponent(textLabel) fuction, such as:

var url = homeUrl + 'feeds/posts/default/-/'
+ encodeURIComponent(textLabel);

To fix this, go to the source code of your blog, and replace this line:

script.setAttribute('src', query + 'feeds/posts/default/-/'
+ label +
'?alt=json-in-script&callback=listEntries10');

with

script.setAttribute('src', query + 'feeds/posts/default/-/'
+ encodeURIComponent(label) +
'?alt=json-in-script&callback=listEntries10');

and hopefully it'll work, otherwise use this newer widget instead:

http://hoctro.blogspot.com/2008/10/new-and-improved-related-articles.html


Regards,

Hoctro

19/8/10 23:44

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2011 (2)
    • ►  September (1)
      • It's been ten years already! 9.11.2001-9.11.2011
    • ►  January (1)
      • YouTube is now integrated into Blogger!!! (But I s...
  • ▼  2010 (8)
    • ►  December (1)
      • Happy New Year 2011 & Introducing my new blog
    • ▼  August (5)
      • Dissecting the New Related Articles Widget - Part ...
      • The new comment managing system from Blogger
      • Pages-Related Articles-Your Own Photo: A Blogger's...
      • Introducing The New Related Articles Widget
      • Calling for New Ideas for an Advanced Related Post...
    • ►  March (1)
      • How to quickly upload your pictures to a new or ex...
    • ►  February (1)
      • Embedding Youtube music links in your blog (withou...
  • ►  2009 (5)
    • ►  December (4)
      • Improved "Table of Contents" Widget
      • New and Improved "Related Articles" Widget using t...
      • Translation Widget: Translating your current post ...
      • Season's Greetings
    • ►  October (1)
      • Lenka
  • ►  2008 (5)
    • ►  October (2)
      • New Translation Widget
      • "Blog List" Widget
    • ►  September (3)
      • "Latest Headlines" Widget
      • (Superseded) "Related Articles" Widget
      • Gadget
  • ►  2007 (11)
    • ►  September (1)
      • Adding a front page to your blog
    • ►  May (7)
      • Andreas02 Template
      • Yet another TabView Application: Latest Posts of F...
      • TabView Application: A Blogger Hack Directory
      • Introducing TabView Widget - Part 2
      • TabView Widget
      • Overcoming the "25 Latest Posts" Limitation
      • Overcoming the "25 Recent Comments" Limitation
    • ►  February (1)
      • What is a widget, after all? (continued.)
    • ►  January (2)
      • What is a widget, after all?
      • Showing Related Articles to your Post
  • ►  2006 (16)
    • ►  December (2)
      • Showing Headlines by Labels
      • Adding Google Text Search Utility with Custom Tab ...
    • ►  November (2)
      • "Listing of Contents" Widget
      • How To Modify the Blogger Template - The Core Java...
    • ►  October (3)
      • Showing Link List or Label Widgets as Tabs
      • It's a boy!
      • Understanding the New Blogger Template (3)
    • ►  September (9)
      • Understanding the New Blogger Template (2)
      • My Blog Has Just Made It to "Blogs Of Note"!
      • Understanding the New Blogger Template (1)
      • Showing your Blogger Labels as Vertical Tabs
      • Adding a Breadcrumb Trail to your Blogger Post
      • Showing your Blogger Labels as Tabs
      • Blogger Hack: Creating Thumbnail Pictures
      • My First Blogger Template Attempt
      • Welcome to my Blog

Labels

Archived (28) Widgets (10) Miscellaneous (8) Related Articles (4) Blogger Tools (2) Gadgets (1) JavaScript (1) New Music Blog (1) Template Designer (1)
Powered by Blogger.
Loading...