Document - ArticleManager Installation
Author - Eloi George <eloi@bygeorgeware.com>
Updated - 6/14/2004

-----------------------------------------------------------------------------
LICENSE
-----------------------------------------------------------------------------
LGPL Licence.  See LICENSE.txt


-----------------------------------------------------------------------------
INSTALLATION
-----------------------------------------------------------------------------
Before installing, check your version of phpWS.  This version of Article Manager requires phpWS version 0.9.3-2 or above.
To install Article Manager simply follow these steps:

1. Place the articlemanager files into the phpwebsite/mod/article/ directory.
2. Make sure the permissions on the phpwebsite/images/ directory allow the web server to write.
3. Open your browser and point it to your phpWebSite site.
4. Open the "Boost" module as an administrator or deity and select the "Install" button for ArticleManager.
5. Enjoy!


-----------------------------------------------------------------------------
IMPORT DATA FROM PAGEMASTER or ANNOUNCE
-----------------------------------------------------------------------------
IMPORTANT!:
Back up your entire database first!
The import script changes data for the menus, categories, approval and comments modules so that they'll automatically point to the new pages.
There is no export script because the best way of reverting data is to restore the entire database from a recent backup.
Also, if you had any <img>,<form>,<input> or <font> tags in your userpages, don't forget to add those tags to $allowed_tags in your /conf/textsettings.php file before you run the import!  phpWS strips out any unallowed tags from the data as it finds them.

SUGGESTION:
As with all data conversions, sometimes bad data can mess up the process.  I've tried to account for all potential problems, but to be sure that everything is converted properly I suggest that you make a small change to your /core/Database.php file.  Change line #469 from this:
      if($this->query($sql, FALSE, TRUE)){
to this:
      if($this->query($sql, FALSE, FALSE)){
So you can see any error messages that the database creates.  If you want to keep track of when phpWS messes up stuff, don't change it back.


0. Back up your entire database.
1. Make the convert/reroute/ directory writable (apache.apache, nobody.nobody, 777).
2. Make sure the images/articlemanager/PM & images/articlemanager/ANN directories are writable (apache.apache, nobody.nobody, 777).
3. Log in as a Diety.
4. To import PageMaster, run www.yoursite.com/index.php?module=article&config=import_pagemaster
5. To import Announcements, run www.yoursite.com/index.php?module=article&config=import_announce
6. Log out & log back in so the menu data can be reset.
7. Change the write permissions on the convert/reroute directory to not writable.
8. Back up the files in the convert/reroute directory.  They won't ever change again.


-----------------------------------------------------------------------------
WHAT TO DO IF THE IMPORT FAILS
-----------------------------------------------------------------------------
Announcements and Pages are imported, the script also converts the comment, menu, and fatcat data to point at the new articles.  It also creates URL rerouting files named announce.AM and pagemaster.AM in the convert/reroute directory so that once you uninstall Announcements and/or PageMaster, any requests for a specific announcement/page will cause the display of it's equivalent article.

The problem with this is that since you had a failed import, you have to roll back the clock before you do it again because the menu, fatcat, and comment links are pointing at the first set of articles that were created.  Restore the entire site database from the backup you created in step 1 of the installation instructions and delete the files "/convert/reroute/announce.AM" and "/convert/reroute/pagemaster.AM".  Then run the import script again.


-----------------------------------------------------------------------------
UNINSTALLING ARTICLE MANAGER
-----------------------------------------------------------------------------
WARNING!!
Running this file will result in loss of data!  It is suggested you backup your phpwebsite/images/articlemanager/ directory and backup your database.
I am not responsible for any loss of data nor is Appalachian State University, developers of phpWebsite.

To Uninstall ArticleManager simply follow these steps:

1. Make sure the permissions on the phpwebsite/images/ directory allow the web server to write.
2. Open your browser and point it to your phpWebSite site.
3. Open the "Boost" module as an administrator or deity and select the "Uninstall" button for ArticleManager.
4. When asked if you are sure you wish to uninstall ArticleManager select "Yes".
