enable 'usersnet' table with indexes and reading info from it
[brisk.git] / TODO.txt
1  TODO |
2 ------+
3
4   FEATURES |
5  ----------+
6    * Users Network construction
7      DONE - sql
8      - dbase API
9      - enhance info interface
10        . disable parts of interface
11      - minisplash at end of the match
12
13    * Double click on chat to open preferences
14
15    * APPRENTICE
16      Phase2
17      DONE - match counters (part 2)
18        DONE . migration script for old users
19      - guarantee for apprentice
20
21   BUGS |
22  ------+
23    - Global vars checker
24    - Remove books from chat
25    - Not triple chars between letters
26    - 10002 message when already clicked
27
28
29 ---------
30    - APPRENTICE
31      Phase2
32      DONE - match counters (part 2)
33        DONE . migration script for old users
34
35    - APPRENTICE
36      Phase1
37      DONE - correggere minuta giornaliera
38      DONE - aggiungere mask per autogar
39      DONE - correggere email per apprentice
40      DONE - verificare la variabile per tout IP ban apprentice
41      DONE - chat ban for apprentice
42
43      DONE - ip check and time limit
44        DONE . sql
45          DONE . temporary table limitation
46        DONE . message
47      DONE - usermgmt extension
48      DONE - add close button
49      DONE - add apprentice icon
50      DONE - match counters (part 1)
51        DONE . sql for match counters
52      DONE - new info system
53        DONE - click management
54        DONE - show user info (RO)
55          DONE - require command/info
56          DONE - fix fiverank table
57          DONE - fix bug with bitwise
58          DONE - fix layout of tables
59      DONE - aggiungere books.png
60
61     - MENTORS
62      - listen all
63
64    - BUDDY LIST
65      - white list
66      - black list
67      - delegate
68
69    - DEANONYMIZER
70       . study how to move login delta injection
71
72    - CERTIFICATIONS
73       DONE . Guarantes for certified-only (buttons choice managed)
74       DONE . Tables for certified-only
75       . Term Of Use
76       . Placing for certified-only
77
78    - IP CLASSES BAN
79       DONE . BAN and BLACK lists added
80       DONE . update method to SIGHUP manager
81       DONE . create constructor refactored
82
83    - PLACEMENT-NORMALIZATION
84       DONE . Normalize previous points
85       DONE . Denormalize "Info" view
86       DONE . Denormalize explained matches
87       DONE . Check placement
88       DONE . Distinguish between inherited mult and local mult
89
90    - AUTO-MAINTENANCE
91      DONE . Terms Of Service acceptance
92        DONE . print date of hard switch
93        DONE . TOS version
94        DONE . user TOS acceptance (db field)
95        DONE . show TOS ([show me later, yes, no]/[yes, no])
96        DONE . switch-off date
97        DONE . manage accept
98        DONE . manage refuse
99        DONE . show current TOS
100        DONE . disable user reason integer field and remove SUSPEND state (db, php)
101        DONE . fix tos layout
102        DONE . opt - download TOS
103        . opt - checkbox for anonimous users with message when not checked
104        . opt - button enabled when arrived to the bottom of the TOS only
105        . opt - check TOS version between config file and TOS file
106      DONE . show guarantee (/guar <login> command)
107        DONE . multi-language
108        DONE . command documentation
109        DONE . manage disagreeding users investigation
110        DONE . self guaranteed
111      . DONE New Users Guarantee Procedure
112        . DONE Change guarantee workflow
113        . DONE Db update
114
115          UserA                 UserB                      Admin
116 -------------------------------------------------------------------------
117       guarante UserB
118            |
119            v
120       Save on mail
121          table,
122       email to UserB
123     (Disabled, MAILED)
124 -------------------------------------------------------------------------
125                            Receive email
126                            to check address
127                                  |
128                                  v
129                            Click on link
130                                  |
131                                  v
132                            Check on mail
133                                table,
134                            update user status,
135                            delete mail rec
136                           (Disabled, TOBECHK)
137 -------------------------------------------------------------------------
138                                                        admin panel
139                                                        accept user
140                                                             |
141                                                             v
142                                                      send email with
143                                                      password,
144                                                      update user status
145                                                       (Normal, NONE)
146 -------------------------------------------------------------------------
147                            Receive email
148                            with password
149 -------------------------------------------------------------------------
150
151      DONE . More user info in the list
152      DONE . Manage date to display when a user was required
153      . Email-address expiration check
154      . Account expiration
155
156
157    DONE - CONTINUE FEATURE
158      DONE . replace explicit strings with multilanguage array
159      DONE . add a php downloader with filtering on allowed requests
160      DONE . save points every game
161      DONE . modify points calculation to include order and mazzo
162      DONE . exclude not standard types from statistics
163          DONE . daily reports (1 for each active tournament)
164          DONE . monthly stats (for normal match only)
165      DONE . show current match ID when created
166      DONE . add info about continue to the info page
167      DONE . add command to continue
168          DONE . check consistency of the request
169      DONE . rearrange users and game status to continue the selected match
170      DONE . investigate user reordering ??
171
172    - WEBSOCKET TRANSPORT
173      . refactoring $enc attribute management
174      DONE . reintroduced $enc = 'plain' for websocket
175      DONE . fallback for not correct WS version
176      DONE . fini of ws stream
177      DONE . reactivate compression
178      DONE . fix xynt_test01
179      DONE M2: brisk working
180      DONE . manage multiport apache config
181      DONE . manage headers correctly in sac-a-push
182      DONE . manage transport.close method where required
183      DONE . xynt_stream: manage fallback to multiple ports
184      DONE . manage fini for ws
185      POST . server: manage input data from clients
186      POST . manage ping/pong (seems not required)
187
188      DONE . client (xynt_streaming.js)
189      DONE . server (transport.phh)
190
191      DONE M1: xynt_test01.php working
192
193
194    - improved S
195      . db update (add components, maybe single string)
196      . filter in index.php
197      . filter in index_wr.php
198
199    - prefs API:
200      . prefs_assign(content): assign json content as output var
201      . prefs_apply(prefs_new): apply new content to g_prefs and system
202      . prefs_load(content): load json content and apply to g_prefs and system
203
204      . prefs_update: update preferences temporarly
205      . prefs_save: save to the server the new prefs
206
207    - preferences (listen into preferences)
208         // js var, volatile server, (db server || cookie)
209         temporary: js var, volatile server
210         permanent: js var, volatile server, (db server || cookie)
211
212      . data from db OR, if missing, from cookies
213
214      . update values
215      . database change
216      . MANAGE NOT AUTH USERS
217
218    - preferences (with "modifiable S")
219      . Mod. S: new flag into database
220      . graph infrastructure
221      . new box to edit color
222
223   MAJOR |
224  -------+
225    - BUG: some connection to the named socket fails
226    - Not simultaneous more then one stream
227
228
229   MINOR |
230  -------+
231    WIP - try to be more antivirus-friendly
232    - multiple rows between games
233    - packetize and automatize php-ancillary and apache module
234    - DISABLED_TO_FIX: DNS access (perform blocking dns requests, must be fixed)
235
236
237   DONE |
238  ------+
239    DONE - temporarly server hung not reflected on user timeouts
240    DONE - timeouted users are still be able to sit down (only the first at the table is banned)
241    DONE - page still opened after the server restart
242    DONE - log_legal address fix
243    DONE - manage too fast reload in xynt-streaming
244    DONE - add xhr as transport layer and manage different streams better
245    TEST - BUG: pari + 72 non fa 4x ma attualmente fa 3x, da correggere
246    TEST - BUG: lurker are logged out (and remain a pending socket opened (look the spush log)
247    DONE - save/restore database
248    DONE - into the room local step remains -1
249    DONE - centralize all '<script ...' incapsulation to allow multiple transport system.
250    DONE - BUG: access with password from 2 diff browsers the second go in strange "page not found" 
251           in the first tentative, the second works
252    DONE - BUG: access with password from 2 diff browsers place the first in a strict loop (the 
253           problem was a call to a static parent method instead of the overrided child method,
254           substitute self:: with the dynamically get class::)
255    DONE - garbage management
256
257    DONE/FROZEN - problem with getpeer (HOSTADDR)
258
259    DONE - slow cards distribution
260    DONE - substr to mb_substr
261    DONE - parametrizations:
262           . parametrization of $DOCUMENT_ROOT  var in brisk-spush.phh file
263           . parametrization of SITE_PREFIX(_LEN) define
264           . move the name of the named socket into the configuration file
265    DONE - manage and test cross forwarder between table and room
266    DONE - setcookie (for tables only and persist prefs)
267    DONE - images flickering on slow windows: try to poll stream every 300 ms (seems to be download problem)
268    DONE - database connection fails after a while, check close and try PGSQL_CONNECT_FORCE_NEW.
269    DONE - unneeded garbage_time.expired access
270    DONE - BUG: fast loop on stream index_rd_ifra page (js watchdog start without timeout corrupt counts)
271    DONE - BUG: logout failed (fixed with a garbage_collector wrapper at sac-a-push level
272    DONE - 404 wrong page management (remove directories redirections (es. brisk/))
273    DONE - configuration file management
274    DONE - app level keep-alive
275    DONE - index_wr other issues
276    DONE - from room to table
277    DONE - from table to room
278    DONE - chunked
279    DONE - bug: read from a not resource handle (already closed because a new socket substitute it)
280    DONE - partial write for normal page management
281    DONE - index_rd_ifra: last_clean issue
282    DONE - fwrite failed error management (select, buffer where store unsent data, and fwrite check and retry)
283    DONE - bug: after restart index_rd.php receive from prev clients a lot of req
284    DONE - index_wr.php::chat
285    DONE - index_wr.php::exit
286    DONE - index_rd.php porting
287    DONE - generic var management from internet
288    DONE - index.php auth part
289    ABRT - index_wr.php::reload - reload is js-only function
290    ABRT - keepalive management - not interesting for our purposes
291
292  BRISK4 (mammuth)
293  ======
294
295  - STEP MANAGEMENT VERIFY
296  Slim Paragraph
297  DONE - move the garbage timeout on file
298  DONE - in index_rd load all data only when required
299  - briskin5 alignment
300    DONE . extern del garb_timeout
301    DONE . user_load parameters verify
302    DONE . Bin5::load_data and Bin5::save_data refactoring with
303           data split
304    . move many function into "Bin5 class"
305  - garbaging of .step files
306
307  DB: - initial usage
308      DONE - configurabilitĂ  file o db
309      DONE - aggiornare le funz di gestione db in modo che prevedano anche il flag DISABLE
310      DONE - travasatore file to pg
311        DONE - travaso punteggi
312        DONE - memorizzazione nuovi i punteggi nel db
313        DONE - gestione classifiche in SQL
314          DONE - produrle
315          DONE - mostrarle
316
317      STEP 1.1
318        DONE - points archiver
319
320      STEP 1.2
321        DONE - partial usability if database go down.
322
323      STEP 1.5
324      - sistema di inserimento nuovi utenti (riversatore da form di inserimento)
325
326      STEP 2
327      - modifica password   
328      - ripristino password 
329
330      STEP 3
331      - comunicazioni di aggiornamento (stato salvato sul server) 
332
333  DONE - var $G_base aggiunta per gestire include in include da path differenti
334
335  BRISK3 (trusty)
336  ======
337   DONE - donameter
338     DONE - G_donors
339     DONE (WOW!) - js object with infos
340     DONE - main logic at login (cookie check in index_rd.php; show_message and createCookie via snippets with block
341            to prevent fast reload)
342     DONE - cookie per non assillare e visualizz.
343     DONE - graphical donameter
344     WIP content (in conf.)
345
346   DONE - numero di tavoli auth-only nel .brisk-install
347   - isolation
348     TEST - ricalcolo delle persone in piedi quando si cambia modalitĂ 
349     DONE - se si e' in isolation non si può cambiare nick perdendo l' auth
350     DONE - non leggere le chat di quelli non autenticati (in isolation)
351     DONE - regole per passare alla modalita' (in piedi o ai tavoli autenticati) 
352     DONE - treni non auth da nascondere 
353     DONE - verso gli altri ??: uguale a prima
354
355   finire multilingua (briskin5/index_wr.php e altri se ce ne sono)
356   coniglio
357   only auth strictly
358   placing limits to config file
359
360 Dunque, 
361
362 - come vengono aggiornate le classifiche: ogni giorno alle 23:58
363
364 - cosa cambia tra le tre coppie di classifiche: 
365   ci sono le classifiche dell' ultima settimana, quelle dell' ultimo mese,  e quelle dell' ultimo trimestre,
366   per ognuno di questi lassi di tempo poi c'è la classifica di chi ha giocato piĂą di TOT partite o meno di TOT partite, con TOT che cambia a seconda del lasso di tempo.
367
368 - come vengono calcolate le classifiche: per ogni utente vengono presi tutti i punti fatti ai tavoli con lucchetto nel lasso di tempo preso in considerazione (ultima settimana, ultimo mese o ultimo trimestre), sommati e divisi per il numero di partite fatte in quello stesso lasso di tempo per normalizzare i valori; poi siccome la gente quando vede 0.18734 sbarella ho deciso di moltiplicare il tutto per 100.
369
370 Un esempio per chiarire:
371
372   l'utente 'pippo' che Ă¨ nuovo gioca 4 partite nell'ultima settimana con i seguenti punteggi:
373     -2, 1, 2, 1
374   lo score viene { [ (-2) + (1) + (2) + (1) ] / 4 }  * 100 = 50.0
375   
376   a paritĂ  di score tra utenti va piĂą in alto chi ha giocato piĂą partite.
377
378 Se dopo quelle 4 partite 'pippo' non ne giocherĂ  piĂą, passata una settimana dall'ultima giocata 
379 sparirĂ  dalla classifica settimanale e rimarrĂ  in quelle mensili e trimestrali.
380
381
382   
383
384
385
386
387  BUG
388  ---
389  
390   DONE - paste da demauroparavia
391   DONE - recupero partita per re-login con password
392   DONE - problema "|" nei nomi (manca enhance degli script lato server)
393   - problema col treno se mouse sopra mentre stringe (verif)
394   
395  MINOR
396  -----
397
398  NORMAL
399  ------
400
401   - win test
402   WIP - /listen 
403     DONE - skin della textarea
404     DONE - set cookie 
405     DONE - init client (read from cookie) - ALWAYS BY SERVER
406     DONE - init server
407     DONE - after cookie check auth-only when no-auth case
408     DONE - aggiungi info accanto a "Chat"
409   DONE - /mesgtoadm
410   DONE - img dei comandi
411
412   DONE - form per garantire utenti (accoda in un file nel formato corretto)
413   DONE -   process request
414   DONE -   show form
415   DONE -   close butt
416   DONE -   submit form
417   DONE -   process form js side 
418   DONE -   process form
419   DONE -   documentazione in help
420
421   DONE - user status
422
423   DONE - aggiornare help
424   DONE -   overflow management
425   DONE -   for status
426   -   for password
427
428   DONE - reload home
429   - notify for long pages
430
431   - buddy list
432   - silenziastolti vari (fino al buddy import)
433   - restrict challenge per IP
434   - restricted charset for login
435   - watchdog
436
437   - db (minimal)
438     - db admin page
439     - user db admin
440     - use db 
441     - admin db
442
443     - studiare un anti-dos
444   - login modify
445  DONE  - db (fake)
446  DONE  - display auth
447     - manage preferences 
448
449  minor
450  -----
451    - auth after login
452
453 ----- done ------
454
455  BUG
456  ---
457   DONE   righe troncate
458   DONE - questione "a monte" che:
459   DONE   - lascia fuori il bottone
460   DONE   - scrive &agrave e compagnia
461   DONE - refresh act_table when unauthorized
462   DONE - problema ghost autenticato (ne prendi il posto ovunque sia)
463
464  MINOR
465  -----
466   DONE - refactoring of the owner name (auth attr for owner name)
467   DONE   - room
468   DONE     - at chat input line 
469   DONE     - in the chat output line
470   DONE     - deauth management
471   DONE - table
472   DONE   - at chat input line
473   DONE   - in the chat output line
474   DONE   - for user area of other users
475   DONE   - deauth management
476   DONE - alart to one user
477
478
479  NORMAL
480  ------
481   DONE - strong ban: "expire time|IP|session|(nick if authenticated)"
482   DONE   - login: se auth      -  verifica solo gli expire per quel nick
483   DONE   -        se non auth  -  verifica gli expire per IP e sessione
484   DONE   - riscrivere messaggi
485
486   DONE - login 
487   DONE   - se pass:
488   DONE     - richiede per l' utente un token (tutta la parte backend va un minimo studiata)
489   DONE     - lo legge, ci hasha la password
490   DONE     - invia la pass al server hashata
491   DONE   - se non pass:
492   DONE     - check del login e return corretto
493   DONE     - oggetto in shm single table con ( "ip", "login", timestamp ) e suo management
494   DONE     - rename ghost if logged
495   DONE     - onunload_cb e onbeforeunload_cb !!! 
496   DONE   - da change attrs a change class (input field)
497   DONE     - colore del bg per arrivare ad essere omogeneo
498   DONE     - cambiare path e file di config
499   DONE   - login with or without pass
500   DONE   - registered nick notice (METTERE IL MSG NELLA PAG DI LOGIN)
501   DONE     - segnalare tavoli solo per auth
502   DONE     - rename restriction at auth table
503   DONE     - change nick (strcasecmp)
504   DONE   - refact js tables to handle flags
505   DONE - room javascript refactoring
506
507   DONE - work background
508   DONE - reserved tables
509
510
511  BRISK2 (spawn)
512  ======
513
514    
515    URGENT - tables spawn
516             DONE - link with photos
517             DONE - top banner in Etc file
518             DONE - spawn of a table
519             DONE - data to cookies (removed table_idx from xhr calls also)
520             DONE - set subst to shutdowner/shutdowned
521             DONE - return to index.php
522             DONE - game's token
523             DONE - recover of corrupted table data
524             DONE - closure of a table
525             DONE - flush of the table
526             DONE - security checks for right scope access
527             DONE - garbage collector management
528             DONE -    recursive garbage - howto ?
529             DONE - stat & subst in browser
530             DONE - laccwr setting and exit if all players are unactive for some time
531             DONE - the list of test case
532             DONE - shm dimension
533             DONE - remove unused parts
534             DONE - move images
535             DONE - optimizations
536             DONE - cambiare titolo al tavolo
537             DONE - shutdowning lock tables
538             DONE - topbanner
539             DONE - public announcements
540             DONE - 10 sec to exit from table
541
542             FAR - inheritances
543    
544    TRAIN  -  DONE - add again in reload   
545              DONE - wag_set refact
546              DONE - filtra char speciali per title
547              DONE - chatt_send refact 
548              DONE - elenco dei giocatori
549              DONE - documentazione online
550              DONE - timeout management     
551              LATER - border color a muzzo
552        
553    NORM   - testament
554    NORM   - public announcements
555    NORM   - 10 sec to exit from table
556    NORM   - moving label for tables click
557
558 ----------------- join -----------------
559    NORM   - map
560
561    NORM   - restart preload img
562    NORM   - tools dir with a main and some pages where check briscola tools.
563    NORM   - watchdog
564
565    NORM   - chat vecchie in reload (forse)
566
567  MIDDLE TODO
568  ===========
569
570    - user assistant (with button to enable disable)
571    - documentation
572
573
574  FAR TODO
575  ========
576    NORM - internationalization
577    NORM - img -> div + css
578    
579  WEB
580  ===
581
582    - link to stable/unstable
583
584 -------------------------------------------------------------------
585  DONE
586  ====
587
588    ABORTED - asta: highlight buttons (css hover) - change pointer when over
589    DONE - step proxy
590    DONE - special chars in js
591    DONE - ban temporaneo dai tavoli
592    DONE - flash player to play sound
593    DONEBUG - (aum. il timeout) - carte giocate che restano girate
594          Sembra non migliorare di molto la cosa, gestita la cache
595          correttamente, sono apposto.
596
597    DONE - one player reject a game, to less points (<= 2)
598    DONE - help page
599    DONE - test di download per la cache
600    DONE - se passano tutti tranne l'ultimo l'asta va al penultimo.
601           Corretto il codice, occorre verificare se questo
602           ingenera qualche problema.
603    DONE - raddoppiato il numero di righe nella chat
604    DONE - corretto bug del /nick
605    DONE - carosello pubblicitĂ  altout
606    DONE - smammamorti
607    DONE - unload of the stream
608    DONE - standup centrati
609    DONE - current player - in info
610    DONE - HELP butt con ABOUT, REGOLE, VERSIONE
611    DONE - welcome lines in the chats (room and table)
612    DONE - welcome lines in the chats (room and table)
613    DONE - nomi in primo piano se vai sul quadrato   
614    DONE - to pass explicit config file to INSTALL.sh
615    DONE - flag to create a config file
616    ABRT - bottoni => immagini
617    DONE - aggiungere bottone al login
618    DONE - nomi in primo piano se vai sul quadrato   
619    DONE - installer to set cookie path
620    DONE - change name
621    DONE - automatic and manual logout
622    DONE - cache problems solved via .htaccess
623    DONE - all players out of the auction
624    DONE - time to send cards
625    DONE - hide cards before sends at a new game
626    DONE - well recognization of the browser and O.S.
627    DONE - login consistency !!!!
628    DONE - functionalization of garbage
629    DONE - call garbage function into login
630    DONE - game
631    DONE - manage the reload from scratch of the table page
632    DONE - table reset
633    DONE - sendcard => card_send(idx, ....)
634    DONE - show table for game
635    DONE - points calculation
636    DONE - make-up of the chooser
637    DONE - where place the briscola on the table
638    DONE - users info
639    DONE - show current auction position
640    DONE - table with internal management of the transition between pages.
641    DONE - server side page abort management  
642    DONE - cookie problem with Ajax
643    DONE - spostare il tasto "esco"
644    DONE - to pass explicit config file to INSTALL.sh 
645    DONE - 8 tables
646    DONE - safety out management
647    DONE - info enhancement and related button (how win the last game and
648           with how much points ?)
649
650  WEB
651    DONE - homepage
652    DONE - screenshots
653
654 DOC
655    CHAPTERS
656       HTTP Streaming
657       Local serializer
658       Database on shmem
659       Page abort (reload on http streaming case)
660       Chat
661       Cookies management
662       CSS tricks
663
664 CHECK ON NEW SERVERS
665 .htaccess AllowOverwrite mode for Cache-Control directive
666
667
668
669
670 */
671