2005-11-16

Blogger publish ping and categorizer tool

I've done some further updates and improvements to my comment blogging helper Greasemonkey user script announced earlier, and since it has more than doubled in size and I don't seem to get much feedback about whether these tools work or not (perhaps they all do everywhere, though I would be surprised -- I have just tested them in Mozilla 1.5RC2 so far), I opted not to just overwrite the old version.

So, what's new? Well, I wanted to make it easier to ping external sites which track new blog posts using HTTP pings rather than polling your RSS feed once in a while, and so the new version adds ping buttons to the publish page. In this version, it supports Pingoat and Svensk lemonad, quite simply because those were the only ones I remembered off the top of my head (<hint>request features!</hint>).

screenshot


For those of you eager enough to already have taken it out for a spin, here is why it didn't add any buttons -- you have to configure it first. Messy, I know, but there is some thinking behind that too. When you set Pingoat up to ping lots and lots of other sites, there is a point in targeting just sites who apply to your blog. (Or you might be signalling membership in circles you are not part of -- for instance, I believe queerfilter only lists blogs whose authors are not heterosexual. I decided myself on not pinging queerfilter, among others.) First and foremost, though, if you have not installed the script yet, do so.

What you do next is you check the boxes that apply, fill in your blog URL (and optionally feed) and click "Go Pingoat!" -- and lo, at the same time, you also completed the configuration of the publishing ping tool. Because it listens in on your visit to the Pingoat page and configures its Pingoat button to point to this URL. For the blog you configured only. Yep. That wasn't hard, was it?

For Svensk lemonad, a Swedish only site for Swedish geotagged blogs (awfully slim category, I know, but I happen to qualify), there is really only the option of giving a URL to your blog, and it might be argued that such ping sites could be added to all publish pages, regardless of the configuring step? (I am back-tracking my own design thinking now, but bear with me.) That was my first thought, before I had written the code. Because the code happened to become a plugin system which it is very easy to add lots and lots of new buttons to for new ping sites, and it struck me that many of those most likely will apply to very small audiences, such as mentioned lemonade site. So instead of tossing up lots of junk on everybody's publish pages, I decided on this "opt in" kind of system. If you want Svensk lemonad, go there once and set it up, and you will get the button. If not, don't, and you won't see the thing.

So far, so good. So, what happens when you click one of these buttons? Well, the ping page is loaded. Only not in a way that loses the publish page -- it's done in the background, and the icon will slowly pulse while the page is being fetched. When the pulsing stops, it's finished (and hovering the image will tell you how it went). But you don't really have to hover it to know, because if it failed, the flashing will stop at a semi-transparent button, whereas it will be fully solid if it was successful. Typically you will only see it go from solid to transparent to solid once before it's done, but don't be disappointed. You'll get to see it again next time you post. ;-)

If you really want to see the results, though, you can open the link in a new window or tab, but I would suggest not clicking on the button first, because then both the helper and the new frame will perform the ping, and at least pingoat will only report its results on the first click (telling you to wait for a while before pinging again on the second click -- and a healthy design choice too, if you ask me).

That's pretty much that. This article would probably be a lot more selling if it also explained what the ping protocol does, is, and how this would benefit your blog's visibility, but I don't have any pointers handy. Oh yeah, almost forgot. There are keyboard access keys added too; you see them marked with underlines for the text links, and get mouseover hints for the buttons. I added the same feature for my CommentBlogging user script too (read the full article, if you missed it) while at it; you might want to reinstall, to get Alt+d for adding the tag and Alt+o (on Windows; the qualifier key differs across platforms) to go to the original post from the "comment posted" page. The same keys apply on the publish page as well. Enjoy!

Not quite satisfied with how it came out?

This article only covered how to get the information there, not how to format and/or style it. For those of you not already well versed with Cascading Style Sheets you might want to read my follow-up article on visual layout with CSS.

Feedback

