Before saying what must be done, here is how the database is now.
DROP TABLE IF EXISTS tbl_login;
CREATE TABLE tbl_login (
fld_login varchar(20) NOT NULL default '',
fld_password varchar(200) NOT NULL default '',
fld_session int(14) default NULL,
fld_date date NOT NULL default '0000-00-00',
PRIMARY KEY (fld_login)
) TYPE=MyISAM;
# --------------------------------------------------------
DROP TABLE IF EXISTS tbl_pseudo;
CREATE TABLE tbl_pseudo (
fld_pseudo varchar(20) NOT NULL default '',
fld_login varchar(20) NOT NULL default '',
fld_comment1 varchar(50) NOT NULL default '',
fld_comment2 varchar(100) NOT NULL default '',
PRIMARY KEY (fld_pseudo)
) TYPE=MyISAM;
# --------------------------------------------------------
DROP TABLE IF EXISTS tbl_boite;
CREATE TABLE tbl_boite (
fld_id_box int(11) NOT NULL auto_increment,
fld_login varchar(20) NOT NULL default '',
fld_name_box varchar(50) NOT NULL default '',
fld_date_box datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (fld_id_box)
) TYPE=MyISAM;
# --------------------------------------------------------
DROP TABLE IF EXISTS tbl_contact;
CREATE TABLE tbl_contact (
fld_id_contact int(11) NOT NULL auto_increment,
fld_login varchar(20) NOT NULL default '',
fld_contact varchar(20) NOT NULL default '',
PRIMARY KEY (fld_id_contact)
) TYPE=MyISAM;
# --------------------------------------------------------
DROP TABLE IF EXISTS tbl_forum;
CREATE TABLE tbl_forum (
fld_id_forum int(11) NOT NULL auto_increment,
fld_forum varchar(20) NOT NULL default '',
fld_creator varchar(20) NOT NULL default '',
fld_date_forum datetime NOT NULL default '0000-00-00 00:00:00',
fld_type enum('Public','Prive') NOT NULL default 'Public',
PRIMARY KEY (fld_id_forum)
) TYPE=MyISAM;
# --------------------------------------------------------
DROP TABLE IF EXISTS tbl_forum_boite;
CREATE TABLE tbl_forum_boite (
fld_id int(11) NOT NULL auto_increment,
fld_id_forum varchar(20) NOT NULL default '',
fld_id_box int(11) NOT NULL default '0',
PRIMARY KEY (fld_id)
) TYPE=MyISAM;
# --------------------------------------------------------
DROP TABLE IF EXISTS tbl_invitation;
CREATE TABLE tbl_invitation (
fld_id int(11) NOT NULL auto_increment,
fld_id_forum varchar(50) NOT NULL default '',
fld_pseudo varchar(20) NOT NULL default '',
fld_confirme enum('no','yes') NOT NULL default 'no',
fld_date_invitation datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (fld_id)
) TYPE=MyISAM;
# --------------------------------------------------------
DROP TABLE IF EXISTS tbl_message;
CREATE TABLE tbl_message (
fld_id_message int(11) NOT NULL auto_increment,
fld_sujet varchar(50) NOT NULL default '',
fld_sender varchar(50) NOT NULL default '',
fld_message longtext NOT NULL,
fld_id_forum varchar(20) NOT NULL default '',
fld_date_message datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (fld_id_message)
) TYPE=MyISAM;
# --------------------------------------------------------
DROP TABLE IF EXISTS tbl_reponse_message;
CREATE TABLE tbl_reponse_message (
fld_id_reponse int(11) NOT NULL auto_increment,
fld_origine int(11) NOT NULL default '0',
fld_reponse int(11) NOT NULL default '0',
PRIMARY KEY (fld_id_reponse)
) TYPE=MyISAM;
# --------------------------------------------------------
DROP TABLE IF EXISTS tbl_type_message;
CREATE TABLE tbl_type_message (
fdl_id_read int(11) NOT NULL auto_increment,
fld_id_message int(11) NOT NULL default '0',
fld_type enum('write','read','notread','del') NOT NULL default 'write',
fld_pseudo varchar(20) NOT NULL default '',
fld_date datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (fdl_id_read)
) TYPE=MyISAM;
Either
correct the present program or redo it from the start based on any existing
software in any language, but are the problems that should be fixed:
The entry
page is useless, the root file (index.php or the like) should directly be the
login page.
There is a problem with frames: now when we call a page in a new window, then
in the new window click on something, it happens in the first window.
I wish a solution could be find to avoid this, or at least find away out of the
danger that when we started writing a message, a click from another window
discards the form of this new message.
Maybe no frames at all should be used.
There are bugs concerning the character ' in messages and titles
The list of boxes should be refreshed when we create a new box, and maybe also
when new forums appear in boxes but I don't know how to manage this.
The statistics that appear when logged in :
Nombre de nouvelles invitations recu (= new invitations)
Nombre de messages recu non lu (= new unread messages)
Nombre total d'inscrit (= number of existing members)
should not stay as they are now. We should add the page "statistics"
for the number of users (later more info can be added)
A problem
is that the session vanishes itself after a
certain time, which is a problem if we started writing a message then we
try to send it and we lose it. An idea would be the possiblity to record
the message anyway in a new session while the user is asked to type again
login and pass.
But I know something: on the same server (lautre.net) I can log in two
ways in SSL: one for squirrelmail, and one for the control pannel of my
alternC web account.With squirrelmail it happens that the session is destroyed
by
itself after
a time, while with the control pannel it does not. I don't know why.
In
tbl_pseudo there are comment1 and comment2.
Comment1 is to put between () in all messages by that pseudo
Comment2 is to display together with comment1 in the info page on this pseudo.
If this pseudo is in the list of contacts of a given user, also will be
displayed to this user the comment he wrote himself about this pseudo (as a tip
for him to remember who that person is).Any or all of these fields can stay
empty.
- Have a page "My pseudos" where one can view and edit the comments
associated with each of one's pseudos, and create a new pseudo.
We should
organize the data in the following way in order to have forums compatible with
the inter-site login system, where a user of a server can be subscribed to a
discussion hosted in another server: the information should be split into what
is hosted in each server in the right way.
Let us here only consider the case of private forums. Public forums will be
discussed another time and may work differently.
In the table of users of a given forum, which contains the set of all users who
can read or write in this forum, the list of info is:
- invitation id (auto-incremental)
- The login of this person if he is hosted in the same site
- His host else
- His pseudo of subscription to this forum
- The invitation id of the person that invited him (instead of the login or
pseudo)- right to write (yes/no)
- Subscription (yes/no)
In the user's table of forums there is at least
- The id of forum (by which the tables of this forum can be found)
- His invitation id in this forum (instead of his pseudo)
- Forum name
- Unread (yes/no)
- Box
- Box if unread
Apart from this, the table of pseudos will also have columns about
"box" and "box if unread" that will automatically fill the
corresponding fields of the user's table of forums for any forum where one is
newly invited as this pseudo.
Therefore it will be easy to make everything work: when he visits a forum, his
invitation id is known by the server. In the case when the user and the forum
belong to different hosts, in the authentication process, the forum id and the
invitation id are sent by the user's server to the forum's server. Then the forum's
server checks in its forum's table that on the line of the invitation id, the
"host" is identical to the one that sent this authentication request.
So that when he wants to write in this forum, the pseudo used will be the one
given by the invitation table of the forum according to this invitation id.
I think about stating the following rule:
If a user is registered to a forum but never wrote a message in it that was
read by someone else (or some condition like this), then he has the possibility
to change his pseudo used in this forum for another pseudo.
Else, he will only have the right to write messages under his pseudo B.
When someone sends a new message in a forum, the program takes in the table of
readers the pseudos of all subscribed people, finds from the pseudo the login,
and in the login's table puts status "unread"=yes.
Instead of having the
number of new forums and the number of new messages, we should have in the left
with the list of boxes, one number for each box, namely the number of unread
forums in this box. (The total number of forums in a box should be displayed
when we visit the box)
Now in the "main box" ("boite principale") web page there
are 2 tables displayed:-"Liste des forums contenant de nouveaux
messages" = "forums containing new messages"- "Liste des
forums aux quels j'ai reçu une invitation" = "forums I am
invited in".
We will not keep this separation, instead have only "unread" forums
as I explained.
We should not keep any fundamental difference between this main box and other
boxes, with exception that the user can choose which box, if any (or it may be
an unchangeable one - but in later developments some people can ask for it to
be different between working time and home time :-), will be automatically displayed
when logged in, and whether or not it is also displayed even if there are no
unread forums.
Instead there should be only one box containing both kinds of "new"
things, what I called "unread" in a previous message I sent you.
For creating a new forum there should be only one form made of:
- Boxes: two menus to choose among existing boxes for the "Box" and
"Box if unread" parameters, where the box where we are now is
selected by default for "box" if we are in a box, and the - if we are
not in a box, the default is defined by the user preferences. No possibility to
create a new box at this point (creating a new box is a separate function).
- pseudo: menu to choose between existing pseudos or a new pseudo to write just
aside. The default depends on the box in which we are if we are in one (this
should be managed with the list of boxes), or else the defaut is defined by
user preferences.
- public/private
- title of the forum
- Button "Create forum"
If the creation goes through, it should directly bring to the form of writing a
new message (the same as in forums that existed before). Only this form of a
new message should display the menu to select contacts to invite together with
a possible other pseudo to type, or a list of pseudos separated by commas.
There will be a button to only invite pseudos, another button to previsualise,
and another button to send. If we send, it will invite selected pseudos also.
If we previsualise, the selected pseudos to invite will appear again in the
list and be modifiable in the previsualisation. I wonder if the invited pseudos
will be automatically added to one's contacts if they are not already there.
Maybe decide this in the user preferences.
The display
of forums is presently not very good: we should have the possiblity to display
how we want, either by chronological order or by tree order. The present way,
just displaying one message and its direct answers, is strange and I'm not sure
it's worth being kept as a possibility.
Also, it would be interesting to display, like in groups.google.com, both the
tree and the messages in frames.
When answering a message it should be possible to modify the title (because
always displaying the same title is boring).
And the accumulation of RE: RE: RE: is not very good.
Maybe just not put any RE: because we already know it's an answer, and repeat
the same title ? Maybe put another color according to whether the title is
different or not ?
Another thing will be how to delete messages or forums. I wrote something in
the page trustedforum.html but I'm not sure to do it exactly this way.
Now with in
the display of the tree of messages, the authors (pseudos) are not written
(they were recently deleted as they were not separated from the title and it
led to confusion). They should be added.
I'm having a look at groups.google.com as an example. There, only the names of
authors are written in the trees since the subject remains constant. I'm not
sure what is best to do. Maybe put links on names but include titles aside only
if they are different from the one of the message that is replied to. Or this
can be formalised as an empty title when it's not a new one.
1) Multi-language
(just make one language file then I can fill the English and French files, and
it's OK.
2) Invitations system and webmail
3) Automatic program installation
One should make an installation file for creating the new service, creating the
tables. This installation form should let the choice
whether the registering of new users will be public and by which URL it can be
accessed (so that the user registration will be reserved to the people that
know this URL), or if it is reserved to be made from an existing account. The
installation form web page should also present a user registration form, for
the registration of the admin.
4) Bookmarks, Inter-site authentication and PKI
This includes the possibility to be authentified reading forums hosted elsewhere,
so together with exchanging signal status of read or unread, it will mean a
web-based universal private communication system to replace email.
5) Personal Web pages
6) Events information (calendar)
7) Wiki (unless we skip it and let the wiki teams do this work themselves)
8) More tasks later...