Junkfood

Food and Junk.

All | Food | Junk | Work

20071112 Monday November 12, 2007

Just ordered an OLPC XO Laptop

I just placed an order for an XO Laptop through the the One Laptop Per Child (OLPC) "Give One Get One" program (G1G1). The OLPC project aims to catalyze educational and other opportunities for children in less-developed countries by providing them with specialized laptop computers. The XO laptop was developed by the program to meet its specific needs-- ruggedized, low-powered, ad hoc networking, customizable, easy to use, etc. The G1G1 program allows people to receive an XO laptop by donating $399 USD (plus $24.95 shipping, in my case). The money purchases two laptops. One is given to the purchaser as a gift, and the other is donated to a child in a developing country.

I plan to use my XO for basic mobile computing-- web browser, email, and note-taking. I have no other laptop, so this will be my primary mobile device. The XO is designed to be low-powered so its batteries can be recharged manually in locations without electricity, via a pull-string dynamo or solar recharger. However, the ones being sent to donors will not include the manual recharger.

(2007-11-12 10:22:11.0) Permalink |

20060602 Friday June 02, 2006

June 2006 New England Food Festivals and Events

Food festival season has started. Most of the June events seem to be early in the month. I don't have anything after the 11th. Most food festivals are at the end of summer, and I'll post an update later with the full schedule.

(2006-06-02 07:30:00.0) Permalink |

20060124 Tuesday January 24, 2006

2005-06 Girl Scout Cookie Equivalency Chart

Between 2004 and 2005-06, Cartwheels and Thanks-A-Lot replaced Animal Treasures and Iced Berry Piñatas; and Café Cookies replaced Double Dutch.

ABC/Interbake Foods Little Brownie Bakers
Mandatory:
Thin Mints Thin Mints
Peanut Butter Patties Tagalongs
Classic Shortbread Trefoils
Optional:
Caramel deLites Samoas
Peanut Butter Sandwich Do-Si-Dos
Reduced Fat Lemon Pastry Cremes (no equivalent)
Reduced Fat Cartwheels (no equivalent)
Thanks-A-Lot (no equivalent)
(no equivalent) All Abouts
(no equivalent) Lemon Coolers
(no equivalent) Café Cookies

There are two baking companies licensed to produce Girl Scout cookies, ABC Bakers (Interbake Foods LLC) and Little Brownie Bakers. Each company must produce three mandatory cookie types and can offer up to five more. Currently, there are five common cookie types that are produced by both companies. Confusingly, the same cookies have different names, depending on the baking company. This chart shows which cookies are equivalent.

Between 2003 and 2004, Iced Berry Piñatas replaced Friendship Circles, and Lemon Coolers and Double Dutch replaced Olé Olé's and Aloha Chips.

References:

(2006-01-24 07:44:00.0) Permalink |

20060119 Thursday January 19, 2006

IKEA Restaurant

I visited the IKEA in Stoughton, MA, partially to look at furniture but mostly to try their restaurant.

I was there on Saturday, the day of New Year's Eve. When I arrived at 10:30am, the parking lot was pretty much empty. However, when I left at 1:30pm, the parking lot was entirely full, and cars had to stalk exiting customers to get a spot. I also recall that there was an overflow lot nearby, and that was filling up. If you are a Zipcar customer, IKEA has about 4 or 5 spots reserved for Zipcars (though at 1:30pm, all of these spots were taken by non-Zipcar vehicles).

For breakfast, I had the 99-cent Breakfast Plate which contained a good portion of scrambled eggs, home fries (with onions and green and red peppers), and bacon (I was served 3 strips). The food was tasty and definitely a good value.

For lunch, I had Swedish Meatballs and a side order of Macaroni and Cheese. The Meatballs come with two red potatoes (I think that you could also request French fries) and some lingonberry preserves. Again, the food was good. I especially liked the Macaroni and Cheese. Towards the end of my meal, I was surprised when a woman and child just sat down across from me at my table. The restaurant was crowded, and this was pretty much the way to get seats (getting someone in your party to sit next to a diner who is almost finished).

Finally, on the way out, I had a 50-cent Hot Dog at the Bistro downstairs. I think that it was pretty good. It was served on a New England-style roll.

If you really like lingonberries or meatballs and want to serve them at home, there is a small food market next to the Bistro. Frozen meatballs are $6.99 for 2.5 pounds. Lingonberry preserves are $2.99 for a 14 oz. jar or $9.99 for a 1.5 liter tub.

