Pages

Friday, June 8, 2012

3

Small update to Adding Post titles to Older and Newer Post links

Since Blogger has started rolling out local domains, depending where you view the blog, the links inside the blog may not be anymore blogname.blogspot.com/ but may be for example blogname.blogspot.co.uk/ or blogname.blogspot.fi/.

However, the urls are internally still blogspot.com and also in blog's feeds. My hack for Adding post titles to Older and Newer Post links fetches the posts' urls and titles from feed and tries to change the older/newer post links' texts to post titles using the url. Local domains disturbed this, no match was found and a pseudo title was generated instead.

So I had to make a small update that changes the local domain back to .com before matching it with feed urls. Lines 34 and 41 are new, both containing this same code:
href = href.replace(/\.blogspot\.[^/]+\//, ".blogspot.com/");
If you have this hack installed, I suggest you make the same update. See the whole hack with installation instructions here, source code updated: Add post titles to Older and Newer Post links.

Update June 27th 2012: new version of this hack is here, I suggest you consider using it instead of this.
[Hide comments] - [Show comments]
Click on a single comment to hide/show its text

3 comments:

Ismail Sosse Alaoui said... [reply]

Hi MS-potilas, how are you?, i hope that you are fine genuis.
i want to send you a script via email but i don't find email adress on your blog; to help me to find the error on it because i work on it since 2 months but just faillure, if you can send me your email adress on mine :isossealaouipro@gmail.com, to send scripts.
thanks to answer

MS-potilas said... [reply]

@Mr Admin
I've been quite alright, thank you. I sent you an email so you can send me your script. As always, I cannot promise for certain that I can help. But I can give it a look. :)

I've been thinking of making a contact form on this blog, it is easy using for example Email Me Form or some other service, although Blogger does not have it built in. But I'm not sure if I'll do it or not.

Ismail Sosse Alaoui said... [reply]

Okey Thanks, and idea of contact form is better.@MS-potilas

Post a Comment

Related Posts Plugin for WordPress, Blogger...
See the hack
for this dynamic
views icon: