April 08, 2007

Files & Folders

Stuck working with files or folders? Here's the place to ask.

Posted by: Pixy Misa at 10:45 AM | Comments (30) | Add Comment
Post contains 14 words, total size 1 kb.

1 First post in beta! Thanks for the invite!

Question about creating new categories. Successfully (I think!) created an "administrivia" category using the "edit folder" screen.
Entries were:Type => CategoryName => AdministriviaPath => http://oldgrouch.mee.nu/http//oldgrouch.mee.nu/adminstrivia (copied from "Example," changed the last folderURL Pattern => left blank, since there wasn't anything in the example. What is this?Linked to => okay, I see it's automagically linked me to "Category.Administrivia"What are Tagline and Description? (As you can see, I've never done this before.)
Suggestion: You've got enough room on the page to include some one-sentence explanations of what's supposed to go in the form.
Observation: I'm running 800x600 on this machine (the other one is 1024x76 , and the Type, Name, Path, and URL Pattern textboxes extend off past the right edge of the screen. There's also no horizontal scrollbar. Want a screenshot?

Posted by: Old Grouch at April 10, 2007 10:43 PM (8vPcQ)

2 Above formatting sucks because I tried an unordered list, and it didn't work. Trying brackets:[ul][li]Entries were:Type => Category[/li][li]Name => Administrivia[/li][li]Path => http://oldgrouch.mee.nu/http//oldgrouch.mee.nu/adminstrivia (copied from "Example," changed the last folder[/li][li]URL Pattern => left blank, since there wasn't anything in the example. What is this?[/li][li]Linked to => okay, I see it's automagically linked me to "Category.Administrivia"[/li][ul]
Also, I see it turned the characters "number 8" followed by "right parenthesis" in the next-to-last sentence into a smiley.

Posted by: Old Grouch at April 10, 2007 10:49 PM (8vPcQ)

3

I don't think you need to put in the "http...etc." for the path. I think if you just put "adminstrivia" in the path, it will automagically create the path http://oldgrounch/mee.nu/adminstrivia.

At least that's how I created my first category.

Posted by: Will at April 10, 2007 10:55 PM (SOx9v)

4 Will, you're correct. It appears that the only thing the "path" data is used for is constructing links to the category (as in sidebar category listings). If you put the full path in the path box, you wind up with links that include the path twice, i.e., not what you want!

Posted by: Old Grouch at April 11, 2007 02:34 PM (3y3+0)

5 Thanks Will!

Yes, that's exactly right.

Old Grouch, I'll be doing some testing at 800x600; we should be able to support that... though you might need to scroll a bit now and then, it should at least work.
Also, I see it turned the characters "number 8" followed by "right parenthesis" in the next-to-last sentence into a smiley.
Yes, it will do that.  That's something you can control for your blog; take a look at smilies.mee.nu for more information.

Also, I have some bbcode documentation available.  Ordered and unordered lists are supported, but the code is a little different to the HTML version; for an unordered list you want something like:

[bullet][item]Item one[/item][item]Item two[/item][/bullet]

Posted by: Pixy Misa at April 11, 2007 02:44 PM (PiXy!)

6 Found the bbcode docs minutes ago. Very clear, and bookmarked/

Maybe the test for smiley conversion should include a leading blank?

Posted by: Old Grouch at April 11, 2007 03:12 PM (3y3+0)

7 Timeout error during upload just now. Here's the cut-n-paste:
Unrecoverable error in the server. Traceback (most recent call last): File "/usr/local/lib/python2.5/site-packages/cherrypy/_cpwsgi.py", line 126, in __init__ response = self.request.run(meth, path, qs, rproto, headers, rfile) File "/usr/local/lib/python2.5/site-packages/cherrypy/_cprequest.py", line 303, in run raise cherrypy.TimeoutError() TimeoutError ---------------

Posted by: Old Grouch at April 13, 2007 03:00 AM (dt7YR)

8
Maybe the test for smiley conversion should include a leading blank?
That's not a bad idea; I'll take a look at that.
Timeout error during upload just now.
Yes, I've had another user report this to me as well.  It does appear to save your file successfully, but it gives you the error anyway.  I think I have a fix for this; I'm looking into it.

Posted by: Pixy Misa at April 13, 2007 03:20 AM (PiXy!)

9 Have been trying to implement category icons.

