Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: Node parents shown while viewing a node

by oha (Friar)
on Sep 27, 2007 at 09:59 UTC ( #641313=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Node parents shown while viewing a node
in thread Node parents shown while viewing a node

I agree with you and that's what i did.

It was just a "cosmetic" suggestion. I just wonder if someone considered it a nice addition or a bad one (the parents chain can be misleading i know).

Then probably it's up to pmdev to decide if it's worth to implement or not; probably based on the replies here and the time required to do it.

Oha


Comment on Re^4: Node parents shown while viewing a node
Free Nodelet Hack: Toggle bodies of Old Replies
by jdporter (Canon) on Sep 28, 2007 at 15:22 UTC

    OK, just for you: Put the following code in your Free Nodelet:

    <!-- the HTML: --> Hide old replies: <input name="hide_old_replies" id="hide_old_replies" + type="checkbox" onClick="toggle_old_replies()" /> <!-- the JS: --> <script language="javascript"><!-- function toggle_old_replies(){ var chk = document.getElementById('hide_old_replies'); var state = chk.checked ? 'none' : 'table-cell'; var allelems = document.all ? document.all : document.getElement +sByTagName("*"); var inc = 0; for ( i = 0; i < allelems.length; i++ ) { if ( allelems[i].className == "reply-body" ) { allelems[i].style.display = state; } } } //--></script>

    This only toggles the visibility of the bodies of "old" replies; the header boxes etc. for old replies remain visible. Hopefully that's sufficient for your desires.

    Thanks to tye for applying the patch I wrote to make this possible.

    A word spoken in Mind will reach its own level, in the objective world, by its own weight
      ty both very much!

      i tried it and found the Free Nodelet Setting eat up the square brackets on js, so i patched it to work, as in Re^3: Free Nodelet freed.

      here it is

      <!-- the HTML: --> Hide old replies: <input name="hide_old_replies" id="hide_old_replies" type="checkbox" onClick="toggle_old_replies()" / +> <!-- the JS: --> <script language="javascript"><!-- function toggle_old_replies(){ var chk = document.getElementById('hide_old_replies'); var state = chk.checked ? 'none' : 'table-cell'; var allelems = document.all ? document.all : document.getElement +sByTagName("*"); var inc = 0; for ( i = 0; i < allelems.length; i++ ) { var elem = eval("allelems\x5Bi]"); if ( elem.className == "reply-body" ) { elem.style.display = state; } } } //--></script>

      Oha

        Or you can use the much more readable Free Nodelet escape character (`).
        var elem = allelems`[i];

        The Free Nodelet is no longer supposed to mess with square brackets that occur inside of HTML comments. I'm also pretty sure that jdporter tested that code so I'm doubly surprised that you had this problem.

        - tye        

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://641313]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2014-07-30 11:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (230 votes), past polls