I was just perusing some of the sections like Perl News and noticed there are a large number of Reaped Nodes. I like to be able to see them but they are becoming a big distraction. Would it be possible to e.g. list them all at the bottom of the page (similar to how nodes waiting for approval in SOPW are listed at the bottom)? Or would it be hard to make an abbreviated reaped node entry? Or is there some CSS wizardry that would work with IE7? Something along the lines of Re: Do Not Feed the Trolls!!!?

Update1: I guess my second sentence was not clear enough -- I would like to be able to see that they are there but have them be much less obtrusive. I do not want to just make them disappear. Also, I do not use Newest Node, etc. I just go to Perl News from time to time.

Update2:I think Fletch's suggestion in Free Nodelet Hack: Re: Reaped Nodes are Cluttering up some of the Sections is a great workaround! Thaks for all of the responses!!

  • Comment on Reaped Nodes are Cluttering up some of the Sections

Replies are listed 'Best First'.
Re: Reaped Nodes are Cluttering up some of the Sections
by Fletch (Bishop) on Mar 19, 2008 at 20:34 UTC

    Presuming one loads jquery in ones free nodelet . . .

    function pm_clean_reaped() { $('td.node-from-52855').each( function( idx ) { $(this.parentNode).r +emove() } ); } $(document).ready( function () { pm_clean_reaped(); } );

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

      I don't think you need to play CSS tricks. Just designate that you don't want to see reaped nodes of both types. These settings appear to currently be on Newest Nodes settings even though I don't believe that either of those settings are specific to Newest Nodes1.

      1 I believe it at least used to be that one impacted Newest Nodes (and Recently Active Nodes and perhaps more recently many/most/all of the "section" main pages that list root nodes of a specific type) while the other impacted the display of replies in threads. But I leave sussing out the current details of this to other members of pmdev and sitedocclan (in case the documentation isn't clear about it).

      I believe the default is "don't show reaped nodes" for both settings so if one is seeing lots of reaped nodes, one likely previously changed a setting or one has found a section that hasn't yet been "fixed" to not show reaped nodes to those who don't want to see them.

      I did look at Perl News to see a bunch of reaped nodes shown, because, as an administrator, I don't choose to have reaped nodes hidden from me. Then I turned off the above settings and refreshed and the reaped nodes were indeed gone.

      - tye        

      As tye says, there are already options that should work to not show reaped nodes in the first place, so no javascript is required for that (and I'm not sure where your node-from-52855 came from anyway). But the OP said they do want to see reaped nodes, but not have them be as much in the way when there are many of them.

        Hrmm, I wonder what this user could possibly have to do with reaped nodes in the Newest Nodes listing . . . .

        At any rate that's what I use to clean Newest Nodes. I rarely if ever hit the section pages directly so it doesn't do anything there, but it cleans NN pretty well (perhaps pm_clean_nn would be a better name). If they want to actually see the expunged nodes it's a starting point (Warning: noob jquery follows . . .).

        function pm_clean_reaped() { $('td.node-from-594086').each( function( idx ) { // tbody > tr > this td var containing_ele = this.parentNode.parentNode; if( containing_ele ) { var reaped_td = $( "td.reaped", $(containing_ele) ) if( reaped_td.length == 0 ) { $(containing_ele).append( '<tr><td colspan="2" style="font-s +ize: 0.7em;" class="reaped">Reaped: </td></tr>' ); } var reaped_node_href = $( $('a', this ) ).attr('href'); $( '<a href="' + reaped_node_href + '">X</a> ' ).appendTo( $(" +td.reaped", $(containing_ele) ) ); } $(this.parentNode).remove(); } ); }

        Of course one could use this as a starting point for further filtering (e.g. modify it to take the selector to filter on and a label (and class) to use in place of "Reaped"). Update: yup, just did it; so I can now let the neenery settle to the bottom of each section.

        The cake is a lie.
        The cake is a lie.
        The cake is a lie.

Free Nodelet Hack: Re: Reaped Nodes are Cluttering up some of the Sections
by Fletch (Bishop) on Mar 20, 2008 at 21:37 UTC

    OK, here's something to clean up reaped items somewhat from Perl News but leave them accessable. Replace the jquery URL with the right path to your copy (which you can obtain from jquery.com). The commented-out chunk of code shows how you could completely replace the title row in question rather than just twiddling its display (you also could do something similar to my other example and append them to the bottom of the enclosing table instead).

    <script type="text/javascript" src="http://example.com/js/jquery-1.2.3 +.min.js"></script> <script type="text/javascript"> function pm_clean_news( ) { // Perl News node id is 23771 $( "body#id-23771 a[href*=?node_id=52855]" ).each( function( idx ) { // tr > td > this a var containing_ele = this.parentNode.parentNode; // Remove following tr $(containing_ele).next().remove(); // Change CSS properties $(containing_ele).removeClass( 'hilight' ); $(containing_ele).css( 'background-color', '#eeffee' ); $(containing_ele).css( 'margin-bottom', '5px' ); /* var reaped_title = $( "td:first-child a:first-child", containing_e +le )[0]; $(containing_ele).replaceWith( '<tr><td colspan="3"><a href="' + $(reaped_title).attr('href') + '" +>' + $(reaped_title).text() + '</a></td></tr>' ); */ }); } $(document).ready( function () { pm_clean_news(); }); </script>

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

        ++

      Thanks Fletch, this looks very promising!!

Re: Reaped Nodes are Cluttering up some of the Sections
by ww (Archbishop) on Mar 19, 2008 at 20:29 UTC

    Reaped nodes?

    I admit, I only checked back to 1 Feb 08... but from today back, found none in Perl News, the only section you cite.

    Perhaps you'ld like to be more specific.

      The current list is:
      • The Perl Review, Spring 2008
      • Solve Agebraic Equations Using Regular Expressions (offsite link)
      • Reaped: Your site has very much liked me.
      • Reaped: Your site has very much liked me.
      • Task::Moose released
      • Reaped: buy viagra online
      • Reaped: cheap viagra
      • Portuguese Perl Workshop 2008 :: Registrations open // Attendance limits
      • 4th Italian Perl Workshop 2008 - Call for Papers /Participation
      • Reaped: Your site has very much liked me.
      • Report: Migrating from perl to Java
      • Math::Pari patch for 5.10.0
      • Perl as Shinto Shrine - Clay Shirky on Love, Internet Style
      • The Perl-Git connection
      • Perl holds its own against Python Ruby et al

      I'd just like to see them heavily condensed (e.g. just an indication that there was a reaped node without the title even being mentioned) or list all of them in a separate section at the bottom. That's why I was wondering if there was a CSS trick (or something similar) that could be done to condense them without to much effort.

      Update: fixed a typo, "without.", and highlighted reaped nodes.