Upgrading from Userpages v1
See Also: Read Me and Database
Info
Database Changes
Although it is not fully recommended to do so, you can use the
database from userpages version 1 if you want to keep the pages that have
already been created by users. There are probably better ways of updating
your database, but this is the way I have tried and am familiar with.
You don't need to move the user's images from the server as long as the
original folder "userpages/uploads/userpics" is still there,
all paths to images here should still be be valid. New images will go
in to the "userpages2/uploads/userpics/" folder but the user's
older pictures will still show in the editor. You will need to make some
small adjustments to the database as outlined below.
Suggested Steps:
-
Back up (re-name) the new database (db.mdb) in the folder userpages2/data/db.mdb
(you can then refer back to it if needed).
-
Copy your old database (db.mdb) from userpages/data (version 1) to
the directory for version 2 (userpages2/data/db.mdb). This is the
database that is referred to as db.mdb from now on.
-
Open the db.mdb in Microsoft Access and add the following
fields to the tables:
Table within "db.mdb" |
Field Name to add |
DataType |
Default Value |
UserArticles |
background |
Text |
"#FFFFFF" |
Users |
SLevel |
Number |
0 |
With adding the field background to the table UserArticles,
it doesn't matter if there is any value in the background field, pages
will show the default browser background (which is usually white), so
don't worry about the page looking wrong - the users can change this as
they please when they next login.
Important: With the Users table,
the field SLevel must contain a number, 0 for all
users except yourself (the administrator) which must be set to 1 for you
to access the admin area. If this field is blank, there will be an error
on login.
If you have a lot of records in the table Users, it may be an idea
to do a search and replace from within Access to fill the value
in this field with 0. In Datasheet View, highlight the column SLevel
and choose Edit > Replace. Then fill in the dialogue box as
below and click Replace All.
Help Images for editing database:


See Also: Read Me and Database
Info
|