Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Print this comment option

dan39dan39 New
edited February 2007 in Vanilla 1.0 Help
I found an interesting DOM script that looks for a specific class and places a link inside that class that lets you print just that div. I think it would work great on the CommentBody div (so you could just print a specific comment), but I don't think I'd be able to turn it into an extension without modifying the theme by hand.

Anyone think they could take this script and make an extension out of it that works with all themes?

http://lloydi.com/blog/2006/03/21/how-to-print-selective-sections-of-a-web-page-using-css-and-dom-scripting-2/

I'm sure there's probably an elegant PHP solution, but I wouldn't know where to begin. I thinking that it would look something like this:

Comments

  • Cool script, works well, I wish I had a use for it!

    Posted: Saturday, 3 February 2007 at 4:27PM (AEDT)

  • I totally have a use for it. My coworker is constantly printing from the PM install of mine. I was just having her use Grab (OSX) and only selecting the comment(s) she wanted. This would be totally cool. I'd like to see this happen.
  • There is such a WP plugin that I use to do this. You can see it on http://www.jwurster.us/wordpress/. There is a little printer icon.
  • dan39dan39 New
    edited February 2007
    The wordpress plugin is really a print-to-preview. Personally, I think it's a bit jarring. I think the DOM script is preferable. It's cleaner because it keeps the user on the page and the view doesn't change. It just prints.
  • This is a cool little idea, I wonder if anyone will run with it.
  • I started playing with this over the weekend and do have it working but with one major display problem. It was really easy to implement into an extension by just including the js and style. But I had to change the js to work with the Vanilla comments. So, I got it to work but with this display problem. If anyone knows js well and can help me, I would appreciate. We can take the discussion offline, unless you think a description of the problem would be of interest to everybody.
This discussion has been closed.