Discussion
FolderblogCategoryIndex(back to index)Eric or anyone who used this code, could you pls help?
I have created category_index.php file and placed in my folderblog root. I created directory 'category', inserted a photo and .txt file into it.
I have folderblog 3x version, not the 2x version the code was written for.
I changed include ('var.php') to include('fb_settings.php') and $categories = file('categories.txt') to $categories = file('category.txt').
My problem: there are no categories displayed on the page. All I get is the blank page of a dark blue color with Total number of photos: 2 displayed. I actually do have 2 pictures in my 'photos' directory.
Thanks!
posted by O on 11 Oct 05 at 9:49 PM
sorry, but written for 2.x means: use with 2.x (or modify on your own)
anyway, a folder named category isn't necessaryly needed.
short explanation on how category_index.php works:
-it looks within your photos-directory, counts all jpgs and later puts this number out.
-also looks for a file (in the same directory as fb.php) named categories.txt
-from this txt file, the script knows what your category folders are named like.
-so it starts counting all 0byte files within these category-folders to put out this number...
so, normally you place your photos within the photos-directory. in order to use the category-index with fb 3 (your modifications seem right to me so far) you'll additionally have to make sure a few things:
1) to create folders within the photos-directory. these you give a meaningful category-name (eg: "summer-2005") dont use whitespace or too special symbols)
2) store the real photos into /photos/
3) place flat-files, simple, empty (0byte) txt-files in each category-folder (according to what category you want a single image to be archived in) and change it to exactly the same name of a image (also the extension to jpg).
for example now you have two files:
/photos/me-sitting-in-the-sun.jpg (the real image)
/photos/summer-2005/me-sitting-in-the-sun.jpg (the 0byte file)
4) now create your categories.txt
(see my own for example:
http://contact-sheet.de/categories.txt)
first word of a line is the name of the folder (eg abstract) and the second word is the desired caption-text for this category...
5) upload the categories.txt to the same directory as fb.php (or whatever you name it) run it from your browser and watch the parsing errors scroll by ;)
ask if something unclear...
good luck
(btw: you will have to double-check the variables called in category_index.php as the names might have changed from v2.x to v3beta)
posted by
erik on 14 Oct 05 at 10:57 AM
Post a Reply:
(back to index)