Restaurant Hours:

  • 9:30am - 9:00pm, Monday through Saturday
  • 9:30am - 5:00pm, Sunday
  • Breakfast is served from 9:30am - 11:00am.

Restaurant Menu:

  • $0.99 Breakfast Plate (scrambled eggs, bacon, and home fries)
  • 3.99 Swedish Meatballs (10)
  • 4.99 Swedish Meatballs (15)
  • 5.99 Swedish Meatballs (20)
  • 5.99 Herb Poached Salmon
  • 4.99 Gravlax Lox Plate
  • 5.99 West Coast Salad (contains crayfish, mussels, and shrimp)
  • 3.49 Gravlax Lox Baguette Sandwich
  • 2.99 Ham & Cheese Baguette Sandwich
  • 2.49 Open-face Shrimp Sandwich
  • 1.99 Panini Sandwich
  • 1.99 Foccacia Sandwich
  • 1.49 Soup
  • 1.49 Salad (bowl)
  • .99 Macaroni and Cheese Kids Meal
  • .99 Macaroni and Cheese, side order
  • 2.50 Macaroni and Cheese, full portion
  • .75 Soft Drinks
  • .75 Coffee or Tea
  • 1.99 Swedish Apple Cake
  • 1.99 Chocolate Mousse
  • 1.79 Daim Torte
  • .99 Lingonberry Mousse

