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