Used technologies: PHP, Perl, mySQL.
Used engines: FCKEditor (GPL License), forum SMF (GPL License).
Mechanism of work:
User management is under the forum SMF (tables smf_* are used)
Papers are in the table papers
But user's logins and passwords are in the plain table smf_logs (a little patch for smf)
Ok, we have the hoster with Perl 5.0 and PHP 5.0 minimum support.
Perl scripts are in ”/cgi-bin” directory of the general catalog with index.php.
In this example I created the third level domain http://test1.yetidi.net.
Create “cgi-bin” directory if in not exists.
Create “smf” directory
Upload “smf_1-1-6_install.zip” into the “smf/”
Upload “unzipZ.cgi” and “unzipF.cgi” into the “cgi-bin/” directory, set the permissions for them to 755 (+rx)
-
Delete also smf_1-1-6_install.zip from “smf/” directory
Open link “
http://test1.yetidi.net/smf/install.php” and fill out: Forum name, MySQL server name, MySQL username, MySQL password, MySQL database name (“db prefix” must stays “smf_”). Press “Proceed” to apply.
Next fill out the admin account (page “Create Your Account): login = “admin”, password, e-mail, and the mySQL password to save it. Later you can add another account with administrative rights. But only user with login: “admin” have full rights in paper database.
Now click “Click here to delete this install.php file now” to remove install.php from the server.
-
Click “Admin” and go to “Members” “Membergroups”
On the page “Manage Membergroups” click “Add Membergroup”, then type “Reviewer” into “Membergroup name”, click “Add group”; on the next page click “Save” again
Now you can select this group when you'll add new users
Click “Admin”, “Members”, “Registration”
Fill out username, password, e-mail. If new user is “Reviewer” – select “Reviewer” from “Primary Membergroup” menu. Click “Register”
Add next user…
Later you can edit users via menu “Members”, select the user (click the name). Click “Account Related Settings” and fill out the additional data (home address, organization,
ICQ, Phones, etc)
The forum patched to extract the users login and passwords from it. SMF used own encrypt algorithm to work with passwords. But the patch extract the passwords from the forum and write them into the mySQL table in plain text format.
My patch useful with the SMF 1.1.6. If you'll use the newest version of SMF, you should to change these files yourself accordingly.
So, step by step:
See smf_patch directory in my package
Open myPHPadmin, select right database,
SQL query – execute sql-query from the file “table.sql” (copy/paste)
Upload “ManageRegistration.php”, “Load.php” and “LoginOut.php” into the subdirectory “smf/Sources/”
Upload “script.js” into the subdirectory “smf/Themes/default/”
How to check the patch works ok:
Add somebody into the forum via Admin Tools (/smf/index.php?action=regcenter)
See the table “smf_logs” via myPHPAdmin – you should see the record with this username and password
Note: user with the password will work with Articles only after the successful login into the forum.
Or you can add username / password to “smf_logs” for visitors manually.
When my scripts work – they fetch the user member group from “smf_members” and “smf_membergroups” tables.
Make the subdirectory ”/papers” in the root directory of your website
Upload here the “papers” directory of the package
Open myPHPAdmin and run here all *.sql files from the package (use copy/paste)
-
Delete also “fckeditor.zip” from “papers/fckeditor/” directory
According to your mySQL settings you should change next files:
“papers/inc/db.php” – $db_host, $db_name, $db_user, $db_pass
“papers/inc/globals.php” – not necessary here (not needed to change)
“papers/var_auth.inc.php” – see comments inside the file and edit so
Ok, now you can upload “papers/*” with all subdirectories.
To check if it work go to “http://your_site/papers/” you'll see login page.
Notes:
These tables are used in Auth() module:
CREATE TABLE `AresTestAuthTable_Temp` (
`ID` smallint(6) NOT NULL auto_increment,
`name` varchar(25) NOT NULL,
`password` varchar(25) NOT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `ID` (`ID`)
) ENGINE=MyISAM AUTO_INCREMENT=43 DEFAULT CHARSET=cp1251
CREATE TABLE `smf_logs` (
`id` int(11) NOT NULL,
`name` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251
The main table with articles:
CREATE TABLE `papers` (
`paper_id` int(11) NOT NULL auto_increment,
`paper_type` varchar(255) NOT NULL,
`paper_date` date NOT NULL default '1000-01-01',
`paper_article_number` varchar(8) NOT NULL default '',
`paper_category` varchar(255) NOT NULL default '',
`paper_title` varchar(255) NOT NULL default '',
`paper_authors` varchar(255) NOT NULL default '',
`paper_source` varchar(255) NOT NULL default '',
`paper_link` varchar(255) NOT NULL default '',
`paper_summary` text NOT NULL,
`paper_comments` text NOT NULL,
`service_type` tinytext NOT NULL,
`plain_summary` text NOT NULL,
`plain_comments` text NOT NULL,
`publish_date` date NOT NULL,
`article_type` text NOT NULL,
`review_date` date NOT NULL,
`reviewer` varchar(30) NOT NULL,
`approved` int(11) NOT NULL default '0',
PRIMARY KEY (`paper_id`)
) ENGINE=MyISAM AUTO_INCREMENT=365 DEFAULT CHARSET=utf8