Restaurant Notes:

  • The Restaurant is upstairs, immediate to the left of the escalator. It's actually a cafeteria-style restaurant.
  • The serving area has two lines, both serving the same hot food. The far line is usually shorter. However, both refrigerated cases might not contain the same items.
  • You have to bus your own trays.
  • Swedish Meatballs are served with two red potatoes or fries, and a bit of lingonberry preserve.
  • Lingonberries taste like sweet, non-tart cranberries.
  • There are free refills on soft drinks.
  • Soft drinks include Pepsi products, as well as a lingonberry drink/soda (they were out, so I wasn't able to try it).
  • The Restaurant was crowded at lunchtime, and it became difficult to find a place to sit.
  • Credit cards are accepted.
  • Meals tax is not included in the prices.

Bistro Menu:

  • $0.50 Hot Dog
  • 1.00 Cinnamon Roll
  • 1.00 Soft Serve Cone
  • .75 Soft Drinks
  • .75 Coffee
  • 4.00 Cinnamon Rolls (6)
  • 3.00 Hot Dogs (2), Soft Drink, and Chips
  • 1.50 Cinnamon Roll and Coffee

Bistro Notes:

  • The Bistro is downstairs, past the checkout counters.
  • All tax is included in the prices.
  • There are two lines. Sometimes one is shorter than the other.

(2006-01-19 09:00:00.0) Permalink |

20051109 Wednesday November 09, 2005

Millennium Falcon simulator ride

I went to the Millennium Falcon simulation two weeks ago. This is an upcharge attraction at the Star Wars: Where Science Meets Imagination exhibit at the Museum of Science in Boston. http://starwars.mos.org/

  • The attraction is a mock-up of the Millennium Falcon's cockpit, with an audio-visual show that you view through the cockpit windows. Although it could be considered to be a simulator ride, it is not a "ride" in the strict sense as there are no moving parts.
  • The screen is a small dome that wraps around the cockpit windows, like a planetarium tilted on its side. It also has a 3-D sound system. The total effect is similar to a 3-D ride through space.
  • The ride capacity is eight people per show. Four get to sit in swivel bucket seats (two in the front, two in the back). Four get to stand in back of the seats and in the aisle.
  • The total ride capacity is very low (perhaps 64-80 persons per hour?), and tickets sell out extremely quickly. I advise the advance purchase of tickets online.
  • Tickets are $5. This attraction is entirely separate from the Star Wars special exhibit, and tickets to the special exhibit are not required to visit the Millennium Falcon attraction.
  • Tickets are timed for showings every half-hour. When your ticket's time is called, you then wait in a short queue outside the attraction. Because you might not get to ride until towards the end of the half-hour period, be sure not to buy any other timed tickets for too soon after.
  • Half of the tickets are marked "Seated" and half are marked "Standing". For each show, they admit four seated guests and four standing guests. Guests are randomly assigned to a specific spot in the cockpit. Unfortunately, the cockpit is designed such that the best view is for the two seated guests in the front. The other seats have an obstructed or distant view.
  • The show lasts about five minutes.
  • What is it like? It's basically a regular planetarium-type show about space travel, with some Star Wars sounds, images, and theming. It isn't especially exciting. Anthony Daniels narrates the show.
  • As you exit the ride, you receive a souvenir cloisonne pin. It's about 1-inch in size, with a picture of the Millennium Falcon and the words "I made the jump" and "Museum of Science, Boston". (There's a picture of the pin on the Museum of Science's ticket store page for the Millennium Falcon.)
  • Unfortunately, my opinion is that this attraction really isn't worth the $5 charge. The screen is too small and difficult to see from the back, and the show is too short. However, aficionados will probably want to go just for the souvenir pin.

(2005-11-09 08:30:00.0) Permalink |

20051028 Friday October 28, 2005

More notes on Brunch at the Museum of Science

  • The Executive Chef at the Museum of Science in Boston is Donald Burns.
  • Previously, Donald Burns was the Executive Chef at the Museum of Contemporary Art (MCA) in Chicago, also a Wolfgang Puck Catering operation.
  • The Museum of Science's brunch menu looks a lot like the MCA's brunch menu. The MCA's "Puck's" restaurant also serves similar dishes like "Rigatoni Bolognese with Peas and Parmesan Cheese" and "Field Green Salad with Goat Cheese Croutons, Tapenade, and Balsamic Vinaigrette".
  • I note that "Yukon Gold Potato Puree" also appears on the St. Louis Art Museum's menu (also catered by WPC).
  • Prior to working for Wolfgang Puck Catering, Donald Burns worked on the American Orient Express. I also found a reference that indicates that he worked at Wolfgang Puck's Spago restaurant.

(2005-10-28 04:33:00.0) Permalink |

20051026 Wednesday October 26, 2005

Sunday brunch at the Museum of Science

I ate at the Sunday Brunch buffet at the Museum of Science on October 23, 2005. It's catered by Wolfgang Puck Catering and served in the Skyline Room, on the sixth floor. There are two seatings: 11:00am and 1:00pm. Brunch is $32 and includes exhibit admission, a ticket to a show, and parking (brunch-only is available for $24). http://www.mos.org/

The room itself has floor-to-ceiling windows on two sides, with a panoramic view stretching from the Zakim Bridge, down the Boston riverbank, across the Charles River, up the Cambridge riverbank, all the way to the Royal Sonesta. I chose to sit so I could dine with a view of the Zakim Bridge.

I ate at the 1:00pm seating, and the room wasn't very full (perhaps 30 diners). I believe that the 11:00am seating may have been busier and that it finished late, as the staff was still hurrying to turn the room as the 1:00pm seating began. Wolfgang Puck Catering runs an elegant operation. I was somewhat hoping that Chef Puck himself might make an appearance to check up on things (he was in town the night before, at the gala opening for the Museum's Star Wars exhibit), but no such luck.

