Skip to search.
dotcomments-support · dotcomments

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

  Messages Help
Advanced
New Blogger and your soon to be broken comments   Message List  
Reply Message #445 of 928 |
If you use Blogger, chances are you've seen the news on the front page that
they'll be migrating existing blogs to the new system over the next couple
of weeks. Mostly, that's good news, since the new system seems to work for
the most part. However, you'll need to make a couple of little changes to
the way you link to your comments and call the commentCount function, to
keep your comments from breaking.

The new system uses 18-digit numbers for <$BlogItemNumber$>, rather than the
8-digits numbers the old system used. Assuming it's going to use them for
migrated blogs as well as newly created ones, that's a problem, because
that's one more digit of precision than a Javascript or PHP number, so
123456789012345678 turns into 1.2345678901234568 times 10 to the 17th, with
the 78 rounded up to 80, and that's a problem for you since your
javascript:viewComments(123456789012345678) link will end up opening a popup
for 123456789012345680, and since your page doesn't have an item with that
number, the count won't work (and in fact, wouldn't anyway, because PHP will
do the same rounding when calling the commentCount function).

The easy fix is to just edit your Blogger template, and add single quotes
around <$BlogItemNumber$> both places where it appears in the code that
makes the link, in the link href and the commentCount() call:

<a href="javascript:viewComments('<$BlogItemNumber$>')"><? echo
commentCount('<$BlogItemNumber$>'); ?></a>

That turns it into a string rather than a number, which is fine, since it
gets turned into one in both functions as soon as it's concatenated into a
URL anyway.

Unless I'm missing something (I just noticed this problem when someone asked
about it this morning), everything else seems to survive the change.

Phil Ringnalda




Sun May 18, 2003 8:33 pm

philringnalda
Offline Offline
Send Email Send Email

Message #445 of 928 |
Expand Messages Author Sort by Date

If you use Blogger, chances are you've seen the news on the front page that they'll be migrating existing blogs to the new system over the next couple of...
Phil Ringnalda
philringnalda Offline Send Email
May 18, 2003
8:33 pm

question about this change. Do we need to make the changes to the blogger template before it migrates? and how will that affect the archives (that have...
pero theus
peromedic Offline Send Email
May 22, 2003
7:59 pm

... You shouldn't need to make the change until just before the first time you post after your blog has been migrated: the ID numbers for existing posts stay...
Phil Ringnalda
philringnalda Offline Send Email
May 22, 2003
8:20 pm

*Whew* Thanks for the fix, Phil. I hadn't posted in a while so I was quite taken by surprise with the "new" blogger and the dotcomments error it created. I...
Rick Scully
terrapingardens Offline Send Email
Jun 27, 2003
3:06 pm

I made the changes listed here and I get a publish error. I was wondering if the two are related and I maybe missed another update to what this message states...
pero theus
peromedic Offline Send Email
Jul 9, 2003
6:40 pm

I recieved the same error message with "unknown host" the last time I tried to publish something also. I replaced my ftp address with my ip address and it...
' nara '
sugababyy Offline Send Email
Jul 9, 2003
7:49 pm
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help