Студия креативных разработок DevArt.PRO.
Разработка сайтов и форумов под ключ!
Сильнейшая команда в России по vBulletin - читать подробнее...
 
 
 
 

 
 
Здесь скоро опять что то будет...
 
 
 
 
 
 
Loading

Вернуться   форум vBSupport.org > vBulletin > ImpEx (Вопросы по конвертации)

Объявления
  • Изменения в правах
  • Каталог Фрилансеров
  • Добро пожаловать!
  • Premoderation
  • Новичкам!
  • For English speaking users
Ответ
 
Опции темы Опции просмотра
Старый 22.06.2011, 00:03   #1
Продвинутый
IP.Board 3.14 -> vB 4.1.4. Как настроить, чтобы id в vB совпадали с id в IP.Board?

Здравствуйте.
Сейчас готовлю перенести свой форум на IP.Board 3.1.4 на vBulletin 4.1.4.
Предыстория переноса.
На IP.Board столкнулся с проблемой, когда из-за очень большого количества форумов (у меня их более 4000) очень сильно начинает тормозить время генерации страницы (с 0.05 сек до 1.3 сек). Происходит из-за специфики запросов. Переделать - практически нереально. В службе поддержки IP.Board это подтвердили.
Также на форуме очень большое количество аттачментов (более 500 000). Все они ВСТАВЛЕНЫ в текст сообщения и имеют вид в тексте сообщения[attachment=attach_id:attach_file] (т.е. из БД тут 2 поля: 'attach_id' и 'attach_file').
В vB аттачменты в сообщении имеют вид [ATTACH=CONFIG]attachmentid[/ATTACH] (т.е. из БД тут 1 поле 'attachmentid').
При конвертации сопоставление id аттачментов идёт строго только по сообщения, к которому они относятся, но сопоставления id аттачментов у донора и акцептора не идёт.
В результате не получается заменить регулярным выражение контрукции, чтобы аттачменты стали бы вставлены в темы.
Что нужно? Нужно, чтобы id аттачментов строго сопоставлялись и соответствовали id аналогичных аттачментов у IP.Board.
Также почти аналогичный вопрос с id тем, форумов т.к. темы ссылаются друг на друга и при конвертации невозможно будет по внутренним ссылкам перейти на нужную темы.
Пояснение относительно такой структуры: на форуме организована электронная библиотека и, например, темы с книгами ссылаются на тему с биографией автора.
Помогите, пожалуйста, разобраться с ситуацией.
В ImpEx'e файлы с запросами прилагаются.
Версия ImpEx - 1.101.
Заранее огромнейшее спасибо.
С уважением.
Вложения
Тип файла: php ImpExDatabase_400.php (7.6 Кб, 2 просмотров)
Тип файла: php 011.php (10.4 Кб, 1 просмотров)
  Ответить с цитированием
Рекламка
Реклама на форуме
Старый 30.03.2012, 14:17   #2
avgaz
Простоузер
С атчами не сталкивался но вот id тем и юзеров не так сложно сделать для примера
имеем сохраниение
PHP код:
                $sql "
                    INSERT INTO    " 