The food was good. My favorites were, in order:

  1. Almond Crusted French Toast stuffed with Mascarpone-Ricotta Cheese Filling. (I don't usually eat French toast, but this was really good.)
  2. Mixed Green Salad with Herb Goat Cheese Crostini and Olive Tapenade and Balsamic Dressing. (I liked the Crostini with goat cheese and tapenade.)
  3. Pan Seared Chicken with Sauteed Spinach and Cabernet Butter Sauce

Info and Tips

  • Advanced reservations are recommended, and I get the impression that they really want you to purchase tickets in advance. Unfortunately, the only way to purchase tickets is by calling the museum. You can just buy them from the online store.
  • You get to the Skyline Room by going into the museum, into the Green Wing, and taking the elevator.
  • If you arrive early, you can go up and sit outside the Skyline Room.
  • Dress is museum casual. However, given the food, ambiance, and level of service, you may want to dress up a bit more.
  • You may want to arrive early to have a better choice of seats.
  • There are restrooms there on the sixth floor.
  • I get the impression that food-wise, it might be better to eat at the early seating.

Below is the menu from my brunch. There were a few other items available that weren't listed on the menu. One was grilled asparagus. There was also fruit stuffed with a creamy filling. I'm embarrassed to say that I was unfamiliar with this type of fruit, and I still don't know what it was. (Perhaps it was passion fruit?)

The Menu:

  • Assorted Breakfast Pastries
    • Bagels
    • Croissants
    • Assorted Tea Breads
    • Rosemary Scones
    • Assorted Muffins
    • Dill Cream Cheese
    • Yogurt Parfaits
    • Fresh Fruit Platter
  • Fritata Station
    • Pancetta and Fontina
    • Roasted Peppers and Spinach
    • Scrambled Eggs
  • Breakfast Buffet
    • Apple Wood Smoked Bacon
    • Maple Glazed Breakfast Ham
    • Roasted Potatoes
    • Buttermilk Pancakes with Vermont Maple Syrup
    • Almond Crusted French Toast stuffed with Mascarpone-Ricotta Cheese Filling
  • Brunch Buffet
    • Mixed Green Salad with Herb Goat Cheese Crostini and Olive Tapenade and Balsamic Dressing
    • Caesar Salad with Lemon Anchovy Dressing and Parmigiano Reggiano
    • Yukon Gold Basil Potato Puree
    • Sauteed Autumn Vegetable Melange
    • Penne Pasta with Wolfgang's Bolognese Sauce
    • Pan Seared Chicken with Sauteed Spinach and Cabernet Butter Sauce
  • Carving Station
    • Citrus Brined Pork Tenderloin
    • Soy Glazed Flank Steak
    • Sweet Chili Glazed Salmon
    • Cranberry Chutney, Chinese Mustard, Dill Cream, Apricot Marmalade
  • Assorted Wolfgang Puck Specialty Desserts
    • Cheese Cake
    • Chocolate Mousse
    • Pear wrapped in Phyllo
    • Coffee Cake

(2005-10-26 06:00:00.0) Permalink |

20051025 Tuesday October 25, 2005

Star Wars museum exhibit

I visited a preview of the "Star Wars: Where Science Meets Imagination" at the Museum of Science in Boston, on Sunday, October 23, 2005. It was okay. The exhibit was smaller and somewhat disappointing when compared to the previous Lord of the Rings exhibit. There weren't as many movie props to see. On a more positive note, this exhibit contained more science and educational content. http://starwars.mos.org/

Visiting Tips

  • The exhibit is on the second floor of the Red Wing. The stairs to the exhibit are just past the food court.
  • You need to purchase timed tickets to the exhibit. Entrance times are every 15 minutes. Adult tickets are $20. Exhibit admission includes a separate ticket for entrance to the rest of the museum which can be used anytime within six months of purchase.
  • You can go upstairs to wait in line at the exhibit entrance 15 minutes before your entry time.
  • It is possible for the entire day's supply of tickets to sell out, so you may want to pre-purchase.
  • Once you enter the exhibit, you can stay as long as you want. However, if you leave then you cannot re-enter. I'd plan to stay about two hours.
  • Strollers, food and drink, and bags are not allowed inside the exhibit.
  • Yes, cameras and photography are allowed in the exhibit!

About the Exhibit

  • There is a Robot Theater inside the exhibit. It is a 15-minute video and animatronics show. The show capacity is about 35, making it something you'll need to wait in line to see. My feeling is that this show is worth waiting for, though hopefully you won't have to wait more than 30 minutes.
  • Like all museum exhibits, this one exits through a gift shop, this one with various Star Wars merchandise. Except for the companion book, none of the gift shop merchandise is related to the exhibit. (I had been hoping that there might be exhibit t-shirts or posters.)
  • Costumes on display: Chewbacca, Darth Vader, Obi-Wan Kenobi, Padme, assorted Wookies, Tusken Raider, Jawa, C-3PO and R2-D2, Yoda, Storm Trooper, Wampa.
  • Models on display: Millennium Falcon, various other spaceships, full-size Landspeeder, Droideka, Battle Droid, Star Destroyer, Tie Fighter, Sebulba's Pod Racer, Blockade Runner, AT-AT and other Empire armored transport vehicles, Wookie tree miniature, Jawa Sandcrawler.
  • Props on display: various Lightsabers, various Blasters, Thermonuclear Detonator, Medical Droids, Anakin's prosthetic arm, Luke's prosthetic arm, Darth Vader's mask.
  • Science featured in the exhibit: Abiocor heart, Roomba, Robosapien, artificial skin, proposed "real" spacecraft (rambus engines, antimatter rockets, etc.), cold weather clothing, prosthetics and cybernetics, Maglev technology, Braingate cortical implant, C-leg prosthetic leg, Boston Digital Arm, exploring cold climates, exploring the forest canopy, living in desert worlds, robot vision, robot balance.
  • Activities inside the exhibit: drive a small hovercraft, Maglev engineering lab, robot vision demonstration, robot design lab, virtual community game with augmented reality, a 2-wheeled robot that could balance itself.

Multimedia Tour

  • There's an audiovisual Multimedia Tour that you can purchase. The price for adults is $5.
  • The Multimedia Tour is free for visitors with hearing or visual impairments.
  • The Multimedia Tour is basically a Toshiba PocketPC device with headphones. The device has a touchscreen which is the way you interact with the device. Certain exhibits have a number, and you can enter the number on the device for an additional audio track.
  • The device comes with a lanyard for you to wear around your neck as you walk throughout the exhibit. You pick up the device just outside of the exhibit entrance upstairs, and you return it just in front of the exhibit exit.
  • There are only 22 exhibits that have a Multimedia Tour track. Some of these tracks lead to additional sub-tracks.
  • Though touted as "multimedia", most of the Multimedia Tour tracks are audio-only. There are only a few video clips and still images. The video clips were difficult to hear-- the volume is softer than the audio tracks.
  • There is some sort of bookmarking feature which will allow you to send content via email. I didn't try this feature.
  • My overall impression of the Multimedia Tour is that it might not be worth it. There just isn't that much content available for the device.
  • If you do get the Multimedia Tour, I advise not using it at the beginning of your visit. There are a lot of other things to see, videos to watch, etc., and your time might be better spent with these before listening to the Multimedia Tour. Where the Multimedia Tour comes in handy is for killing time in line for Robot Theatre.

Millennium Falcon ride

  • There's an upcharge Millennium Falcon simulator ride (not a motion ride, I believe-- just audiovisual). Unfortunately, I wasn't able to get tickets for this.
  • You'll need to buy timed tickets for this ride. Tickets are $5.
  • My impression is that the ride has a low capacity and that tickets might sell out quickly.
  • The simulator is on the ground floor of the Red Wing, near the stairs to the Star Wars exhibit.
  • Apparently, the ride comes with a souvenir pin.

(2005-10-25 07:56:00.0) Permalink |

20050824 Wednesday August 24, 2005

New England Food Festivals and Events

Upcoming New England area food festivals and events.

(2005-08-24 09:47:00.0) Permalink |

20050127 Thursday January 27, 2005

Roller: Navigation Bar Improvement

The current behavior of the Navigation Bar (the one on my page, at the right, that starts with "Sun Bloggers" and "Weblog") is that if a Roller user logs into the system, the Navigation Bar also contains "New Entry", "Settings", and "Logout". It makes sense if I (the page owner) am the one looking at this page. However, for other Roller users who happen to see this on my page, it may be somewhat confusing. Similarly, when I am logged in and look at other users' pages, I see a "New Entry" link which is confusing for me.

The improved behavior is that "New Entry", "Settings", and "Logout" is seen in the Navigation Bar only when I (the page owner) am logged in. Other logged-in users don't see these links. Non-logged in users see a link to "Login". The below macro contains the fix. It overrides an existing Roller macro.

#macro( showNavBar2 $vertical $delimiter $useCSS)
    #set( $container = "div" )
    #if ( $useCSS ) #set( $container = "ul" ) #end
    #set( $rawUrl = "$ctxPath/page/$userName" )
    <$container class="rNavigationBar">
    #if ($siteName=="Main")
        #set( $mainUrl = "$ctxPath?rmk=tabbedmenu.main&amp;rmik=tabbedmenu.main" )
        #printNavLink( $mainUrl $text.get("navigationBar.main") $useCSS $vertical "" )
    #else
        #printNavLink( "$ctxPath/" $siteName $useCSS $vertical "" )
    #end
    #if( $website )
        #foreach( $iPage in $pages )
            #set( $invisible = $iPage.Name.startsWith("_") )
            ## Again, there is no "break" in Velocity
            #if( !$invisible )
                #set( $isSelected = false )
                #if( $page && $iPage.Id == $page.Id && 
!$editorui) #set($isSelected = true) #end

                #if( !$isSelected )
                    #printNavLink( "$rawUrl/$iPage.Link" $iPage.Name 