Created a directory called "icons": Type=Directory, Name=icons, Path=icons, Index Template=List.file, Page Template=Edit.file.
First problem: The "Link To" selector is stuck on "Directory.images (/images)". There is a "Directory.icons (/icons)" choice in the selector, but although I can change to it, the change won't save.

One of my categories is named "Beta" (upper case "B"). I loaded a *.gif named "folder_beta.gif" into the icons folder, then uncommented the code in the Post template. Couldn't get the image to show, so I hard-coded the URL. Page source shows the right address, but the image still won't load.

Secondary question: Are filenames case-sensitive? [post.category]="Beta"; name change routine on file's page won't let me change "folder_beta.gif" to "folder_Beta.gif".

Posted by: Old Grouch at April 14, 2007 01:45 AM (l8Tq5)

10
The "Link To" selector is stuck on "Directory.images (/images)". There is a "Directory.icons (/icons)" choice in the selector, but although I can change to it, the change won't save.
Hmm.  Try setting it to Not Linked, and see if that helps.  I'll have to check on that.
Are filenames case-sensitive? [post.category]="Beta"; name change routine on file's page won't let me change "folder_beta.gif" to "folder_Beta.gif".
Yeah, that's a problem.  File names are case-sensitive, but they're forced to lower-case on the server.  I've added a fix for that to tomorrow's update (April 15th).

Posted by: Pixy Misa at April 14, 2007 02:23 AM (PiXy!)

11 Erm.  Slight problem with that fix; it gets confused if you have two files with names differing only in the case of certain letters.  Working on that bit.

Posted by: Pixy Misa at April 14, 2007 04:58 AM (PiXy!)

12 Okay, got a fix for that too.

Posted by: Pixy Misa at April 14, 2007 05:07 AM (PiXy!)

13 "Try setting it to Not Linked, and see if that helps."
Thanks! That did it, it came back automatically linked correctly. I'll futz around with the filename problem after Sunday's update. Finishing taxe$ today.

Posted by: Old Grouch at April 14, 2007 11:20 PM (lLq3R)

14 Latest episode of the continuing filename/category name problem:

First, the update fixed the capitalization problem. I still wasn't able to rename the old one, but I was able to upload a new copy of the icon named "folder_Beta.gif" and have the uppercase "B" stick. So my "Beta" icons are now visible. Hurrah!

New problem: I have two categories that are multi-word: "Dear Diary" and "In Passing". But if I try to upload a file with a blank in the name, the blank gets stripped out. So: "folder_Dear Diary.gif" becomes "folder_DearDiary.gif". But this won't match [post.category], which will be "Dear Diary". Any suggestions?

Posted by: Old Grouch at April 17, 2007 02:20 AM (N7blS)

15
First, the update fixed the capitalization problem. I still wasn't able to rename the old one, but I was able to upload a new copy of the icon named "folder_Beta.gif" and have the uppercase "B" stick. So my "Beta" icons are now visible. Hurrah!
I tested copying and uploading but not renmaing. I'll get that fixed.
New problem: I have two categories that are multi-word: "Dear Diary" and "In Passing". But if I try to upload a file with a blank in the name, the blank gets stripped out. So: "folder_Dear Diary.gif" becomes "folder_DearDiary.gif". But this won't match [post.category], which will be "Dear Diary". Any suggestions?
Wups.

You can't have filenames with spaces, and that probably won't get changed.  What I can do pretty easily is give you a [post.category.nospace] tag, which is just the category name with the spaces stripped out.

Posted by: Pixy Misa at April 17, 2007 02:39 AM (PiXy!)

16 Okay, that will be in today's update.

Posted by: Pixy Misa at April 17, 2007 02:42 AM (PiXy!)

17 Man, talk about service! Do you ever sleep?

Posted by: Old Grouch at April 17, 2007 02:44 AM (N7blS)

18 No, but I've heard of it.

That update is in place now, so give it a whirl.

Posted by: Pixy Misa at April 17, 2007 06:13 AM (PiXy!)

19 Can't get it to work.
Tried renaming "folder_DearDiary.gif" to "folder_deardiary.gif", didn't take.
Then changed template code from "img src="/icons/folder_[post.category].gif" to "img src="/icons/folder_[post.category.nospace].gif". Category icons disappeared, and when I ask the browser to copy the icon url I get "http://oldgrouch.mee.nu/icons/folder_%5Bpost.category.nospace%5D.gif" (except with the brackets not escaped).
Sorry!

