Your fucking browser doesn't support JavaScript, so you can't post here.
Loading
Объявления
22.06.2011, 00:03
#1
Продвинутый
Регистрация: 20.08.2008
Сообщений: 17
Версия vB: 4.1.x
Поблагодарил(-а): 8
Поблагодарили 10 раз(а) в 3 сообщениях
Репутация: Опытный (10 )
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.
Заранее огромнейшее спасибо.
С уважением.
30.03.2012, 14:17
#2
Простоузер
Регистрация: 19.12.2008
Сообщений: 45
Версия vB: 3.8.x
Поблагодарил(-а): 3
Поблагодарили 0 раз(а) в 0 сообщениях
Репутация: Новичок (0 )
С атчами не сталкивался но вот 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
Опции темы
Опции просмотра
Линейный вид
Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения
HTML код Выкл.
Текущее время: 02:21 26.05.2012 . Часовой пояс GMT +4.