$useCSS $vertical $delimiter )
                #else
                    #if( $useCSS )<li class="rNavItem">
                    #elseif( $vertical ) <br />
                    #else $delimiter
                    #end
                    $iPage.Name
                #end
            #end
        #end
    #end

    ## strutsUrlHelper( useIds, isAction, path, val1, val2)
    #if ($req.getUserPrincipal())
        ## // The person looking at the page is logged into Roller.
        #if ($req.getUserPrincipal().getName().equals($userName))
            ## // The person looking at the page is this blog's owner
            ## // who is also currently logged in.
            #set( $editUrl = $rawUrl )
            #set( $editUrl = $pageHelper.strutsUrlHelper(false, true, 
"weblogCreate", "tabbedmenu.weblog", "tabbedmenu.weblog.newEntry") )
            #printNavLink( $editUrl $text.get("navigationBar.newEntry") 
$useCSS $vertical $delimiter )

            #set( $editUrl = $rawUrl )
            #set( $editUrl = $pageHelper.strutsUrlHelper(false, true, 
"editWebsite", "tabbedmenu.website", "tabbedmenu.website.settings") )
            #printNavLink( $editUrl $text.get("navigationBar.settings") 
$useCSS $vertical $delimiter )
            #set( $editUrl = $rawUrl )
            #set( $editUrl = $pageHelper.strutsUrlHelper(false, true, 
