...more recent posts
I have a lot more work done on the image system (uploading, editing, and categorization) but nothing ready to show yet.
I'm curious if anyone is wedded to the /image/album0/ naming convention for image albums? At the moment I am planning on changing this so that, say, my Austria 2002 album would move from http://www.digitalmediatree.com/image/album32/ to http://www.digitalmediatree.com/image/album/5/austria_2002/ (or maybe I'll put /image inside /library, so /library/image/5/album/austria_2002/)
Any thoughts on this? Any idea if there are external links going to any albums at the old locations which might break? (I don't really think so, but I could be wrong.)
Another long day today. And a lot more progress.
This will be exciting for Mac OS X users. I have the functioning skeleton of a new program that uploads files to the website. Right now it understands a bunch of different image formats and the mp3 music format. But I can add other types very easily (certainly other music formats are dead simple to add, but movie formats will be only slightly more difficult.)
The cool thing is that half the program runs on the client machine. Since OS X is unix this makes everything really easy - and I'll be able to install it on any Mac OS X machine. This program makes it so that there is a web upload folder on my machine. I can drag media files into this folder, and then I just load a particular web page in my browser. That starts a chain of events that uploads every file in that folder to the server, and then synchs all those files (putting them into /library/image/x/ or /library/music/x/ (or /library/video/x/...) and adding the appropriate information to the database.
The big win here is multiple file upload capability. You could just set it going on a big folder and go out for a bite. But the other win is speed. Unlike the present photo upload system, which sends the file over HTTP, this program (running on the client) makes an FTP connection to the server. This means that big files will not be a problem. It's basically a replacement for the complex music uploading system we have now (that requires a standalone FTP program on the client) and it handles photos (and soon movies) as well.
This should run on any unix based machine that can run PHP.
Of course I will continue to do my best to support all platforms, so there will always be ways to do these things from windows - I just can't guarantee it will be as easy to use.
Probably take me a couple more days to get it all polished up.
Holy cow what a long day. Very frustrating. Nothing was going right.
I was just going to finish up my work on the upload scripts this morning, but it ended up taking all day. I *think* things are back in working order now though.
If you were around today you might have noticed some errors since I was uploading lots of different files to the server (if you request a page right as I'm changing it you would get an error.)
I changed the new library structure a bit. Before (I mean yesterday) a picture (say test.jpg) that I uploaded would be in /library/5/test.jpg. Now it is in /library/image/5/test.jpg. I added the extra layer in the hierarchy because soon we will also have directories like /library/music/ and /library/video/. Nothing should have broken because of this move. But I'll go back and change any links anyone made yesterday while the filesystem was set up the other way.
Otherwise everything else is the same. But under the hood there are a lot of changes - and everything is much more sensible down there now.
Yesterday I slightly broke the comment system in the case where you are leaving a comment from a /new_comment page. In those cases line breaks were not being converted to html break tags.
This is now fixed.
The active page owners on the site can now create top level pages. Let me know if you want this and I've overlooked your account.
I've been putting it off all week, but this morning I finally dove in and made changes to the picture uploading system. I'm 90% done, and it has gone fairly well so far.
Don't panic too much, all photos still exist in their old location, and I'm leaving the /getpic/ scripts in place for the foreseeable future. So everything will continue to work as it always has.
But I'm bringing the new system up in parallel, so the new way will start to work alongside the old way, and maybe eventually we'll get rid of the old way (but we'll always leave /getpic/ in place so no external links will ever break.)
The goal here is to get PHP completely out of the equation when an HTTP request is for an image file.
There is a new directory /library. Inside /library are folders for each user id (well, for each user id that has uploaded pictures.) A copy of every picture you have uploaded is now inside that directory. In the old folder (kept outside the webserver domain) the files had unique numeric filenames corresponding to the id for that picture in the database. All file information (name,date,user,etc...) was in the database. In the new system the info is still in the database, but the filename is kept the same as when you uploaded it (except in the case of duplicates where the system appends _1, _2, _3 as necessary, as well as replacing spaces with underscores.)
So where img src="/getpic/123" would request picture 123 (which had, say, the real filename 'test.jpg' when uploaded,) the new tag would be img src="/library/5/test.jpg".
The /5/ in the above example is my user id number.
The thumbnail is still at img src="/getthumb/123", but now it is also at img src="/library/5/thumbnail/test.jpg".
But remember /getpic/123 will continue to work, so nothing is going to break. When you upload new pictures they go to both the old directory and the new directory (same for thumbnails.)
Next I am going to update the post script to do some substitution. I am thinking of using this shorthand for inserting pictures: <[xxx]> where xxx is either the picture number or the exact text of the description you gave the picture when uploading. When you post an entry with that code in it, the post script will replace it with the appropriate img src="/library/n/xxx" format.
If that seems to work I'll write something to go back through the database and change all the /getpic/ statements to the new form.
This will be much more efficient. And it also will solve the weird problems we sometimes encounter because the file extension is not visible in the html. Some browsers get confused and download the file to disk rather than displaying it in the browsers. This will become even more of a problem as we move to dealing with many more mime types (moving images and such.)
I've revamped the subscription script. The changes can be seen when clicking [subscriptions] from the front page. This is the master subscription page that used to take *forever* to load. Everything you can do on the master page, you can also do on each individual subscription page, but on the master page you can change many pages at once.
(For instance, you can go to /systemnews/subscription/ and add or remove this page from your home page. But you can also go to /subscription/ and add or remove this page, as well as adding or removing any other pages.)
It now loads much faster because the 'Add any page' pull down menu no longer lists every freaking page on the site. I have changed this to 'Pages you might want to add' and that pull down now lists every page you have permission for which isn't on your homepage, but is on at least one other persons homepage. In addition, there is now a text field where you can type in the path of any page you want to add (in case you want to add one no one else has on their homepage.)
The rest works the same. This is the best page to use to organize the ordering of pages on your homepage. The system is pretty smart when you change the numeric order of any of your pages. You can change, say, number 15 to number 2 without manually reordering all the pages in between. Just change 15 to 2 and leave everything else the same (so you have 2 number 2's and no number 15.) The system will sort out the conflicts and reorder everything nicely (the old number 2 becomes 3, 3 becomes 4, etc....)
Does anybody else feel like they lost all their unread posts (not comments) around noon today?
The [create] scripts have been slightly updated. Gone are the confusing options for recommending different posting and home page values (which didn't really work as you might imagine anyway.)
Now you either choose to make the new page like an existing page (cloning), or you choose the template, page style, and public/private.
If you are cloning a page the new page will have the identical permanent page text entries as the source page (if the page you are using as a template for the new page has some permanent text on the left, then the new page will have that same text - useful if you have certain links you want on all your pages.)
And also, again when cloning, the subscriptions of all users will be the same for the new page as for the source page - *except* for position on each users home page. So, if you create a new page through cloning an old one, all the new subscriptions will be identical for each user *except* home page position will always equal 0 (the new page won't be on any users home page.)
Cloning is especially useful if you have private pages (and doubly so if your private pages have a large group of people with permission to post.) You could just make a private page (without cloning,) but then you'd have to add each poster in [admin] - one at a time! By cloning a page that already has the group of posters you want you get the correct permissions in one step.
This sort of worked before, except that the new page would mimic the source page in terms of appearing on people's home page. I'm trying to make it a rule that no one can add a page to an existing users home page. Only the user themselves can modify the pages on their home page. Any other behavior is now considered a bug.
If none of this makes sense, don't worry. [create] is now actually easier to use, and should work more intuitively. So go ahead and [create] new pages to your hearts content. If you try to [create] a page where you do not have permission the system will let you know.
Probably there will be some bugs until we use it some, but I have completed initial work on the [add user] scripts. All members should now see that option in their menu bar (let me know if you don't).
It's pretty straight forward. Just give them a name and (optionally) a url for their page, and the system does the rest. The subscriptions are made to mirror a dummy account I have set up. This sets up the persons home page with what I believe are the main pages on the site, as well as granting posting permissions for the common pages (treehouse, sustenance, artifax, cinefiles, regenerate.)
If, in the future, people make pages that they feel should be added to this starter set of front page pages, let me know and I will add your page to the dummy account ('generic friend') home page. Then, from that point forward, all new accounts will include this page on their home pages.
So feel free to add people and give out pages. What's the worst that could happen?