Updated: 11/14/2005; 1:40:48 AM
Radio Fun
    Radio UserLand, RSS, Weblog Tools and Design

daily link  Wednesday, August 14, 2002

Directory Browsing Follow-up
Follow-up to Directory Browsing with Radio.

A couple people have written in about my directory browsing post earlier today. Some thoughts:

Rogers Cadenhead reports that "The Python Community Server, the open source clone of the Radio Community Server at http://www.pycs.net, turns off directory browsing by default."

If you put index.txt in your "gems" folder, nothing will happen. This is because the "gems" folder disables a function in Radio called "rendering" - by which Radio transforms a simple text file into an HTML file and then uploads it to your web site. The gems folder is for any files you specifically want Radio to leave alone... so we need to create an HTML file called index.html that we can save in the gems folder. I've created one - download gems_index.txt (right-click, select "save as") and save it into your gems folder. Rename it index.html (in the gems folder), change the URL from http://your.blog.here/ to your blog URL, and Radio will take care of the rest.

By the way - rendering is a little-known feature in Radio. Create a folder in the "www" folder in Radio. Save a text file in there, wait a few seconds, then go to your web site. You'll have a file formatted with your site template - containing the text from the text file. Play with it a bit - it's a great way to save e-mails to the web, create static files for your web site (it's how I created the about page for this site), and other easy ways to add HTML pages to your site without thinking about it.

[tins ::: Rick Klau's weblog]
 
9:38:09 PM
categories: Radio Fun
 

Directory Browsing

Prevent Directory Browsing in Radio.

I think this should be an option built in to Radio, but it's relatively easy for you to do on your own. Here's the issue: Radio is a web content management system - when you add content to Radio, it automatically uploads that content to your website. For many users, their web site is hosted at http://radio.weblogs.com/. (Others, like me, host it at their own domain.) Radio maintains its content in a hierarchical folder structure. But relatively savvy individuals can type in your URL and add folders they want to "snoop" on - and Radio doesn't prevent this.

There's an easy way to do this: drop a text file into any folder you want to restrict access to. The text file is just a couple lines, and it includes a meta refresh command that forces the browser to load a new page. Here's my file - save it as index.txt, and drop it into any folder other than your "www" folder.

To try this out, try going to someone's Radio weblog and adding /categories after the URL. You'll now see all the categories they've set up. This isn't necessarily snooping, but there may be some private categories they've posted. (There are other examples, but hopefully you get the idea.) If you're the individual maintaining the blog in Radio, adding this text file to the folder will automatically redirect the browser to your site's home page.

Memo to Userland: I'd like this to be an option in the application itself. If I disable directory browsing, Radio should automatically drop this text file into any folder it creates.

[tins ::: Rick Klau's weblog]
 
4:48:12 PM
categories: Radio Fun
 


Site Template Updated.

Many thanks to all who helped test the new presentation. In the end, I decided to keep the images that frame the site. But the underlying "guts" of the page are completely changed - instead of lots of nested tables and spacer images to try and place text in just the right place, I'm using CSS to control page layout. The result is a dramatically smaller template file (for Radio users, my template went from 12k to 4k) and much, much cleaner HTML. As near as I can tell, it also results in more consistent presentation across browsers and platforms which is a good thing. (If you see anything that doesn't look right, drop me a line.)

While I was working under the hood, I went ahead and made some minor updates to other elements as well. Switched to Marc Barrot's activeRoll from my work-around (thanks again, Marc!) I also removed comments from the site - not because I don't appreciate your input, but because it was causing the pages to load much slower. (That the site wasn't awash in comments also helped make the decision.) Removing that code shrunk the template files even more.

More than anything, this was a great opportunity to get my hands dirty with HTML again. I learned a lot about CSS - something I knew about conceptually but had never played with. (For any Radio users who are interested in using this layout, let me know. I haven't yet explored turning this into a "theme" for Radio, but I may be willing to do that at some point.) Over time, this will make future changes to the site much easier - both because I don't have to figure out the crazy table structure any more to figure out where to put stuff, and because many changes can now be made in the CSS file without requiring a republishing of the entire site. As the weblog gets bigger, this becomes more and more critical. (CSS is ultimately about separating presentation from content - and in a weblog world, this should mean that the content of the blog lives in the blog app, and the presentation is defined centrally via a Cascading Style Sheet. But that's a discussion for another day.)

Now that this exercise is mostly done, I'll get back to posting stuff. :)

[tins ::: Rick Klau's weblog
12:11:04 PM
categories: Radio Fun
 


[RadioFAQs]
Radio Tip: Userland macro stories.

Answer: How to put boxes around those cool news scripts by Dave, Jim and others.

There are at least two ways: 1) use css formatting thanks to a hint by Lawrence Lee and 2) use Dave's Going Even Crazier: Frames Macro (thanks to Alison Fish, who sent me an email). I prefer the first method because I can have even more control: include colors, etc. example: my  DC Dog site is formatted by css formatting. All I had to do was just copy a couple of my already created css over to the Radioland home template and then call them when I needed to:

1) in the style section of my header in the html (Home template), I added these two from my DC Dogs: (When you get to the site, just view the source code)

.sidetop {
  text-align: center;
  font-size: .95em;
  padding: 2px;
  background-color: #FFAA00;
  border: 1px solid #000000;
}
.sideelse {
  text-align: left;
  padding-left: 8px;
  font-size: .9em;
  background-color: #EEEEEE;
  border-width: 0px 1px 1px 1px;
  border-style: solid;
  border-color: #000000;
}

then I called them like so:

Subscribed

   

2) "Question [snip]... I 'd like to know how to put boxes around these
links and make them look organized like Jeff did... )"

Did you see the frameIt macro?:
http://radio.userland.com/goingEvenCrazierWithMacros 

1) contributed by Dog News: weird, inspiring dog tales 

2) contributed by Alison Fish at: http://radio.weblogs.com/0111198/

[Dog News: RadioQuestions from Dog News] [dws.]
 
12:09:21 PM
categories: Radio Fun
 source


Copyright 2005 © Bruce Zimmer