"logout-redirect", "", "") )
            #printNavLink( $editUrl $text.get("navigationBar.logout") 
$useCSS $vertical $delimiter )
        #else
            ## // The person looking at the page is the owner of a
            ## // different blog.  They are logged in.
        #end
    #else
        ## // The user is not logged into Roller.
        #set( $editUrl = $pageHelper.strutsUrlHelper(false, true, "login-redirect", 
"", "") )
        #printNavLink( $editUrl $text.get("navigationBar.login") $useCSS $vertical 
$delimiter )

        #if ($req.getAttribute("allowNewUsers"))
            #set( $registerUrl = $pageHelper.strutsUrlHelper(false, true, 
"registerUser", "", "") )
            #printNavLink( $registerUrl $text.get("navigationBar.register") $useCSS 
$vertical $delimiter )
        #end
    #end
    </$container >
#end

(Some long lines have been broken into separate lines, so you may need to join them back together manually.)

(2005-01-27 13:00:00.0) Permalink | Comments [1]

20050125 Tuesday January 25, 2005

Example of Improved Permalink Format

(2005-01-25 09:40:49.0) Permalink |

Roller: Improved Permalink Format

In most blogs I've seen, a Permalink for an entry is a URL that points to a page containing just that entry, along with that entry's comments. However, Roller uses Permalink URLs that contain a date and point to a page containing all entries from that date and earlier (containing the entry specified, along with a whole bunch of other entries). This is so, even though Roller already has the capability to generate pages that look like "standard" Permalink pages.

If you look at the URL for any Roller blog entry's "Comments" page, you'll see that it is very similar to a "standard" Permalink URL. And, if you follow the Comments link, the resulting page looks very much like a "standard" Permalink page. In fact, if we take a Roller comments page URL and simply remove the "#comments" anchor from the end, it makes a pretty good alternate Permalink.

The below macro overrides the standard Roller macro for generating Permalink URLs, to use the alternate format. The diff is also below. Because I do not know whether overriding the Permalink URL format might have any side effects (within Roller or for outside agents/aggregators), I have not implemented it on my blog. (I have tested it, and it appears to work just fine.) This macro needs to be put in the "_day" template. Putting it in the "Weblog" template does not work.

#macro( showEntryPermalink $entry )
    <a href="$ctxPath/page/$userName/$page.link/$utilities.encode($entry.anchor)"
        title="$text.get( "macro.weblog.entrypermalink.title" )"
        class="entrypermalink">Permalink</a>
    #if ($pageHelper.isUserAuthorizedToEdit())
        [<a href="$pageHelper.getEntryEditUrl($entry)">
        $text.get( "macro.weblog.entrypermalink.edit" )</a>]
    #end
#end

2c2
<     <a href="$baseURL$entry.permaLink"
---
>     <a href="$ctxPath/page/$userName/$page.link/$utilities.encode($entry.anchor)"

(2005-01-25 09:24:00.0) Permalink | Comments [3]

20050124 Monday January 24, 2005

Roller: Re-ordering the Category Bar

The following macro allows you to re-order Categories shown by the showWeblogCategoryChooser macro. Specifically, it alphabetically sorts Categories by their Descriptions. I don't think that the Description field is used elsewhere, so it is probably safe to use it as a sorting key.

