More than just stupid HTML tricks, the Notelet Nodelet allows you to add nearly any content to any page on E2. While only you can see it, a lot can be accomplished with with this nodelet. From HTML tags and attributes to scripts, forms to applets -- this is a very powerful feature for users. Here are just a few of the things you can do simply by copying and pasting some text into your Notelet.
E2 Full Text Search
No, not this. It seems that once again the powers that be have allowed google back on the site. Since googlebot takes up to 45 days to crawl the Internet, you can't always expect to find new writeups in google's index, but since most of the content on E2 is older than that - there is a lot available to search. Here's how to do it from your Notelet:
<form action="http://www.google.com/search" method="get">
<input type="hidden" name="sitesearch" value="everything2.com">
What this does is place a text box and a button in your notelet that allows you to perform a google search of just Everything2 content (i.e., all of the search results will bring you back to E2).
This HTML trick takes one line of code:
<meta http-equiv="refresh" content="60; URL=/?node=squawkbox">
Keep in mind that this is not exactly what you would call a robust chatterbox client. What it does is automatically refresh your browser (and therefore the chatterbox) every 60 seconds to the squawkbox node. You could optionally change the number of seconds, or use a different node to refresh on (don't try chatterlight - it doesn't use the notelet). Keep in mind that this little trick does not care if you are in the middle of typing a message - if will just refresh the page anyway. If you would like a more fully featured catbox client, try the Notelet Nodelet Squawkbox Client or the E2 Link and Logger Client.
Edited: Please consider this an idea just to get those creative juices flowing. It doesn't have a lot of practical uses as an actual chatterbox client. Try the ones linked above, or any of the softlinks at chatterbox client -- there's lots of things out there. Also consider that a browser that constantly refreshed could be bad for the server load.
Stylesheets and Extending the ekw Theme1
Is there something missing from the ekw theme
? There was for me. I like my links to do something when I put my mouse over them, so I added the following line to my Notelet:
Now whenever I put my mouse over a link, it obligingly turns red. But don't stop there! Cascading Style Sheets can do much more than this. Make your scrollbar yellow. Change the background color of your textboxes violet. Make the title of the nodes 500 pixels tall. Just about anything you want. If you want to make some major changes, you could enter something like this:
<link rel="stylesheet" type="text/css" href="http://domain.com/style.css">
Now this isn't really valid HTML, since the link tag is supposed to be within the document head, but most browsers will still allow it. What it does is define your own stylesheet to override ekw. Of course, you will have to create the stylesheet file yourself. Unfortunately, a tutorial on CSS is beyond the scope of this writeup, so click those links if you want to learn more.
External (or Internal) Links and Images
You can now link to things besides other nodes. So what, you say? Here are some potential uses for this:
Miss the topic lobster? If you were lucky enough to have downloaded a copy while he was sitting in the catbox, you could bring him back with the following (this is just an example, you will not find him here):
Manage multiple accounts. Some people have multiple accounts for such things as testing, noding for numbers, and other purposes. You can easily switch between these accounts as follows:
On Everything2 domain #1 and account #1 put the following in your notelet:
<a href="http://everything2.com">Go to account #2</a>
On Everything2 domain #2 and account #2 put the following in your notelet:
<a href="http://everything2.net">Go to account #1</a>
Link to anything else. The node tracker, chatterbox archive, CNN, Slashdot, whatever.
Java is quite a powerful language, and applets are a unique part of it. If you're not a Java programmer, this section won't do anything for you. If you are a Java programmer, this section won't do anything for you either. Just know that you can use applets on E2 if you want.
Really screw things up
If you really want to have some fun, try playing around with the td, tr, table, or even the body tags. Add frames and iframes. Using an old copy of Netscape? Give layer and ilayer a try. If you work it right, you can add a third column, create a header or footer, create floating objects, add another web page right in the middle of the page, or just mess things up. If you do mess things up, don't worry! Just read this to fix everything.
Notes on Reducing the Number of Characters in your Notelet
The Nodelet Nodelet is greedy, so it is in your best interest to keep the number of characters down to a minimum. My examples above did not use any of the tips below because I wanted them to be easy to read and understand. However, you can do this yourself in a number of ways:
- Keep the whitespace to a minimum. Spaces, tabs, carriage returns, and line feeds are all a waste. Removing them will make your notelet harder to read, but will allow you to cram more in.
- Get rid of your quotation marks. If you are using HTML attributes, don't put quotation marks around them unless there is a space in the attribute value. This is usually considered bad form, but again we need that extra room.
- Host things off-site. If you are using scripts or stylesheets in your notelet, you can keep the source code on a different server, potentially saving you hundreds of characters. Examples of this are above.
- If using the anchor tag to link to content on E2, keep in mind that you may be able to save some characters by using the node_id rather than the node title in your links.
- Use short variable and function names in scripts. It just has to work, it doesn't have to be easy to read.
Feel free to /msg me with other HTML tricks for your Notelet.
1 Thanks to AnBolb for pointing this out. Also note that you could change the jukka theme with the same methods.