11.20.2004 11:13

Picture of the Day


Image

Edited for clarity 11/29/04.

While exploring Nanoblogger I came across a cool plugin that lets you include a picture in your entries. It's a recent release and the author hasn't written much documentation yet, so I thought I'd put here how I got it working here. It's not hard at all.

First, I downloaded the plugin and copied it to where I have Nanoblogger installed. Then I untared it which should put everything where it needs to be in the plugins directory. After that I edited the picture.sh that was put into plugins/entry, searched for http and changed the URLs I found to point to my blog. I only changed up to the occurrence of /$ARCHIVES and left everything else alone. After that I changed to my images directory and did a mkdir small. Finally, I edited entry.htm and permalink_entry.html in my templates directory and added $NB_Picture just above the line containing $NB_EntryBody.

Now, at this point I just copied the picture of my choice to my blog_dir and added an entry. In this case a picture of my wife and youngest daughter. The picture needs to be either a png or jpg and be called current.jpg or current.png. I noticed it uses imagemagick to convert pictures so if you get an error like I did then check that you have imagemagick installed and working. I run Slackware so it was just a matter of downloading the slackpack and installing it.

Also you will have to replace all occurences of "http://cgi.ethz.ch/~scdaniel/weblog/" in plugins/entry/picture.sh with "http://your.blog.url" before it will work.

I'm not the author so I don't know specifically what the plugin does but I did observe that it takes the current.{jpg,png} and renames it to the same format as your articles permalink. In the case of this entry the image was renamed from current.jpg to 2004-11-20T11_13_11.jpg and moved to [blog_dir]/images while a thumbnail by the same name was created in [blog_dir]/images/small. The original current.{jpg,png} file is then not in your blog_dir anymore. If you want to link to the image in your blog manually you'll have to reference it in [blog_dir]/images. ie <img src="[blog_dir]/images/2004-11-20T11_13_11.jpg">

I hope I have this accurate. If there is anything wrong shoot me an E-mail and I'll fix it. The plugin can be found at sourceforge.net


Posted by Brian Reichert | Permalink | Categories: NanoBlogger Help | |

11.18.2004 23:43

cgicomment and Nanoblogger


I've finally managed to get cgicomment to work with Nanoblogger. I knew it was possible since I saw other blogs using it. However, the Nanoblogger docs assume you are putting your blog in a directory below your servers root. As in, it assumes you want to put your blog in http://rignesnet.tzo.com/[blog_dir] instead of right in http://rignesnet.tzo.com/.

The docs show to add two lines like:

BASE_DIR=../cgicomment/
ARTICLEDIR=../[blog_dir]


My first inclination was to set ARTICLEDIR=../ thinking it would find the root of my site. But all it did was complain about not being able to find the article, even though the URL's were all correct. Eventually it dawned on me to set ARTICLEDIR=../htdocs/ and comments worked perfectly.

Posted by Brian Reichert | Permalink | Categories: NanoBlogger Help | |

11.18.2004 00:19

Thoughts on Nanoblogger


So far Nanoblogger is very nice and super simple to use. Somehow though I think running a blog will get easier once I learn some actual HTML other than what I can remember from my old Descent site. I'd like to customize the Nanoblogger templates some when I get the time and the know how though the default layout is nice enough. At least I managed to get the smiley faces working. :D It's not totally obvious in the docs but you must set MOODS_URL in your blog.conf file to point to where you have the moods directory.

The next thing to try out will be setting up comments support.

Posted by Brian Reichert | Permalink | Categories: NanoBlogger Help | |

11.07.2004 18:52

Welcome to NanoBlogger!


The basic syntax is: nb [-b blog_dir] [options]

How to ...
  • create a new weblog (directory) = nb -b [blog_dir] -a
  • create a new entry = nb -a
  • create a new category = nb -c new -a
  • create a new entry for a category = nb -c [cat_id] -a
  • list current entries = nb -l [current|all]
  • list categories = nb -l cat
  • list entries by category = nb -c [cat_id] -l [current|all]
  • edit an entry = nb -e [entry_id]
  • move an entry to a category = nb -c [cat_id] -m [entry_id]
  • delete an entry = nb -d [entry_id]
  • delete a category = nb -c [cat_id] -d cat
  • delete an entry from a category = nb -c [cat_id] -d [entry_id]
  • force update of weblog = nb -u [current|all|main]

Thank you for trying NanoBlogger. Please direct comments and suggestions to the mailing list or submit a bug report to the project page on sourceforge.net.


Posted by n1xt3r | Permalink | Categories: NanoBlogger Help | |