Hi

Just a suggestion to make citing in the monastery more intuitive ...especially for starters.

Every node has self referential link, unfortunately its not displayed in the postable [id://...]format like in the approval nodelet.

ATM the typical header of a node looks like this:

on May 15, 2010 at 00:33 CEST ( #840075=perlquestion: print w/ replies, xml )

If it was

on May 15, 2010 at 00:33 CEST ( [id://840075]=perlquestion: print w/ replies, xml )

cutting and pasting would be much easier in posts and CB.

This would look like this:

on May 15, 2010 at 00:33 CEST [id://840075]=perlquestion: print w/ replies, xml )

And cutting and pasting the markup results in:

New module prototype - Test::Referenced

Cheers Rolf

Replies are listed 'Best First'.
Re: Allowing c&p of node headers
by ww (Archbishop) on May 16, 2010 at 12:41 UTC

    Simpler, shorter, for use in your Free Nodelet:

    This node's id: [id://`id`]

    Not my original work, but I've forgotten whom to credit. :-(

    This displays the id of the top node in the currently rendered part of a thread;, the nodes below now contain a c&p'able id in their title bars (perhaps dependant on your display settings?)

      > the nodes below now contain a c&p'able id in their title bars (perhaps dependant on your display settings?)

      yes I noticed that the sub nodes have a c&p-id following the title, but this is not the case for the top node where I need it the most.

      Anyway my second JS-Solution works fine! :)

      For instance now I can easily cite:

      Help for Free Nodelet Settings

      and

      Free Nodelet gets templating features

      (...which I haven't noticed before :-( )

      Cheers Rolf

Re: Allowing c&p of node headers
by ambrus (Abbot) on May 16, 2010 at 14:43 UTC

    The Approval nodelet usually has such a copiable reference, though it only appears for writeups, not for infrastructure nodes. (Update: so does the Node Status nodelet.)

    However, as the most common reason why I want to copy such a link is refferring to it in a chatterbox message, I have a chatterbox talk form in my free nodelet that's pre-filled with the link. This way, I don't even have to copy, I just write text around it. Here's the relevant source from my Free Nodelet Settings:

    <form method="post" action="?"><font size="-4"><input type="hidden" na +me="node_id" value="`id`" /><input type="hidden" name="op" value="mes +sage" /><input type="text" name="message" value="&#x5bid://`id`&#x5d" + size="26" maxlength="255" /><input type="submit" name="message_send" + value="talk"/></font></form> <br>
      hihi, funny idea =)

      but having an additional textarea flowting around is not quite what I need, I mostly use a netbook and need every pixel I can get.

      ... but hmm I could change the JS-code such that an additional button appears to allow appending the link to the CB Nodelet...

      Cheers Rolf

      UPDATE: I've put the following code into window.onload

      document.getElementById("talkbox").value+="`[id://`id``]";

      Like this the pages CB-area is preloaded with the local ID.

      I normally use the CB-Sidebar... so I can ignore it in most cases.

      UPDATE: no ... disabled this again, I need the talk button to delete msgs.

Re: Allowing c&p of node headers
by LanX (Saint) on May 16, 2010 at 10:34 UTC
    Here a selfmade JS-solution for the "Personal nodelet" for those who don't wanna spend too much place for "Status Nodelet" or "Approval Nodelet"

    <script> var search=location.search; var id=search.match(/\Wnode_id=(\d+).*/); if ( id.length>0) {document.writeln("`[id://"+id`[1`]+"`]")} </script>

    UPDATE:

    this will replace the link text in place

    <script> var tbar=document.getElementById('titlebar-bottom'); tbar.innerHTML=tbar.innerHTML.replace(/#(<a.*?>)(\d{4,10})(<\/a>)/,"$1 +`[id://$2`]$3") </script>

    please note, the backquotes before brackets (`[) are needed to escape them from the monastery markup in the Free Nodelet Settings. If you wanna use this code in other JS mechanisms you have to strip them.

    Cheers Rolf