#macro( showWeblogSubcategoryChooser2 $parentCategory $divider )
    #set( $rawUrl = "$ctxPath/page/$userName/$page.link" )

    <div class="rWeblogCategoryChooser">
    #set( $weblogUrl = $rawUrl )
    #set( $chosenCat = "" )
    #if( $req.getParameter( $WEBLOGCATEGORYNAME_KEY ) )
        #set( $chosenCat = $req.getParameter( $WEBLOGCATEGORYNAME_KEY ) )
        <span class="rUnchosenCategory"><a href="$weblogUrl">
        $text.get( "macro.weblog.allcategories" )</a></span>
    #else
        <span class="rChosenCategory">$text.get( "macro.weblog.allcategories" )</span>
    #end

    #if ( $req.getParameter($PAGEID_KEY)  )
        #set( $pageParam = "&$PAGEID_KEY=$req.getParameter($PAGEID_KEY)" )
    #end
    #set( $rawcats = $pageModel.getWeblogCategories($parentCategory) )
    ## // Sort categories by description, using a bubble sort.
    ## // The "All" category is not sorted; it's always first.
    #set( $cats = [] )
    #foreach( $rawcat in $rawcats )
       #set ($curcat = $rawcat)
       #set ($catcounter = 0)
       #foreach ($cat in $cats)
            #if ($curcat.description.compareTo($cat.description) < 0)
                #set ($curcat = $cats.set($catcounter, $curcat))
            #end
            #set ($catcounter = $catcounter + 1)
        #end
        #if ($cats.add($curcat))
        #end
    #end
    #foreach( $cat in $cats )
        ## $pageHelper.strutsUrlHelper() wasn't working, so do it manually
        #set( $catParam = "?$WEBLOGCATEGORYNAME_KEY=$utilities.encode($cat.path)" )
        #set( $weblogUrl = "$rawUrl$catParam$!pageParam" )
        $divider
        #if( $chosenCat == $cat.path )
            <span class="rChosenCategory">$cat.Name</span>
        #else
            <span class="rUnchosenCategory"><a href="$weblogUrl">$cat.Name</a></span>
        #end
    #end
    </div>
#end

The macro does not change category order anywhere else. Specifically, it does not change it in the Search drop-down menu or in the New Weblog Entry category drop-down menu (and therefore the default category for new entries is also unchanged). It also doesn't change the position of the "All" category (which is always in the first position).

I'm not sure how Roller orders categories by default. It's either reverse alphabetical order by name or reverse of the order that the categories were added.

(2005-01-24 13:00:00.0) Permalink |

20050121 Friday January 21, 2005

Girl Scout Cookie Equivalency Chart

Revised for 2004.

There are two baking companies licensed to produce Girl Scout cookies, ABC Bakers (Interbake Foods LLC) and Little Brownie Bakers. Each company must produce three mandatory cookie types and can offer up to five more. Currently, there are five common cookie types that are produced by both companies. Confusingly, the same cookies have different names, depending on the baking company. This chart shows which cookies are equivalent.

ABC/Interbake Foods Little Brownie Bakers
Mandatory:
Thin Mints Thin Mints
Peanut Butter Patties Tagalongs
Classic Shortbread Trefoils
Optional:
Caramel deLites Samoas
Peanut Butter Sandwich Do-Si-Dos
Reduced Fat Lemon Pastry Cremes (no equivalent)
Animal Treasures (no equivalent)
Iced Berry Pinatas (no equivalent)
(no equivalent) All Abouts
(no equivalent) Lemon Coolers
(no equivalent) Double Dutch

Between 2003 and 2004, Pinatas replaced Friendship Circles, and Lemon Coolers and Double Dutch replaced Ole Ole's and Aloha Chips.

References:

(2005-01-21 13:00:00.0) Permalink | Comments [2]

20050120 Thursday January 20, 2005

Roller: Macro Customization and Hacking

Most Roller customization documents I've read seem to deal with customizing the look of the weblog by editing page templates or CSS stylesheets. However, they are not helpful if what you want to change is output produced by Roller macros. Here are some tips for writing/customizing Roller macros (levels 4 and 5 of the Levels of Roller Customization below).