$tableprefix "user
                    (
                        username, email, usergroupid,
                        importuserid, password, salt,
                        passworddate, options, homepage,
                        posts, joindate, icq,
                        daysprune, aim, membergroupids,
                        displaygroupid, styleid, parentemail,
                        yahoo, showvbcode, usertitle,
                        customtitle, lastvisit, lastactivity,
                        lastpost, reputation, reputationlevelid,
                        timezoneoffset, pmpopup, avatarid,
                        avatarrevision, birthday, birthday_search, maxposts,
                        startofweek, ipaddress, referrerid,
                        languageid, msn, emailstamp,
                        threadedmode, pmtotal, pmunread,
                        autosubscribe, profilepicrevision
                    )
                    VALUES
                    (
                        '" 
addslashes(htmlspecialchars($this->get_value('mandatory''username'))) . "',
                        '" 
addslashes($this->get_value('mandatory''email')) . "',
                        '" 
$this->get_value('mandatory''usergroupid') . "',
                        '" 
$this->get_value('mandatory''importuserid') . "',
                        '" 
$newpassword "',
                        '" 
addslashes($salt) . "',
                        NOW(),
                        '" 
$this->get_value('nonmandatory''options') . "',
                        '" 
addslashes($this->get_value('nonmandatory''homepage')) . "',
                        '" 
$this->get_value('nonmandatory''posts') . "',
                        '" 
$this->get_value('nonmandatory''joindate') . "',
                        '" 
addslashes($this->get_value('nonmandatory''icq')) . "',
                        '" 
$this->get_value('nonmandatory''daysprune') . "',
                        '" 
addslashes($this->get_value('nonmandatory''aim')) . "',
                        '" 
$this->get_value('nonmandatory''membergroupids') . "',
                        '" 
$this->get_value('nonmandatory''displaygroupid') . "',
                        '" 
$this->get_value('nonmandatory''styleid') . "',
                        '" 
$this->get_value('nonmandatory''parentemail') . "',
                        '" 
addslashes($this->get_value('nonmandatory''yahoo')) . "',
                        '" 
$this->get_value('nonmandatory''showvbcode') . "',
                        '" 
addslashes($this->get_value('nonmandatory''usertitle')) . "',
                        " 
intval($this->get_value('nonmandatory''customtitle')) . ",
                        '" 
$this->get_value('nonmandatory''lastvisit') . "',
                        '" 
$this->get_value('nonmandatory''lastactivity') . "',
                        '" 
$this->get_value('nonmandatory''lastpost') . "',
                        '" 
$this->get_value('nonmandatory''reputation') . "',
                        '" 
$this->get_value('nonmandatory''reputationlevelid') . "',
                        '" 
$this->get_value('nonmandatory''timezoneoffset') . "',
                        '" 
$this->get_value('nonmandatory''pmpopup') . "',
                        '" 
$this->get_value('nonmandatory''avatarid') . "',
                        '" 
$this->get_value('nonmandatory''avatarrevision') . "',
                        '" 
$this->get_value('nonmandatory''birthday') . "',
                        '" 
$this->get_value('nonmandatory''birthday_search') . "',
                        '" 
$this->get_value('nonmandatory''maxposts') . "',
                        '" 
$this->get_value('nonmandatory''startofweek') . "',
                        '" 
$this->get_value('nonmandatory''ipaddress') . "',
                        '" 
$this->get_value('nonmandatory''referrerid') . "',
                        '" 
$this->get_value('nonmandatory''languageid') . "',
                        '" 
addslashes($this->get_value('nonmandatory''msn')) . "',
                        '" 
addslashes($this->get_value('nonmandatory''emailstamp')) . "',
                        '" 
$this->get_value('nonmandatory''threadedmode') . "',
                        '" 
$this->get_value('nonmandatory''pmtotal') . "',
                        '" 
$this->get_value('nonmandatory''pmunread') . "',
                        '" 
$this->get_value('nonmandatory''autosubscribe') . "',
                        '" 
$this->get_value('nonmandatory''profilepicrevision') . "'
                    )
                "

Нужно изменить на
PHP код:
                $sql "
                    INSERT INTO    " 