Posted by: Old Grouch at April 17, 2007 05:48 PM (8m7sz)

20 Darn.  That means it's not recognising [post.category.nospace] as a tag.  I'll take another look at that.

Posted by: Pixy Misa at April 17, 2007 06:07 PM (PiXy!)

21

I've got a new issue. I'm trying out a Perl package that will upload a google map track of my running log. (http://dave.runningland.com/grunninglogs/)

But the script needs to ftp the data to the server, and I can't get it to work. My username and password are getting refused by the server. It's not just the script; trying to manually ftp to boviate.mee.nu won't let me log in either.

Of  course, it may just be that you don't want any stinkin' ftp access to the server, which is probably a reasonable security decision. I tried searching the help, and didn't find anything about ftp one way or another. So what I'm asking is, am I screwing up the ftp access somewhere such that I need to fiddle with it, or should I come to grips with ftp being not allowed and look for a different toy to play with?

Posted by: Boviate at April 28, 2007 03:28 AM (ojRwJ)

22 FTP isn't allowed right now.  I'm looking at integrating an FTP server into the software, but that's at least a couple of months away.  Sorry!

Posted by: Pixy Misa at April 28, 2007 05:00 AM (PiXy!)

23 Hey, no worries, means I can quit worrying about learning Perl just to debug someone's else script :-).

Posted by: Boviate at April 28, 2007 11:05 PM (ojRwJ)

24 I'm missing something:

I've got categories.

I've applied the said categories to posts.

I have no categories in the sidebar or on the posts.

What am I doing wrong?

(sorry....computer neophyte alert)

Posted by: Brickmuppet at May 13, 2007 08:09 PM (V5zw/)

25 Hi Brickmuppet!

Rocket Jones has two category hotwo posts up:
Part 1
Part 2

The second part covers how to get categories in the sidebar (requires a template change in the SIDEBAR template).
If you want category icons, you have to uncomment some code in the POST template (it's marked), and create a directory (and some icons). I can't find the howto right now, but this post and some of the ones following outline the procedure. (Ignore most of the problems... they've been fixed.) Any more questions?

Posted by: Old Grouch at May 13, 2007 10:35 PM (8m7sz)

26 Okay, just noticed that the default POST template doesn't include the category. Here's the change I made to make the bottom line read "Posted by: Old Grouch in SomeCategory at SomeDayAndTime..."

Open the EDIT->TEMPLATES->ITEM: POST template. Scroll down to find the line Posted by: [post.authorlink] in Add this code after that line (leave a space after the word "in ": [post.category] There should also be a space between the closing "span" tag and the word "at", which should already be there. To see how this looks and works, check my blog.

Posted by: Old Grouch at May 13, 2007 10:50 PM (8m7sz)

27 Help Pixy... the editor's parsing code samples!

<Donald Duck>Hmmm... Parsing trouble-- Let's try that once more, nicely escaped!<Donald Duck>
Open the EDIT->TEMPLATES->ITEM: POST template. Scroll down to find the line
Posted by: [post.authorlink] in
Add this code after that line (leave a space after the word "in ":
<-- "span" tags make the category name bold -->
<span style="font-weight: bold"&lgt
<!-- "a" tag makes the category name clickable -->
<a href="/[post.category format=nospace]">
[post.category]
</a>
</span>

There should also be a space between the closing "span" tag and the word "at", which should already be there. To see how this looks and works, check my blog.
Hope it works this time!

Posted by: Old Grouch at May 13, 2007 11:03 PM (8m7sz)

28 Ouch... no preview. In the second line of the code, replace "&lgt" at the end with a ">" (to close the tag).
There should also be a closing parenthesis in the "Add this code..." line, but who cares. Sorry!

Posted by: Old Grouch at May 13, 2007 11:06 PM (8m7sz)

29 And, this time, the "small" BBCode tag appears to have escaped...

Posted by: Old Grouch at May 13, 2007 11:07 PM (8m7sz)

30 Re: BBCode. It appears the "/small" tag doesn't work. ("/sm" does).

Posted by: Old Grouch at May 14, 2007 03:38 AM (odxoP)

Hide Comments | Add Comment

Comments are disabled. Post is locked.
27kb generated in CPU 0.0148, elapsed 0.0851 seconds.
32 queries taking 0.0728 seconds, 82 records returned.
Powered by Minx 1.1.6c-pink.