|
|
(63 révisions intermédiaires par 3 utilisateurs non affichées) |
Ligne 1 : |
Ligne 1 : |
| == Objectif == | | == Objectif == |
| * Basculer le forum vers phpbb 3.2 | | * Basculer le forum vers phpbb 3.2 |
| + | * Ancien forum (à peu près) : https://github.com/Conardo/wefrag |
| | | |
− | == Procédure == | + | == Architecture applicative == |
− | === Analyse ===
| + | * phpbb 3.2 |
− | * Récupérer [http://nofrag.com/temporary/dumpforum.sql le dump du forum]. | + | * Plug-in de tribune : https://www.phpbb.com/customise/db/extension/ajax_shoutbox/ |
− | * Installer un xampp ou équivalent
| |
− | * Installer phpbb sur son poste
| |
− | * Utiliser DBeaver ou tout autre autre outil équivalent pour comparer les tables phpbb avec celles du forum (travail manuel)
| |
− | === Transposition ===
| |
− | * Définir l'ordre de traitement des tables
| |
− | users_groups => users => user_group
| |
− | categories => forums => topics => posts => forums_tracks (à consolider)
| |
− | manuellement : acl des groupes
| |
− | | |
− | * Produire une procédure par table
| |
− | | |
− | == Liste des tables ==
| |
− | === Table phpbb_users ===
| |
− | Voir pour utiliser [https://wiki.phpbb.com/Add_users l'API add_users]
| |
− |
| |
− | * user_id (int(10) unsigned) => wefrag_users.id(int(11)) | |
− | * user_type(tinyint(2)) => 0
| |
− | 0 pour tous les inscrits admins compris
| |
− | 1 quand pas encore activé
| |
− | 2 pour ignorer l'utilisateur (?) ex. bot
| |
− | 3 pour les "Founders" : sorte de super-admin en god mode
| |
− | Voir https://wiki.phpbb.com/Table.phpbb_users
| |
− | * group_id(mediumint(8) unsigned) => phpbb_groups.group_id
| |
− | * user_permission(mediumtext) => ''vide''
| |
− | * user_perm_from(mediumint(8) unsigned) => 0
| |
− | * user_ip(varchar(40)) => ''vide''
| |
− | * user_regdate(int(11) unsigned) => ''vide''
| |
− | * username(varchar(255)) => wefrag_users.login(varchar(255))
| |
− | * username_clean(varchar(255)) => wefrag_users.login(varchar(255))
| |
− | * user_password(varchar(255)) => wefrag_users.crypted_password(varchar(40))
| |
− | Phpbb :[https://wiki.phpbb.com/Function.phpbb_check_hash techno proprio]?
| |
− | Wefrag : [https://github.com/Conardo/wefrag/blob/master/app/models/user.rb sha1 ? voir ligne 220]
| |
− | * user_passch (int(11) unsigned) => '''wefrag_user_password_resets.?'''
| |
− | ''pas forcément nécessaire''
| |
− | * user_email(varchar(100)) => wefrag_users.email(varchar(255))
| |
− | vérifier longueur max en table
| |
− | * user_email_hash(bigint(20)) =>
| |
− | d'après [https://www.phpbb.com/community/viewtopic.php?f=71&t=570125 ce lien] : crc32(strtolower($user_email)) . strlen($user_email),
| |
− | '''à tester'''
| |
− | * user_birthday(varchar(10)) => wefrag_users.birthdate(date)
| |
− | * user_lastvisit(int(11) unsigned) => 0
| |
− | * user_lastmark(int(11) unsigned) => 0
| |
− | * user_lastpost_time(int(11) unsigned) =>
| |
− | Récupérer la date du dernier post.
| |
− | * user_lastpage(varchar(200)) => ''vide''
| |
− | * user_last_confirm_key(varchar(10)) => ''vide''
| |
− | * user_last_search(int(11) unsigned) => ''0''
| |
− | * user_warnings(tinyint(4)) => ''0''
| |
− | * user_last_warning(int(11) unsigned) => ''0''
| |
− | * user_login_attempts(tinyint(4)) => ''0''
| |
− | * user_inactive_reason(tinyint(2)) => ''0''
| |
− | * user_inactive_time(int(11) unsigned) => ''0''
| |
− | * user_posts(mediumint(8) unsigned) =>
| |
− | Alimenter le nombre de posts
| |
− | * user_lang(varchar(30)) => ''fr''
| |
− | * user_timezone(varchar(100)) => ''vide''
| |
− | * user_dateformat(varchar(64)) => ''D j M Y H:i''
| |
− | * user_style(mediumint(8) unsigned) => ''0''
| |
− | * user_rank(mediumint(8) unsigned) => ''0''
| |
− | * user_colour(varchar(6)) => ''vide''
| |
− | * user_new_privmsg(int(4)) => ''0''
| |
− | * user_unread_privmsg(int(4)) => ''0''
| |
− | * user_last_privmsg(int(11) unsigned) => ''0''
| |
− | * user_message_rules(tinyint(1) unsigned)=> ''0''
| |
− | * user_full_folder(int(11))=> ''-3''
| |
− | * user_emailtime(int(11) unsigned)=> ''0''
| |
− | * user_topic_show_days(smallint(4) unsigned) => ''0''
| |
− | * user_topic_sortby_type(varchar(1)) => '''t'''
| |
− | * user_topic_sortby_dir (varchar(1)) => '''d'''
| |
− | * user_post_show_days (smallint(4) unsigned) => ''0''
| |
− | * user_post_sortby_type(varchar(1)) => '''t'''
| |
− | * user_post_sortby_dir (varchar(1)) => '''a'''
| |
− | * user_notify (tinyint(1) unsigned) => ''0''
| |
− | * user_notify_pm (tinyint(1) unsigned) => ''1''
| |
− | * user_notify_type (tinyint(4))=> ''0''
| |
− | * user_allow_pm(tinyint(1) unsigned) => ''1''
| |
− | * user_allow_viewonline(tinyint(1) unsigned) => ''1''
| |
− | * user_allow_viewemail(tinyint(1) unsigned) => ''1''
| |
− | * user_allow_massemail(tinyint(1) unsigned) => ''1''
| |
− | * user_options( int(11) UNSIGNED) => ''230271''
| |
− | * user_avatar (varchar(255)) => ''vide''
| |
− | * user_avatar_type (varchar(255)) => ''vide''
| |
− | * user_avatar_width (smallint(4) unsigned) => ''0''
| |
− | * user_avatar_height (smallint(4) unsigned) => ''0''
| |
− | * user_sig (mediumtext) => ''vide''
| |
− | * user_sig_bbcode_uid (varchar(8)) => ''vide''
| |
− | * user_sig_bbcode_bitfield (varchar(255)) => ''vide''
| |
− | * user_jabber (varchar(255)) => ''vide''
| |
− | * user_actkey (varchar(32)) => ''vide''
| |
− | * user_newpasswd (varchar(255)) => ''vide''
| |
− | * user_form_salt (varchar(32)) => '''''????'''''
| |
− | * user_new (tinyint(1)) => ''1''
| |
− | * user_reminded (tinyint(4)) => ''0''
| |
− | * user_reminded_time (int(11) UNSIGNED) => ''0''
| |
− | | |
− | === phpbb_forums ===
| |
− | Cette entité contient les catégories (wefrag_categories)et les forums (wefrag_forums). Il faut donc prévoir un premier passage pour les catégories et un second pour les forums, et une renumérotation des catégories avec création d'une table de correspondance.
| |
− | | |
− | ==== Catégories ====
| |
− | * forum_id (mediumint(8) unsigned) => wefrag_categories.id (table de correspondance)
| |
− | * parent_id (mediumint(8) unsigned) => ''0''
| |
− | * left_id (mediumint(8) unsigned) => ''????''
| |
− | * right_id (mediumint(8) unsigned) => ''????''
| |
− | * forum_parents (mediumtext) => ''vide''
| |
− | * forum_name (varchar(255)) => wefrag_categories.title (varchar(255))
| |
− | * forum_desc (text) => ''vide''
| |
− | * forum_desc_bitfield (varchar(255)) => ''vide''
| |
− | * forum_desc_options (int(11) unsigned) => ''7''
| |
− | * forum_desc_uid (varchar(8)) => ''vide''
| |
− | * forum_link (varchar(255)) => ''vide''
| |
− | * forum_password (varchar(255)) => ''vide''
| |
− | * forum_style (mediumint(8) unsigned) => ''0''
| |
− | * forum_image (varchar(255)) => ''vide''
| |
− | * forum_rules (text) => ''vide''
| |
− | * forum_rules_link (varchar(255)) => ''vide''
| |
− | * forum_rules_bitfield (varchar(255)) => ''vide''
| |
− | * forum_rules_options (int(11) unsigned) => ''7''
| |
− | * forum_rules_uid (varchar(8)) => ''vide''
| |
− | * forum_topics_per_page (tinyint(4)) => ''0''
| |
− | * forum_type (tinyint(4)) => ''0''
| |
− | * forum_status (tinyint(4)) => ''0''
| |
− | * forum_last_post_id (int(10) unsigned) => ''à mettre à jour avec l'identifiant du dernier post de la catégorie''
| |
− | * forum_last_poster_id (int(10) unsigned) => ''à mettre à jour avec l'identifiant du poster du dernier post de la catégorie''
| |
− | * forum_last_post_subject (varchar(255)) => ''à mettre à jour avec le sujet du dernier post de la catégorie''
| |
− | * forum_last_post_time (int(11) unsigned ) => ''à mettre à jour avec le datetime du dernier post de la catégorie''
| |
− | * forum_last_poster_name(varchar(255)) => ''à mettre à jour avec le login du poster du dernier post de la catégorie''
| |
− | * forum_last_poster_colour(varchar(6)) => ''à mettre à jour avec la couleur du poster du dernier post de la catégorie''
| |
− | * forum_flags (tinyint(4)) => ''32''
| |
− | * display_on_index (tinyint(1) unsigned) => ''1''
| |
− | * enable_indexing (tinyint(1) unsigned ) => ''1''
| |
− | * enable_icons(tinyint(1) unsigned ) => ''1''
| |
− | * enable_prune(tinyint(1) unsigned ) => ''0''
| |
− | * prune_next (int(11) unsigned)=> ''0''
| |
− | * prune_days (mediumint(8) unsigned)=> ''0''
| |
− | * prune_viewed(mediumint(8) unsigned)=> ''0''
| |
− | * prune_freq(mediumint(8) unsigned)=> ''0''
| |
− | * display_subforum_list (tinyint(1) unsigned)=> ''1''
| |
− | * forum_options(int(20) unsigned)=> ''0''
| |
− | * forum_posts_approved (mediumint(8) unsigned)=> ''0''
| |
− | * forum_posts_unapproved (mediumint(8) unsigned)=> ''0''
| |
− | * forum_posts_softdeleted (mediumint(8) unsigned)=> ''0''
| |
− | * forum_topics_approved (mediumint(8) unsigned)=> ''0''
| |
− | * forum_topics_unapproved (mediumint(8) unsigned)=> ''0''
| |
− | * forum_topics_softdeleted (mediumint(8) unsigned)=> ''0''
| |
− | * enable_shadow_prune (tinyint(1) unsigned) => ''0''
| |
− | * prune_shadow_days (mediumint(8) unsigned)=> ''7''
| |
− | * prune_shadow_freq (mediumint(8) unsigned)=> ''1''
| |
− | * prune_shadow_next int(11) => ''0''
| |
− | | |
− | | |
− | ==== Forums ====
| |
− | * forum_id (mediumint(8) unsigned) => wefrag_forums.id (int(11))
| |
− | * parent_id (mediumint(8) unsigned) => wefrag_forums.category_id (table de correspondance)
| |
− | * left_id (mediumint(8) unsigned) => ''????''
| |
− | * right_id (mediumint(8) unsigned) => ''????''
| |
− | * forum_parents (mediumtext) => ''vide''
| |
− | * forum_name (varchar(255)) => wefrag_forums.title (varchar(255))
| |
− | * forum_desc (text) => wefrag_forums.description (text)
| |
− | * forum_desc_bitfield (varchar(255)) => ''vide''
| |
− | * forum_desc_options (int(11) unsigned) => ''7''
| |
− | * forum_desc_uid (varchar(8)) => ''vide''
| |
− | * forum_link (varchar(255)) => ''vide''
| |
− | * forum_password (varchar(255)) => ''vide''
| |
− | * forum_style (mediumint(8) unsigned) => ''0''
| |
− | * forum_image (varchar(255)) => ''vide''
| |
− | * forum_rules (text) => ''vide''
| |
− | * forum_rules_link (varchar(255)) => ''vide''
| |
− | * forum_rules_bitfield (varchar(255)) => ''vide''
| |
− | * forum_rules_options (int(11) unsigned) => ''7''
| |
− | * forum_rules_uid (varchar(8)) => ''vide''
| |
− | * forum_topics_per_page (tinyint(4)) => ''0''
| |
− | * forum_type (tinyint(4)) => ''1''
| |
− | * forum_status (tinyint(4)) => ''0''
| |
− | * forum_last_post_id (int(10) unsigned) => ''à mettre à jour avec l'identifiant du dernier post du forum''
| |
− | * forum_last_poster_id (int(10) unsigned) => ''à mettre à jour avec l'identifiant du poster du dernier post du forum''
| |
− | * forum_last_post_subject (varchar(255)) => ''à mettre à jour avec le sujet du dernier post du forum''
| |
− | * forum_last_post_time (int(11) unsigned ) => ''à mettre à jour avec le datetime du dernier post du forum''
| |
− | * forum_last_poster_name(varchar(255)) => ''à mettre à jour avec le login du poster du dernier post du forum''
| |
− | * forum_last_poster_colour(varchar(6)) => ''à mettre à jour avec la couleur du poster du dernier post du forum''
| |
− | * forum_flags (tinyint(4)) => ''48''
| |
− | * display_on_index (tinyint(1) unsigned) => ''1''
| |
− | * enable_indexing (tinyint(1) unsigned ) => ''1''
| |
− | * enable_icons(tinyint(1) unsigned ) => ''1''
| |
− | * enable_prune(tinyint(1) unsigned ) => ''0''
| |
− | * prune_next (int(11) unsigned)=> ''0''
| |
− | * prune_days (mediumint(8) unsigned)=> ''0''
| |
− | * prune_viewed(mediumint(8) unsigned)=> ''0''
| |
− | * prune_freq(mediumint(8) unsigned)=> ''0''
| |
− | * display_subforum_list (tinyint(1) unsigned)=> ''1''
| |
− | * forum_options(int(20) unsigned)=> ''0''
| |
− | * forum_posts_approved (mediumint(8) unsigned)=> ''1''
| |
− | * forum_posts_unapproved (mediumint(8) unsigned)=> ''0''
| |
− | * forum_posts_softdeleted (mediumint(8) unsigned)=> ''0''
| |
− | * forum_topics_approved (mediumint(8) unsigned)=> ''1''
| |
− | * forum_topics_unapproved (mediumint(8) unsigned)=> ''0''
| |
− | * forum_topics_softdeleted (mediumint(8) unsigned)=> ''0''
| |
− | * enable_shadow_prune (tinyint(1) unsigned) => ''0''
| |
− | * prune_shadow_days (mediumint(8) unsigned)=> ''7''
| |
− | * prune_shadow_freq (mediumint(8) unsigned)=> ''1''
| |
− | * prune_shadow_next int(11) => ''0''
| |
− | | |
− | === phpbb_topics ===
| |
− | Traitement de toutes les lignes de wefrag_posts qui ont une donnée topic_id non significative.
| |
− | * topic_id (int(10) unsigned) => wefrag_posts.id (int(11))
| |
− | * forum_id (mediumint(8) unsigned) => wefrag_posts.forum_id (int(11))
| |
− | * icon_id (mediumint(8) unsigned) => ''0''
| |
− | * topic_attachment (tinyint(1) unsigned) => ''0''
| |
− | * topic_reported (tinyint(1) unsigned) => ''0''
| |
− | * topic_title (varchar(255)) => wefrag_posts.title
| |
− | * topic_poster (int(10) unsigned) => wefrag_posts.user_id (int(11))
| |
− | * topic_time (int(11) unsigned) => wefrag_posts.created_at(datetime)
| |
− | * topic_time_limit (int(11) unsigned) => ''0''
| |
− | * topic_views (mediumint(8) unsigned) => ''0''
| |
− | * topic_status (tinyint(3)) =>
| |
− | à étudier en fonction du statut locké ou pas
| |
− | * topic_type (tinyint(3)) => ''0''
| |
− | * topic_first_post_id (int(10) unsigned) =>
| |
− | étudier la nécessité d'insérer le premier post pour avoir une valeur ici
| |
− | * topic_first_poster_name (varchar(255)) =>
| |
− | récupérer le login du poster (wefrag_posts.user_id)
| |
− | * topic_first_poster_colour
| |
− | récupérer la couleur du poster (wefrag_posts.user_id)
| |
− | * topic_last_post_id
| |
− | mettre à jour lors du traitement des posts
| |
− | * topic_last_poster_id
| |
− | mettre à jour lors du traitement des posts
| |
− | * topic_last_poster_name
| |
− | mettre à jour lors du traitement des posts
| |
− | * topic_last_poster_colour
| |
− | mettre à jour lors du traitement des posts
| |
− | * topic_last_post_subject
| |
− | mettre à jour lors du traitement des posts
| |
− | * topic_last_post_time
| |
− | mettre à jour lors du traitement des posts
| |
− | * topic_last_view_time => mettre la même valeur que topic_last_post_time
| |
− | * topic_moved_id (int(10) unsigned) => ''0''
| |
− | * topic_bumped(tinyint(1) unsigned) => ''0''
| |
− | * topic_bumper(mediumint(8) unsigned) => ''0''
| |
− | * poll_title (varchar(255)) => ''vide''
| |
− | * poll_start (int(11) unsigned) => ''0''
| |
− | * poll_length (int(11) unsigned) => ''0''
| |
− | * poll_max_options (tinyint(4)) => ''1''
| |
− | * poll_last_vote (int(11) unsigned) => ''0''
| |
− | * poll_vote_change (tinyint(1)) => ''0''
| |
− | * topic_visibility (tinyint(3)) => ''1''
| |
− | * topic_delete_time (int(11) unsigned) => ''0''
| |
− | * topic_delete_reason (varchar(255)) => ''vide''
| |
− | * topic_delete_user (int(10) unsigned) => ''0''
| |
− | * topic_posts_approved (mediumint(8) unsigned) => ''1''
| |
− | * topic_posts_unapproved (mediumint(8) unsigned) => ''0''
| |
− | * topic_posts_softdeleted (mediumint(8) unsigned) => ''0''
| |
− | | |
− | === phpbb_posts ===
| |
− | Traitement de toutes les lignes de wefrag_posts.
| |
− | | |
− | à étudier : utilisation de la fonction php [https://wiki.phpbb.com/Function.submit_post submit_post]
| |
− | | |
− | * post_id (int(10) unsigned) => wefrag_posts.id (int(11))
| |
− | * topic_id (int(10) unsigned) => wefrag_posts.topic_id (int(11))
| |
− | * forum_id (mediumint(8) unsigned) => wefrag_posts.forum_id (int(11))
| |
− | * poster_id (int(10) unsigned) => wefrag_posts.user_id (int(11))
| |
− | * icon_id (mediumint(8) unsigned) => ''0''
| |
− | * poster_ip (varchar(40)) => wefrag_posts.poster_ip_address(varchar(255))
| |
− | * post_time (int(11) unsigned) => wefrag_posts.created_at(datetime)
| |
− | * post_reported (tinyint(1) unsigned) => ''0''
| |
− | * enable_bbcode (tinyint(1) unsigned) => ''1''
| |
− | * enable_smilies (tinyint(1) unsigned) => ''0''
| |
− | * enable_magic_url (tinyint(1) unsigned) => ''1''
| |
− | * enable_sig (tinyint(1) unsigned) => ''0''
| |
− | * post_username (varchar(255)) => ''vide''
| |
− | * post_subject (varchar(255)) => wefrag_posts.title (varchar(255))
| |
− | * post_text (mediumtext) => wefrag_posts.body (text)
| |
− | * post_checksum (varchar(32)) =>
| |
− | md5 mais de quoi ?
| |
− | * post_attachment (tinyint(1) unsigned) => ''0''
| |
− | * bbcode_bitfield (varchar(255)) => ''vide''
| |
− | * bbcode_uid (varchar(8)) => ''vide''
| |
− | * post_postcount (tinyint(1) unsigned) =>
| |
− | vérifier si ce compteur varie…
| |
− | * post_edit_time (int(11) unsigned) => ''0''
| |
− | * post_edit_reason (varchar(255)) => ''vide''
| |
− | * post_edit_user (int(10) unsigned) => ''0''
| |
− | * post_edit_count (smallint(4) unsigned ) => ''0''
| |
− | * post_edit_locked (tinyint(1) unsigned) => ''0''
| |
− | * post_visibility (tinyint(3)) => ''1''
| |
− | * post_delete_time (int(11) unsigned) => ''0''
| |
− | * post_delete_reason (varchar(255)) => ''vide''
| |
− | * post_delete_user(int(10) unsigned) => ''0''
| |
− | | |
− | === phpbb_groups ===
| |
− | Utilisation de la table wefrag_groups.
| |
− |
| |
− | Nécessaire ?
| |
− | | |
− | * group_id
| |
− | * group_type
| |
− | * group_founder_manage
| |
− | * group_skip_auth
| |
− | * group_name
| |
− | * group_desc
| |
− | * group_desc_bitfield
| |
− | * group_desc_options
| |
− | * group_desc_uid
| |
− | * group_display
| |
− | * group_avatar
| |
− | * group_avatar_type
| |
− | * group_avatar_width
| |
− | * group_avatar_height
| |
− | * group_rank
| |
− | * group_colour
| |
− | * group_sig_chars
| |
− | * group_receive_pm
| |
− | * group_message_limit
| |
− | * group_legend
| |
− | * group_max_recipients
| |
− | | |
− | === phpbb_user_group ===
| |
− | Utilisation de la table wefrag_users pour récupérer le groupe
| |
− | | |
− | * group_id (mediumint(8) unsigned) => wefrag_users.group_id(int(11))
| |
− | * user_id (int(10) unsigned) => wefrag_users.id(int(11))
| |
− | * group_leader (tinyint(1) unsigned) => ''0''
| |
− | * user_pending (tinyint(1) unsigned) => ''0''
| |
− | | |
− | === phpbb_topics_posted ===
| |
− | === phpbb_forums_track ===
| |
− | === phpbb_topics_posted ===
| |