$tableprefix "user
                    (
                        userid,username, email, usergroupid,
                        importuserid, password, salt,
                        passworddate, options, homepage,
                        posts, joindate, icq,
                        daysprune, aim, membergroupids,
                        displaygroupid, styleid, parentemail,
                        yahoo, showvbcode, usertitle,
                        customtitle, lastvisit, lastactivity,
                        lastpost, reputation, reputationlevelid,
                        timezoneoffset, pmpopup, avatarid,
                        avatarrevision, birthday, birthday_search, maxposts,
                        startofweek, ipaddress, referrerid,
                        languageid, msn, emailstamp,
                        threadedmode, pmtotal, pmunread,
                        autosubscribe, profilepicrevision
                    )
                    VALUES
                    (      
                                               '" 
$this->get_value('mandatory''importuserid') . "',
                        '" 
addslashes(htmlspecialchars($this->get_value('mandatory''username'))) . "',
                        '" 
addslashes($this->get_value('mandatory''email')) . "',
                        '" 
$this->get_value('mandatory''usergroupid') . "',
                        '" 
$this->get_value('mandatory''importuserid') . "',
                        '" 
$newpassword "',
                        '" 
addslashes($salt) . "',
                        NOW(),
                        '" 
$this->get_value('nonmandatory''options') . "',
                        '" 
addslashes($this->get_value('nonmandatory''homepage')) . "',
                        '" 
$this->get_value('nonmandatory''posts') . "',
                        '" 
$this->get_value('nonmandatory''joindate') . "',
                        '" 
addslashes($this->get_value('nonmandatory''icq')) . "',
                        '" 
$this->get_value('nonmandatory''daysprune') . "',
                        '" 
addslashes($this->get_value('nonmandatory''aim')) . "',
                        '" 
$this->get_value('nonmandatory''membergroupids') . "',
                        '" 
$this->get_value('nonmandatory''displaygroupid') . "',
                        '" 
$this->get_value('nonmandatory''styleid') . "',
                        '" 
$this->get_value('nonmandatory''parentemail') . "',
                        '" 
addslashes($this->get_value('nonmandatory''yahoo')) . "',
                        '" 
$this->get_value('nonmandatory''showvbcode') . "',
                        '" 
addslashes($this->get_value('nonmandatory''usertitle')) . "',
                        " 
intval($this->get_value('nonmandatory''customtitle')) . ",
                        '" 
$this->get_value('nonmandatory''lastvisit') . "',
                        '" 
$this->get_value('nonmandatory''lastactivity') . "',
                        '" 
$this->get_value('nonmandatory''lastpost') . "',
                        '" 
$this->get_value('nonmandatory''reputation') . "',
                        '" 
$this->get_value('nonmandatory''reputationlevelid') . "',
                        '" 
$this->get_value('nonmandatory''timezoneoffset') . "',
                        '" 
$this->get_value('nonmandatory''pmpopup') . "',
                        '" 
$this->get_value('nonmandatory''avatarid') . "',
                        '" 
$this->get_value('nonmandatory''avatarrevision') . "',
                        '" 
$this->get_value('nonmandatory''birthday') . "',
                        '" 
$this->get_value('nonmandatory''birthday_search') . "',
                        '" 
$this->get_value('nonmandatory''maxposts') . "',
                        '" 
$this->get_value('nonmandatory''startofweek') . "',
                        '" 
$this->get_value('nonmandatory''ipaddress') . "',
                        '" 
$this->get_value('nonmandatory''referrerid') . "',
                        '" 
$this->get_value('nonmandatory''languageid') . "',
                        '" 
addslashes($this->get_value('nonmandatory''msn')) . "',
                        '" 
addslashes($this->get_value('nonmandatory''emailstamp')) . "',
                        '" 
$this->get_value('nonmandatory''threadedmode') . "',
                        '" 
$this->get_value('nonmandatory''pmtotal') . "',
                        '" 
$this->get_value('nonmandatory''pmunread') . "',
                        '" 
$this->get_value('nonmandatory''autosubscribe') . "',
                        '" 
$this->get_value('nonmandatory''profilepicrevision') . "'
                    )
                "

В этом случае id юзеров сохранится то же самое проделываем и для разделов сообщений и тд
Я доработал так его + добавил перенос хешей и сальта и паправил пару файлов VB теперь пароли понимает от IPB
  Ответить с цитированием
Ответ

Закладки

Опции темы
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.



 
 

Текущее время: 02:21 26.05.2012. Часовой пояс GMT +4.


Powered by vBulletin® Version 3.0.2
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd. Перевод: zCarot