Levels of Roller Customization (from high to low-level):

  1. Edit CSS stylesheets to customize styles.
  2. Edit page templates to add/delete/move page elements and Roller macros.
  3. Select different theme packages to get different base page templates and CSS stylesheets.
  4. Create and use new macros.
  5. Override existing Roller macros.
  6. Change Roller configuration and installation.
  7. Change Apache configuration.
  8. Edit Roller source code.

Unfortunately, the documentation you need is scattered across many different sites. Specifically, you need documentation on Roller macros, Roller templates, Roller Java source code, the Velocity Template Language, and the Java programming language.

  1. The Roller source code can be downloaded at: https://roller.dev.java.net/servlets/ProjectDocumentList?folderID=2525&expandFolder=2525&folderID=0
    1. The Roller Velocity macros are in roller/web/WEB-INF/classes/*.vm
    2. The themes are in roller/web/themes/*. They are useful to see what can be done by simply editing CSS and page templates.
    3. The Java source code is in roller/src/*. You need it to be able to discover the many useful (but undocumented) Roller variables. You'll also want to see how the hardcoded functions work. The most interesting classes are:
      • org.roller.pojos.CommentData
      • org.roller.pojos.PageData
      • org.roller.pojos.RefererData
      • org.roller.pojos.WeblogCategoryData
      • org.roller.pojos.WeblogEntryData
      • org.roller.pojos.WebsiteData
      • org.roller.presentation.velocity.PageHelper
      • org.roller.presentation.velocity.PageModel
      • org.roller.business.RefererManagerImpl
      • org.roller.business.WeblogManagerImpl
      • org.roller.util.*
  2. Roller documentation is available at:
    1. User Guide (incomplete, but an okay start): http://www.rollerweblogger.org/wiki/Wiki.jsp?page=UserGuide
    2. Macro and Variable Reference (very incomplete): http://www.rollerweblogger.org/wiki/Wiki.jsp?page=RollerMacros
  3. Velocity documentation is needed to learn how to program in the Velocity Template Language. Specifically, you'll need:
    1. User Guide: http://jakarta.apache.org/velocity/user-guide.html
    2. Reference Guide (really, it's the second half of the User Guide): http://jakarta.apache.org/velocity/vtl-reference-guide.html
  4. Java documentation is needed to find out what can be done with Velocity objects. You will probably need to know how to program in the Java language. Documentation is at: http://java.sun.com/j2se/1.4.2/docs/api/index.html. The most useful classes are:
    1. java.lang.String
    2. java.util.ArrayList
    3. java.util.Map

Customization at this level is really just programming: writing new macros and re-writing the Roller macros. This requires knowledge of the Velocity Template Language (which is a programming language). It also requires knowledge of Java since Velocity is designed to interface with Java. Its basic variable types (String, ArrayList, Map) are Java objects whose methods are available to be used (if you know how). Roller is written in Java, and its objects, variables, and methods can also be used. Unfortunately, Roller is poorly documented and reading/interpreting its Java source code is necessary.

Some tips:

  • Create a (possibly hidden) test page which is a duplicate of your main Weblog page. Do all your experimentation on the test page. When things work right, you can copy the changes over to the Weblog page.
  • Removing the stylesheet from your test page may be helpful to prevent CSS from affecting how changes appear.
  • Velocity seems to be very picky about how lines are indented. Be sure to indent all lines properly (following the Roller macros as examples), with 4 spaces per indent. I've found that mis-indented lines can cause mysterious errors.
  • If you make a change to a template macro and the resulting page is blank, you've made a mistake that prevents the macro from running. Try commenting out lines in the macro to see where the problem lies.
  • Velocity control operators and data structures are very primitive. You will probably need to write programs that do things the hard way to work around this.
  • Starting with page templates, drill down through the macros to see how things work and how the Roller developers did things.
  • Instead of making a few big changes, make many small changes.
  • Reload the test page after each change you make. This will help to identify problems as soon as they are introduced.
  • Be sure to save copies of your page templates offline. You may want to save a copy each time you make a major change.
  • Velocity macros take space-separated arguments, but Java methods take comma-separated arguments.
  • The showWeblogEntries macro and its sub-macros contain most of the "guts" of how Roller works for weblog entries, comments, and search pages. It is the main "black box" whose contents can be overridden and customized.

Good luck!

(2005-01-20 13:00:00.0) Permalink | Comments [2]

Calendar

« August 2008
SunMonTueWedThuFriSat
     
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
      
Today

Recent Entries

Search

Navigation



XML