You can now rush to Nodelet Settings and add the "Free Nodelet" to your list of nodelets. Once you've done that, how to use it should be obvious. But note that most changes to settings take one extra page load before you see the effect, so click the node ID number at the top of the page (for example) after you make a change if it appears that the change didn't "take".
For those who don't want to just try it, the Free Nodelet lets you put any HTML in it. It processes PM-style links (things in square brackets) but otherwise doesn't touch your HTML. You can even include JavaScript, bizarre CSS, forms, iframes, stuff to copy/paste etc. in it (though you should avoid having JavaScript enabled when visiting PerlMonks until home nodes get properly filtered and some CSS belongs in your CSS settings and not in the Free Nodelet, but you are free to try whatever you like).
If you try to stuff 60kB of data into your Free Nodelet (or any of the other text areas on User Settings and the related 'Settings' pages), you'll likely mess up your settings (and you are a freak).
Later I'll post instructions for how to add a link to your Free Nodelet such that clicking the link adds to your Free Nodelet a link to whatever node you are viewing (so you can use the Free Nodelet like the Personal Nodelet).
Note that PM-style CODE tags don't work in the Free Nodelet. I'm not yet sure if this is a bug or a feature.
Updated.
- tye
|
---|
Replies are listed 'Best First'. | |
---|---|
Free Nodelet Hack: RAT collapse all
by jZed (Prior) on Oct 14, 2004 at 19:58 UTC | |
Thanks cLive++ for the evil string eval. | [reply] [d/l] |
by jdporter (Paladin) on Oct 14, 2004 at 20:48 UTC | |
Thanks to jZed for the parent node, upon which this code is based. See also: planetscape's Free Nodelet Hack: Check or Clear all "Delete" Message Checkboxes in Your Message Inbox | [reply] [d/l] |
Re: Free Nodelet freed
by jZed (Prior) on Oct 14, 2004 at 17:17 UTC | |
| [reply] |
by cLive ;-) (Prior) on Oct 14, 2004 at 19:02 UTC | |
:) cLive ;-) | [reply] [d/l] |
by ikegami (Patriarch) on Nov 03, 2006 at 02:25 UTC | |
Usage:
Update: Never mind. New useful escapes documented here. | [reply] [d/l] [select] |
by tye (Sage) on Oct 14, 2004 at 17:22 UTC | |
Code tags wouldn't help. CODE tags just turn [ into [ (among other things, of course). - tye | [reply] |
Free Nodelet Hack: 'Newest Nodes' Menubar
by jdporter (Paladin) on Feb 24, 2006 at 16:43 UTC | |
The Free Nodelet can have javascript in it. This can be used to modify how your PerlMonks pages appear and behave. Also, the Free Nodelet, unlike any other nodelets or node, is allowed to have virtually any HTML in it. (This is because no matter what nasty code you might put in your Free Nodelet, the only person it affects is you. :-) I've taken advantage of this freedom to display a condensed list of "newest nodes" links across the top of every PerlMonks page. Here is a screenshot (126kb) of my PerlMonks experience. The links themselves come from the RSS feeds at prlmnks.org, filtered through a CGI script I wrote which converts the RSS XML to HTML. My script takes several parameters which control the HTML generation. I embed this small fragment of HTML in my PerlMonks web page using <iframe...>. You don't see the iframe border in the screenshot, because I've set its frameBorder attribute to 0. You'll notice that some of the page style (css) propagates into the iframe, but not all. In order to place the iframe in the exact web page location I desire, I use javascript running in the Free Nodelet. So — if you'd just like to include a list like this in your Free Nodelet and skip the javascript part, simply go to Free Nodelet Settings and insert the following code in the HTML textarea: This will put a 'newest nodes' link list in your Free Nodelet. (Of course, you'll want to have your Free Nodelet enabled in Nodelet Settings.) In the example above, 'top' is the name of the feed. Here is the list of available feeds: top all cufp note poem user snippet perlnews usergroup perlquestion bookreview qandasection obfuscated sourcecode scratchpad monkdiscuss perltutorial perlmeditation categorized_question(This is similar to, but not quite the same as, the list for the Newest Nodes XML Ticker.) You can actually have more than one feed in the output listing — simply give more than one feed name, separated by commas. For example, pmrss.cgi?feeds=perlquestion,perlmeditation,monkdiscuss&max=12 You can also override the link count maximum on a feed-by-feed basis: put a number after the feed name, separated by a colon. For example, pmrss.cgi?feeds=perlmeditation,monkdiscuss:4&max=12 If you leave off the max= parameter, the limit used by prlmnks.org in its rss feeds will apply. I don't know what that limit might be, but the list of links is never very long. Now — if you'd like to duplicate what I've done, as shown in the screenshot above, you'll want to add code like the following in your Free Nodelet:
Also note the image I've embedded in my Free Nodelet. ;-)
We're building the house of the future together.
(<script type="text/javascript"> stuff I'm storing here temporarily</script>) | [reply] [d/l] [select] |
Re: Free Nodelet freed
by ambrus (Abbot) on Oct 14, 2004 at 19:14 UTC | |
I thought you could add any html to the Personal Nodelet too (I now have a form in it). So is this just a variant of the Personal Nodelet? I however still like the idea, as now I can have two personal nodelets, one on the top of the nodelet bar for important links, and one near the bottom. | [reply] |
by demerphq (Chancellor) on Oct 14, 2004 at 20:18 UTC | |
No, actually this is what tye originally meant when he mentioned the personal nodelet should be changed. I was in a gee-whiz mode and put together the Personal Nodelet on different principles. PN is basically a list of tiny pm-html snippets that are manipulatable as such so you can reorder, limit the list etc. The Free Nodelet is just a single html string that doesn't go through normal PM tag filtering. I think the only real difference is that you have the controls on Personal Nodelet Settings and PN can display code tags, wheras the "Free Nodelet" is just what it says Free. :-) In some respects when tye put this together I thought maybe I should remove the PN, but what you just said seems to make me think that on the contrary there is a place for both. I think that PN is more suited to link collecting, and the free nodelet to more stylized stuff so they seem to complement each other.
---
demerphq First they ignore you, then they laugh at you, then they fight you, then you win.
| [reply] |
by tye (Sage) on Oct 14, 2004 at 22:14 UTC | |
A big difference for me that you don't mention is that I adjust the Free Nodelet by pasting the contents into my favorite editor (or other tool), changing anything in any way I like, and then pasting the results back into User Settings. So I can do a global search/replace easily or I can write a tiny snippet of Perl code to sort a list of links in the middle of my free nodelet by node ID and paste the now-sorted list back in. That is more than just being free to add anything I want to it. - tye | [reply] |
by Aristotle (Chancellor) on Oct 08, 2005 at 21:57 UTC | |
They have different merits. The various Add to foo links on the PN make it nice for on-site bookmark management, whereas the FN’s unconstrained content makes it nice as a sort of cross between homenode and scratchpad that’s always available. (I know about FN templating, but really, the PN does much of the same out of the box, and I’m getting cranky in my old age and expecting more things to Just Work.) Makeshifts last the longest. | [reply] |
Free Nodelet Hack: Hide/Display Nodelet Bar On Demand
by jdporter (Paladin) on May 03, 2006 at 21:30 UTC | |
I like to have my Nodelet bar (column? table?) nice and wide, most of the time, partly because it makes the nodelets shorter, and thus I have to scroll less to read them. (I keep the most dynamic ones at the top.) The downside is that the main body of the node is squeezed. This not only makes it taller, but often causes ugly line wrapping, especially in embedded HTML tables. So, sometimes I really want to get my Nodelet column out of the way, and just view the main node body in its full glory. So I thought: How can I hide (toggle off) the Nodelet bar as needed? The following code does just that. Simply plunk it into your Free Nodelet Settings. It makes two checkboxes near the top right corner of your page, labeled 'Hide Main Body' and 'Hide Nodelets'. When one or the other part of the page is hidden, the remaining visible part expands to fill the entire width of the window.
We're building the house of the future together.
| [reply] [d/l] |
by jdporter (Paladin) on Dec 11, 2006 at 16:38 UTC | |
There are lots of cool nodelets, and normally I like to have almost all of them turned on. Problem is, that makes each page take noticeably longer to load. So sometimes I wish I could have just a bare-bones set of nodelets active. Fortunately, PerlMonks gives you two nodelet configurations, as you can see by going to your Nodelet Settings: there's your FrontPage nodelets, and your non-FrontPage nodelets. But using Nodelet Settings to toggle quickly between them is just not convenient! So I came up with the following code to go in my Free Nodelet. (Note that if you use this you'll definitely want Free Nodelet to be enabled in both your FrontPage and non-FrontPage nodelet sets.)
Each link makes a submission to Nodelet Settings — to enable and disable Use my frontpage nodelets everywhere, respectively — and then "redirects" back to the node you were viewing when you clicked. Note that only the node ID of the current node is remembered; any other URI arguments are dropped. This technique is based on ideas in subthread Re: Free Nodelet Hack: Add parent & root links to nodes in 'Nodes You Wrote' (or anywhere). tye++
Update (hopefully temporary):
| [reply] [d/l] [select] |
Free Nodelet Hack: Collapse/expand Nodelets individually
by shmem (Chancellor) on Feb 05, 2007 at 17:19 UTC | |
Plunge into your Free nodelet and tweak the closedN array. For maximum benefit put your free nodelet last in Nodelet Settings. update: use the block further down. I would have deleted this first attempt, had ikegami not answered :-)
That could've been more 'elegant'... but it's a hack. If JavaScript had hashes... This one is for firefox. IE users likely will have to replace the document.getElemetById by the appropriate IE function. <update> Since some nodelets come and go, the order can change. Here's a version with hashes. The XP Nodelet has a degree sign in the upper left corner, which, when clicked, will pin/unpin the nodelet container. Use with the CSS snippet below.
And here's a stylesheet snippet to pin the nodelet container to the upper right corner of the page:
</update> --shmem
| [reply] [d/l] [select] |
by ikegami (Patriarch) on Feb 05, 2007 at 17:52 UTC | |
But it does! JavaScript calls them Objects. (Kinda like how objects are usually implemented as hashes in Perl).
| [reply] [d/l] |
Free Nodelet Hack: Add links to cbhistory, etc to CB
by ikegami (Patriarch) on Nov 09, 2006 at 21:09 UTC | |
Place links to chat clients and/or chat histories at the bottom of the CB.
Not very elegant. An array with the links would be nice. | [reply] [d/l] |
Re: Free Nodelet freed
by ikegami (Patriarch) on Nov 09, 2006 at 23:40 UTC | |
Before messing with the DOM (document.[...]), it might be smart to wait for the HTML doc to be fully parsed and the DOM tree to be fully built. This can be achieved as follows:
For an example of where this makes a difference, refer to Free Nodelet Hack: Nodelets on the left. | [reply] [d/l] [select] |
Free Nodelet Hack: linkify nodelet headings (for pmdev)
by jdporter (Paladin) on Jan 05, 2011 at 17:33 UTC | |
This will turn each of the nodelet headings (titles) into links to the corresponding nodelet code nodes. (Only pmdev members are likely to find this useful.)
| [reply] [d/l] |