Location: PHPKode > projects > FNServer Image Collaboration Software > fn-0.5.4.2/readme.txt
README - FNSERVER

====================================================
FNServer Image Collaboration Software 
http://www.fotonotes.net

(c) FotoNotes, LLC. All Rights Reserved.
FNServer, FotoNoter, FotoNotes, and fotonotesplugin.php are 
open source and available under the Open Software License
v 2.1 (http://www.opensource.org/licenses/osl-2.1.php). 
FotoNotes is patent-pending.

Home/Docs/Licensing: http://fotonotes.net/spec/index.cgi?Licensing

You may implement the FotoNotes specification in your
own code an applications royalty-free in exchange for 
attribution under the Creative Commons by Attribution 
License. See http://fotonotes.net/spec/index.cgi?AttributionFormats 
for more information, including Commercial licensing options.

v0.5.4.2 BETA (1.30.2005)
====================================================


~GETTING HELP~
======================================================
Contact Greg Elin at hide@address.com


~VERSION HISTORY~
======================================================
v0.5.1 ALPHA
- Adds {SECTION} break tag
- Adds Daily module

v0.5.2 ALPHA
- Adds in texts creation
- Adds in existing Wikify class from fwiki code

v0.5.2.1 ALPHA
- Organizes images into subdirectories by date (example: imagedata/orginals/2004/12/30/imagename.jpg);
	NOTE: Requires modification to images table
- More works needs to be done to handle adjustment

v0.5.2.2 ALPHA
- Modified modules class to use conditional directory separator

v0.5.2.4 ALPHA
- Added filtering on my photos, all photos
- First iteration of chooser code for adding images to text through point and click
- All returns of images now include images without tags. Solves a bug where person uploads untagged
	photo and does not see it.

v0.5.3.0 ALPHA
- Prefixed database tables with "fn_".
- added modifyTextByID() method.
- added deleteTextByID() method.
- fixed {SECTION} tag to work with passed section break.

v0.5.3.1 ALPHA
- Added to check to make sure empty images+text array did not return an error on mutlisort.

v0.5.4.0 BETA
- Added install script (http://yourdomain.com/fnpath/?page=install)
- Added modules/module_weblog.php, modules/module_weblog.html, templates/weblog.html
- Modified library.inc.php getImagesAndTexts to excerpt a summary from content if no explicit summary value existed.
- Modified library.inc.php getImagesAndTextsDateRange to fix image display bug
- Modified modules/modules_daily.html to use improved section break tag
- Fixed magicquote issue.

v0.5.4.1 BETA
- Changed default password on fotonoter.php back to "password" and all permissions to allow.
- Modified wikification of text to display uploaded images using syntax [image:justimagename.jpg] and[image:justimagename.jpg|60]

v0.5.4.2 BETA
- General cleanup
- new syntax for wiki: [image:file] and [image:file|width] (work with local and remote images (cached))
- new syntax for wiki off to other URLs [link:url] and [link: url|linktext]
- centralized all wiki into FNServer->Wikify() method
- streamline modules_text.php and related FNServer methods
- version 55 of library.inc.php

~FEATURES~
======================================================

FNServer is brand-new, still alpha, image colloboration software for websites using the FotoNotes Image Annotation Specification. 

Versions of FNServer exist in PHP4 and PHP5. The PHP5 version can take advantage of PHP5's embedded SLQLite database.

FNServer includes the Flash(TM)-based FotoNoter viewer as well as a brand-new js/dhtml viewer. This new js/dhtml viewer can be positioned anywhere on the page and each page can have more than one js/dhtml viewer. 

Please note that FNServer is still very much alpha software. 



~LINUX/UNIX INSTALLATION~
=======================================================

1. Copy the following "fn" file your webserver that supports PHP4 or PHP5
2. Create a MYSQL user and target database for PHP4 installations. Create an SQLLITE database for PHP5.
3. Adjust the config.php file to point to your database and database user
4. Launch your browser and go to http://yourdomain/yourfnpath/?page=install
5. Follow instructions.
6. The imagedata folders are now set to 777 so your install will work immediately. However, you may want to adjust
your file permissions.

NOTE: In versions 0.5.4 and LOWER, the permissions for annotations on FotoNoter viewer are set globally inside
fotonoter.php. Please adjust accordingly.



~WINDOWS INSTALLATION~
=======================================================
We've test FNServer with EasyPHP (version 1.7) from http://www.easyphp.org/
EasyPHP contains an Apache webserver, PHP 4.3, and MYSQL in an easy to install package.

The default configuration of EasyPHP needs the following quick tweaks

error_reporting = E_ALL & ~E_NOTICE

1. We've tested FNServer with EasyPHP (version 1.7) from http://www.easyphp.org/
EasyPHP contains an Apache webserver, PHP 4.3, and MYSQL in an easy to install package.
If you are unfamiliar with running PHP on windows, try EasyPHP.

2. If you install EasyPHP's php.ini make the following changes in the php.ini file,
located c:\EasyPHP1-7\apache\php.ini (if you did the default install)

Set error_reportint to show all Errors but not show notices

	error_reporting = E_ALL & ~E_NOTICE

Uncomment the php_gd2.dll extension line by removing the ";" at the front of the line

	extension=php_gd2.dll

Restart Apache using the EasyPHP controls that appear in your system tray.

3. Copy the following "fn" file your webserver that supports PHP4 or PHP5
4. Create a MYSQL user and target database for PHP4 installations. Create an SQLLITE database for PHP5.
5. Adjust the config.php file to point to your database and database user
6. Launch your browser and go to http://yourdomain/yourfnpath/?page=install
7. Follow instructions.
8. Make sure Apache has permissions to write to the imagedata folder. 

NOTE: In versions 0.5.4 and LOWER, the permissions for annotations on FotoNoter viewer are set globally inside
fotonoter.php. Please adjust accordingly.


~ MYSQL DATABASE SET UP~
=======================================================

If you wish to create your tables directly, run the following SQL statements in MYSQL.

# phpMyAdmin SQL Dump
# version 2.5.7-pl1
# http://www.phpmyadmin.net
#
# Host: localhost
# Generation Time: Dec 30, 2004 at 11:12 AM
# Server version: 4.0.21
# PHP Version: 4.3.6
# 
# Database : `fnserver`
# 

# --------------------------------------------------------

#
# Table structure for table `fn_images`
#

CREATE TABLE `fn_images` (
  `file` varchar(200) NOT NULL default '',
  `user` varchar(200) default NULL,
  `added` varchar(200) default NULL,
  `modified` varchar(200) default NULL,
  `tags` text,
  `host` varchar(250) default NULL,
  `filepath` varchar(250) default NULL,
  `archive` varchar(200) default NULL,
  PRIMARY KEY  (`file`)
) TYPE=MyISAM;

# --------------------------------------------------------

#
# Table structure for table `fn_texts`
#

CREATE TABLE `fn_texts` (
  `text_id` bigint(20) NOT NULL auto_increment,
  `user` varchar(128) NOT NULL default '',
  `title` varchar(175) default '',
  `summary` text,
  `added` varchar(200) default NULL,
  `modified` varchar(200) default NULL,
  `content` text,
  `tags` text,
  `archive` varchar(200) default NULL,
  PRIMARY KEY  (`text_id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;

# --------------------------------------------------------

#
# Table structure for table `fn_users`
#

CREATE TABLE `fn_users` (
  `username` varchar(48) NOT NULL default '',
  `password` varchar(32) NOT NULL default '',
  `email` varchar(200) default NULL,
  `date_registered` datetime default NULL,
  `date_lastvisit` datetime default NULL,
  `firstname` varchar(30) default NULL,
  `middlename` varchar(30) default NULL,
  `lastname` varchar(30) default NULL,
  `homepage` varchar(96) default NULL,
  `image_url` varchar(200) default NULL,
  `directory` char(3) default NULL,
  `mobile_email` varchar(200) default NULL,
  PRIMARY KEY  (`username`),
  KEY `homepage` (`homepage`)
) TYPE=MyISAM;
    

~ DATABASE UPGRADE ~
======================================================

If you upgrading from v. 0.5.2.2 or earlier (MYSQL)

ALTER  TABLE `images`   ADD `modified`  VARCHAR(200)  AFTER `added`;
ALTER  TABLE `images`   ADD `archive`  VARCHAR(200);
ALTER  TABLE `texts`   ADD `archive`  VARCHAR(200) ;

create table fn_images as select * from images;
create table fn_texts as select * from texts;
create table fn_users as select * from users;

ALTER  TABLE `fn_texts`   DROP  PRIMARY  KEY , ADD  PRIMARY  KEY ( `text_id`   ) ;
LTER  TABLE  `fn_texts`  CHANGE  `text_id`  `text_id` BIGINT( 20  )  NOT  NULL AUTO_INCREMENT 

drop table images;
drop table texts;
drop table users;


~ SQLLITE DATABASE SET UP~
=======================================================

If you wish to create your tables directly, run the following SQL statements in SQLLITE.

CREATE TABLE fn_images (file, user, added, modified, tags, host, filepath, archive);
CREATE TABLE fn_users (username, email, password, date_registered, date_lastvisit, firstname, middlename, lastname, homepage, image_url, directory, mobile_email);		
CREATE TABLE fn_texts (text_id INTEGER PRIMARY KEY, title, added, modified, user, content, tags, archive);


~INCREDIBLY BRIEF DEVELOPER GUIDE ~
======================================================

FNServer is object oriented and consists of a single library.inc.php script which defines FNServer class, module class, and page class. Rarely should you need to touch the library.inc.php file, unless you want to add a new method to FNServer class which does the heavy lifting for managing photos and talking the database.

Here's how everything works.

1. The only script called by the browser is index.php.
2. Index.php starts a PHP-managed session and instantiates a new "page" object.
3. The template with the same name as the page parameter value is parsed. (Example: page=register means template/register.html)  The template contains curly-braced calls to various modules. 
4. Each module is parsed from the template.
5. Each module consists of a pair of files from the "modules/" directory, a php script and an html template. The modules' php script defines a class  that extends the Module class. The basic function of the module class is to add values a $content array which corresponds to curly-brace place-holders in the associated html template. 
6. The last step of each array is to render the HTML from the html.

So, there are basically two templates: the overall *page* templates that define the web page sent to the client, and the individual *module* templates. The *module* html templates MUST be named the same as the corresponding *module* php script. However, the *page* templates can be named whatever they want. Individual *module* templates CAN call other *module* templates.

If you want to modify the way the menu looks, for example, change the modules/module_navigation.html template. If you want to add a menu item, you need to adjust the modules/module_navigation.php script.

If you wanted to add a table with a special menu on the home page, for example, change the templates/home.html and change the html. Notice how templates/home.html calls the gallery module with:
 {MODULE gallery: tags={POST gallery_tags}; start={GET start}; display={GET display}}
 
If you wanted to create a new module, called "favorite", to show a user's favorite photo, for example, you would need to create modules/module_favorite.php and modules/module_favorite.html. We'd also need a way to determine the user's favorite photo. So you'd probably have to add a field to the user table. That new field should (I think) get picked up automatically by the userInfo() method. It might be that you just add this module to the templates/userinfo.html page. Or you might create a new page in templates to display it.

# # #
Return current item: FNServer Image Collaboration Software