If you value my work on this, feel free to drop me a symbolic donation; it would mean a lot to me (but don't feel obligued to). Thanks.

63 comments:

  1. Excellent suggestion; implemented now. You have to visit the "bookmarkable" link once (where your URL shows in the address/location field) to set it up.

    ReplyDelete
  2. Greetings,

    I installed your script and have been using it. I haven't commented yet because I wanted to get a few posts with it under my belt. I've noticed that it sometimes fails, but I've not noticed particulars. It may happen when I don't link to the del.icio.us page first, but I'm not sure. Or it may be something that I'm doing (or not doing).

    Anyway, it's an awesome script, thanks very much for your hard work.

    I'll try the latest one. You might add the blogflux pinger, though perhaps I should just switch to pingoat.

    Great work!

    ReplyDelete
  3. Thanks. The more, the merrier; blogflux also added to the mix now; do keep them coming. :-) Maybe I ought to read up on the ping standard itself (good pointers always welcome), so you can add your own ping URLs directly, rather than going through ping aggregators like these.

    Regarding bugs, even if you don't know the cause of the failures, it would help me a lot in figuring it out for myself if you could describe in what way it fails, as in what you expected it to do in which situation, and what it did or did not do in that respect. Failure can mean so much; not picking up a link during configuration, not showing a tags field, not doing anything when clicking a ping button, and so on.

    ReplyDelete
  4. The only services I would ping would be feedburner and technorati... but i think blogger does this automatically, correct?

    ReplyDelete
  5. I guess I was a little non-specific with my use of "failure."

    A couple of times the script apparently ran okay but when I left blogger's "post published" page to view the results, there were no tags on the post. The information was bookmarked at del.icio.us, but I had to manually insert the tags into the post.

    Now that I think about it, this hasn't happened since your first revision of the script a few days ago. And it didn't occur on either of the two post I've published with the brand new script.

    And thank you for the addition of blogflux. U D Man!

    ReplyDelete
  6. Thanks; ping-o-matic added too, along with some other minor features I have been missing for a while.

    All pingers are good; this is about making people feel comfy, allowing them to keep using tools they like and are already familiar with, migrating only as much as the user feels like. They have probably made some investment in time in coming up with a ping bookmark for their blog already, and this just lets them keep using that, though with greater convenience.

    ReplyDelete
  7. hi,

    i have tested your original script and this one in firefox rc3 with and seem to be getting the same problem, in the post page instead of a Tags textbox and a Link textbox i get two Tags textboxes.

    If i put tags on the first one and post then everything works fine and tags get added into the post, but if i try to edit a post then the tags are grabbed and put into the second tags textbox (the one that should be the link textbox according to your original post screenshot) and tags put on that one just dont get posted so everytime i want to edit i would have to cut and paste into the first tags textbox.

    Dont hesitate to ask me for additional feedback, screenshot or any additional tests.

    ReplyDelete
  8. Interesting. A screenshot might be helpful, but I might get by on less; for instance, does your blog use the post title feature, or have you turned off the Title field? (The interception code adding the Tags field might need some revision to handle that; I have admittedly not tried that out yet.)

    ReplyDelete
  9. duh! was my fault, i didnt have show link enabled in blogger so your script wasnt working at all so somehow playing around i activated the original blogger tag adder script and that made your gm script start to work but with the problem that i described.

    Turned on show link and disabled the gm script and now everything is working flawlessly.

    thanks for the help and congrats for a so wonderful work! :)

    ReplyDelete
  10. There is. The trick is to make sure you are logged in at Del.icio.us when you follow the link; then all the info will already be there when you click it.

    This can be accomplished in many ways -- either, if you, like me, keep very long browser sessions, just avoid logging out from Del.icio.us when you are done. Or, you can open the link in another tab or window first, log in, and then switch back to the publish tab or window, and click the link again.

    A third option, which I'm hoping might relieve you and everybody else of the problem in the future, is to bug report the Del.icio.us login page, which loses the information sent to the bookmark page when you try to login. I'll try that route now; for the time being, we will have to make do with the other solutions.

    ReplyDelete
  11. I'm afraid approach three is dead in the water; the tags field is intentionally filtered by the login page.

    I might be coerced into making a Greasemonkey bypass for this, but at the moment I'm too tired and grumpy.

    ReplyDelete
  12. Hi there johan,

    great script thank you. There is a problem at the end of the process for me - at the "your blog has been published" screen.

    The "view post" and the Del.icio.us links that your script generates point to a wrong URL. They point to an FTP folder, as I publish the blogger blog on my own site. The folder "docs" on my site is needed for FTP transfer, but does not work of course for http, which is just http://bonhom.ie

    ReplyDelete
  13. ... and, just to complicate matters, the screen hangs on "your blog is being published" while waiting for something from www.blogger.com, if you go in to an already saved draft post, or edit an already published post and go to publish it again.

    But it has been published! It's not the normal blogger publishing slowness, because it happens with firefox but not with explorer.

    sorry to be the bearer of bugs! It's a great tool! :-)

    ReplyDelete
  14. (That's weird; I was dead sure I had already commented on this?!) Anyway, this is something I can probably fix, with a bit of help from you. If you could save a version of your Your blog published successfully page, script turned off (or, better still, two versions -- one with the resulting page after performing Republish Index Only, one after Republish Entire Blog), and either mail it to me or give me a URL to it, then I can most likely come up with a fix for the problem. (A HTML only copy will do; I do not need to actually see any images to figure out what to change in my code.)

    I only have access to the Blogger hosted version of a blog, and this most likely requires additional support for your mode of publishing.

    ReplyDelete
  15. Hi Johan,

    I've emailed those to you now. Cheers.

    Dermod

    ReplyDelete
  16. Hej Johan,

    Nice scripts. Is there any way you could extend the tagging script to also work with the BlogThis dialog? That would be very useful.

    Also, when I opt to save a draft post, the blog still republishes, which is somewhat confusing.

    Thirdly, the very first time I ran the script, the configurator did not use the delicious account I entered, instead it kept the name of the blog as the delicious account. Somehow, when I went back to repost it showed that it HAD stored the correct delicious account, and on subsequent posts the correct link was created.

    ReplyDelete
  17. Done!

    Also, when I opt to save a draft post, the blog still republishes, which is somewhat confusing.

    I guess this is what happens when you draft a post that was published before -- effectively unpublishing it again, until the next time you choose to publish. Or it might have been a bug I fixed for version 1.10 now; I can't seem to reproduce this otherwise.

    ReplyDelete
  18. Hi,

    Like Dermod, I also publish to ftp. Have you found a way around this problem yet?

    Thanks so much for all your work!

    ReplyDelete
  19. After playing around with the css I still have a major gap (two lines?) between my "filed in:" and the generated tag.

    I don't have a clue how the script works, so if anyone could have a look at this post and get in touch, I'd be mighty grateful!

    ReplyDelete
  20. Johan: outstanding script. I am running into two problems that I can't seem to figure out. Unfortunately I haven't looked at Java in about 4 years so I'm having a hard time trying to modify your script.

    1) After I publish, I am getting the wrong permalink to my post. Here are the links I am getting:
    archives/2005_12_25_lawnrangers_archive.html
    2005/12/test-post_31.html
    archives/lawnrangers_archive.html
    atom.xml
    index.html

    For some reason, in the "Link to del.icio.us" link, I am getting the 3rd link here rather than the 2nd permalink.

    Any suggestions on how to modify the script?

    2) How would I modify the script to hide the links in the post?

    Thanks!

    ReplyDelete
  21. 1) I'm afraid publishing by ftp is not supported yet.

    2) I probably don't understand what you mean. If you want the Del.icio.us text field not to list the contents of the Link: field when provided, you can drop the bit between extended : time and the following comma in storePostData.

    ReplyDelete
  22. Johan:

    1)I am not using FTP. I am hosted at Blogspot. Here is a screenshot of what I am getting. Notice the detail links and the link at the bottom when I hover over "Link to del.icio.us.

    2) I don't want my blogger post to visibly show the links I added.

    Thanks!

    ReplyDelete
  23. 1) Oh, that variant was new to me. I think I fixed it now, and incidentally also might have managed to fix the ftp publishing mode while at it.

    2) I suggest adding a div.tags { display:none; } clause to your CSS section at the top of your template to hide all tags from all posts.

    ReplyDelete
  24. Johan: Outstanding! What a great script. Thanks so much for your help!

    ReplyDelete
  25. Thanks Johan,

    This script now appears to be working with blogger ftp.

    Thanks so much!

    ReplyDelete
  26. I installed the newest version of this script and have now lost the "Link at Delicious" link which used to appear after publishing the post! BTW, I also lost the View Post link as well. Prior to this, everything was working outstanding!!! Any ideas?!? Thanks in advance.

    ReplyDelete
  27. Thanks so much for this script. I use it on my computer at work and I love it! However, I am encountering the following message when I try to install the script on my laptop at home. Do you have any ideas?

    Error: uncaught exception: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIChannel.open]" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: chrome://greasemonkey/content/utils.js :: getContents :: line 167" data: no]

    ReplyDelete
  28. Flogger: Interesting; what mode of publishing do you use; Blogger hosted? Ftp? Is there any error printed to the javascript console (Tools menu: Error Console) when the script gets invoked? Try clearing the console prior to publishing, so you only see printouts related to the script. I would appreciate if you mailed them to me, if any; on right-clicking one, you should be able to copy it to your clipboard and paste it into a mail with ctrl+V.

    You could also try moving through back versions of the script, stopping when you find one that works, and tell me which version number the last working one had, which also would help me nail down and fix the problem.

    I believe I do, Chris. Try the tips at Greaseblog to fix that issue.

    If you value my work on this, feel free to drop me a symbolic donation; it would mean a lot to me.

    ReplyDelete
  29. Still excellent stuff Johan, many thanks. Just a small thing: I've noticed a few posts which end up with a blank space being tagged. Is there a way of adding a line to your script which catches that along the way? ie, if (tag != " ") or something?

    The reason I noticed this is that a planet planet aggregator gets broken by my blogspot feed whenever I post something with an in it. The aggregator is too sensitive for this planet.

    :-)

    This is only a tiny thing. It's a fantastic tool.

    ReplyDelete
  30. How can I change the tagging options after they have been saved? I know there was a popup telling me, but I missed it. Thanks!

    ReplyDelete
  31. Everything seems to have worked successfully except the tags only show up on the static post page. Have I forgotten something?

    ReplyDelete
  32. Not that I can see, but then you didn't give me a link to a specific page where you expected something and didn't find it, so maybe I just missed it.

    ReplyDelete
  33. Ah, it works now. I think Blogger was just slow to update it on the main page. Thanks and great work!

    ReplyDelete
  34. hi, loved the idea of this script and everything happening almost automatic. installed it and everything looked perfect. i tried it out on one blog ( http://lmog.blogspot.com )

    i think i've missed something easy. i'm sorry. when i click on the link in the post i get take to my delicious account which says no item found :(

    can you tell me what i'm doing wrong.

    thank you,

    ReplyDelete
  35. Yes, "almost automatic" are the key words; you must manually click the link that says "Link at Del.icio.us" to actually tag the posts there. Just repost the articles without changes to get to the link again, click it, and tag as usual using the Del.icio.us web interface.

    ReplyDelete
  36. hi!

    I did click on the link and maybe a i did it a few times as i was trying to figure out what the 3 pop-ups were about.

    now when i click on the published tags it say no items. i have gone to delicious following the link as per the instructions however sometimes wrong link shows up.

    I've tried this out on my first and last post on the blog. but no luck on a listing on delicious so far. will keep trying and get back to you. thanks for getting back so quickly.

    shall delete the tags publish then add the tags and republish and see if it makes a difference. the problem is the listing on delicious. tags are showing up with links and the right page on delicious etc.

    ReplyDelete
  37. realised that i've rambled a bit
    i have been clicking on the delicious link. going to the delicious site and saving the tags. then republishing the blog and then going to view blog and clicking on the tags under my post.

    ReplyDelete
  38. still not working :(. hope you can help.

    ReplyDelete
  39. You seem to have managed to create some tags with commas in the tag name at Del.icio.us, which the script linked at this page shouldn't be able to do.

    If reinstalling and reading up on how to use it here, or in linked posts describing other people's success stories, or asking other peers for help does not help you, neither will I, and you will have to settle for some other method. My time and energy just isn't enough to spend on support for all the free tools I publish.

    ReplyDelete
  40. well thank you for the time you have given so far. I will go back and remove the commas where I have put them and try again. and if that fails as, of course, I can always choose another solution. thank you again.

    ReplyDelete
  41. This comment has been removed by a blog administrator.

    ReplyDelete
  42. hi, i'm back to report that you were right, the commas seem to have been the problem. it's working fine now and all i have to do is start tagging all my past posts. thank you for your patience and of course this solution.

    ReplyDelete
  43. Hi,

    Thanks of this very useful hack.

    For some strange reason, neither your website's script or mine (http://filination.blogspot.com) shows up correctly on my browser anymore, and I think it has to do with my move towards Firefox 1.5.0.2 (from Firefox 1.5.0.1). Is it possible that something changed with this small upgrade?

    ReplyDelete
  44. (Opppss... my mistake. I was referring to a different script you wrote with the calendar. The JSCalender doesn't seem to show up on Firefox 1.5.0.2)

    Regarding this script, I would like to ask a different question -
    when there's an error while posting (like posting embedded FLASH which you can ignore) and selecting "ignore errors" re-post action, the categories no longer show up. How come? is there something in that page that changes the way the script is running?

    ReplyDelete
  45. Yes; that is an unhandled condition that this script bugs out on, I'm afraid. It has been bothering me too, from time to time, so chances are I'll fix it and release a new version.

    ReplyDelete
  46. Johan, great script. Yhanks a lot. I'm experiencing some troubles since yesterday night with the script for some of my blogs. Specifically I think the problem is with the second configuration screen and the fourth one, showed when i click the Tags: label.

    The second one is to define a constant tag that will be added "Tags that you want on al your posts".

    Well, I have defined a constant or permanent tag, i. e., my blog's name: MyBlog.

    Well, for some of my blogs, the constant tag works just fine, it's added to the tag list when i post to del.icio.us. But for some others, it doesn't work, the permanent tag is not added! I unistalled and reinstalled de script several times, restarted Firefox (v 1.5.0.4)and rebooted my PC with the same results.

    Any suggestions? Thanks for your help.

    ReplyDelete
  47. Ooops! forget about the fourth screen I mentioned on my last comment.

    ReplyDelete
  48. I'll need more specifics to be able to help; URLs to posts (or a post) where it didn't work, most importantly, and what you wrote on the second screen for that blog.

    ReplyDelete
  49. Johan, sorry for the delay. I’ve been busy at work. Also I’m gathering significant information about the supposed bug. So far, I’ve detected this:

    1. I’m using Technorati’s Performancing for posting. This Firefox extension doesn’t allow me to define a link for the post title, so I’m saving it as a draft. After editing and posting it from Blogger’s Dashboard, the constant tag it’s not added (this applies for all of my blogs). If I save the post as a draft from the Blog this! window, the automatic tag is added when posting, same if I post directly from the dashboard. Hence, the error seems to happen only if I save the draft using Performancing.
    2. When I use the Blog this! window, no Post to del.icio.us link is showed after the post. Is it OK?
    3. For your script’s first time configuration on the Blog this! window, it retrieves the information, at least the blog name, from the previous configuration. Example: I configure the options for the BLOGA and post normally. When I try to configure BLOGB, it says BLOGA for the automatic tag and the del.icio.us URL This is not a big deal, but it’s a bug, so I’m hoping this report can help you to improve the script.

    Hence, the original problem’s description I gave to you was inaccurate. The real problem seems to be related to saving the post as a draft form Performancing. I know it’s a third party piece of software, so maybe it’s beyond your reach to solve this problem. A confirmation of that will be very helpful.

    ReplyDelete
  50. this has probably already been answered, but how do I stop things from being added to the delicious URL on the blog?

    e.g. I set the URL as http://del.icio.us/myusername/tag.
    I get http://del.icio.us/myusername/myusername+tag on the blog page.

    So when you click on that link, not surprisingly, no posts are visible.

    ReplyDelete
  51. Reconfigure the script (clicking the Tags: label) not to add the "myusername" tag to all posts. That is, on the second question, answer with an empty string. Edit all posts with the incorrect link and republish them, one by one.

    ReplyDelete
  52. that's the rummy thing. I have not used this feature (tags on all posts) at all. Yet it persists carrying on adding the myusername tag when I havn't actually set it.

    Is this a bug, or am I being stupid somewhere?

    ReplyDelete
  53. Hi there,

    Since updating Firefox for Windows to 1.5.0.6 and the Greasemonkey script to 0.6.5.20060727 your wonderful script has stopped working, I'm afraid. The screen hangs on "publishing" and remains stuck at 0%. I had to go to Internet Explorer to publish my post, without the tags of course. Any ideas?

    ReplyDelete
  54. I'm afraid not; now that I have come about doing the same myself, I haven't had any such experiences, I'm afraid.

    Probably not much consolation, but I'm sure the script will break even worse, once you upgrade to the new Blogger beta service which comes with its own tagging method. I'll most likely in due time rewrite a revised version for the new system that addresses the bits I still think make sense to add on top of it. But don't hold your breath. :-)

    ReplyDelete
  55. Hi,
    I've been looking for ways to automatically ping Norwegian blog-aggregators:
    - http://bloggarkivet.net/ping/no/
    and
    - http://www.bloggrevyen.com/ping/001

    Would you consider them for your script or are they too specialist/too narrow?

    I've looked at the Greasemonkey-script, and it seems quite easy to add new sites to ping, btw, so I'd play with your script to add those sites myself.

    ReplyDelete
  56. hello , i use this script since one year , and it work fine , but when i change for the new version of blogger , he didnt work anymore. have you an idea ? Thank's.

    ReplyDelete
  57. Stephen Paul Weber has taken on and made a new version of this tool that goes well with the new Blogger too. You get Trackback functionality as a bonus on the side.

    ReplyDelete
  58. I'm a new blogger, and I just knew this information about pinging for my blog here in your blog. Thank you for sharing.

    ReplyDelete
  59. Ok, maybe im too stupid with this kinda thing. Forgive me for this question, but how do i install this script on blogger?

    I already try to find anything related to it in your blog, but couldn't find it :(

    ReplyDelete
  60. The comment above about a version for new blogger may be your best bet -- this tool was made to work in the Blogger that existed in 2005, and has since lost maintenance of mine.

    ReplyDelete

Limited HTML (such as <b>, <i>, <a>) is supported. (All comments are moderated by me amd rel=nofollow gets added to links -- to deter and weed out monetized spam.)

I would prefer not to have to do this as much as you do. Comments straying too far off the post topic often lost due to attention dilution.

Note: Only a member of this blog may post a comment.