Not a Bug Vbulletin Social Groups import not importing messages

Hi,

It's not perfect but at least handles the most important for my customer, replaced the group.php file from vBulletin with that file content (it uses 301config.php from vB redirection script for xF.

PHP:
<?php

$startTime = microtime(true);

$fileDir = dirname(__FILE__);
if (file_exists($fileDir . '/301config.php'))
{
include($fileDir . '/301config.php');
}

require($fileDir . '/library/XenForo/Autoloader.php');
XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library');

XenForo_Application::initialize($fileDir . '/library', $fileDir);
XenForo_Application::set('page_start_time', $startTime);

$dependencies = new XenForo_Dependencies_Public();
$dependencies->preLoadData();

$inputHandler = new XenForo_Input(new Zend_Controller_Request_Http());

$input = $inputHandler->filter(array(
    'cat'           => XenForo_Input::UINT,
    'discussionid'  => XenForo_Input::UINT,
    'gmid'          => XenForo_Input::UINT,
'groupid'       => XenForo_Input::UINT
));

$target = false;
if ($input['gmid'])
{
$importModel = XenForo_Model::create('XenForo_Model_Import');

$logTable = (defined('IMPORT_LOG_TABLE') ? IMPORT_LOG_TABLE : 'xf_import_log');

if ($newId = $importModel->getImportContentMap('nsg_vb38x_post', $input['gmid'], $logTable))
{
$target = XenForo_Link::buildPublicLink('canonical:posts', array('post_id' => reset($newId)));
}
}
else if ($input['discussionid'])
{
$importModel = XenForo_Model::create('XenForo_Model_Import');

$logTable = (defined('IMPORT_LOG_TABLE') ? IMPORT_LOG_TABLE : 'xf_import_log');

if ($newId = $importModel->getImportContentMap('nsg_vb38x_thread', $input['discussionid'], $logTable))
{
$target = XenForo_Link::buildPublicLink('canonical:threads', array('thread_id' => reset($newId)));
}
}
else if ($input['cat'])
{
$importModel = XenForo_Model::create('XenForo_Model_Import');

$logTable = (defined('IMPORT_LOG_TABLE') ? IMPORT_LOG_TABLE : 'xf_import_log');

if ($newId = $importModel->getImportContentMap('nsg_vb38x_category', $input['cat'], $logTable))
{
$target = XenForo_Link::buildPublicLink('canonical:groups/categories', array('team_category_id' => reset($newId)));
}    
}
else if ($input['groupid'])
{
$importModel = XenForo_Model::create('XenForo_Model_Import');

$logTable = (defined('IMPORT_LOG_TABLE') ? IMPORT_LOG_TABLE : 'xf_import_log');

if ($newId = $importModel->getImportContentMap('nsg_vb38x_group', $input['groupid'], $logTable))
{
$target = XenForo_Link::buildPublicLink('canonical:groups', array('team_id' => reset($newId)));
}
}

if (!$target)
{
$target = XenForo_Link::buildPublicLink('canonical:groups');
}

$response = new Zend_Controller_Response_Http();
$response->setRedirect(XenForo_Link::convertUriToAbsoluteUri($target), 301);
$response->sendResponse();
 
Am I missing it or is this not redirecting the main group index or the category listing? These are the most important for SEO.
group.php?do=categorylist
group.php?do=grouplist

Does the above catch this:
group.php?do=discuss&discussionid=302&pp=25&page=42

Without image redirect, the images in posts will break, as well as the image discussion:
group.php?do=picture&groupid=126&pictureid=32408

Groups can have a lot of images listed here:
group.php?do=grouppictures&groupid=126

Or a lot of members listed here:
group.php?do=viewmembers&groupid=126

I think @Nobita wants to implement redirects.
 
Am I missing it or is this not redirecting the main group index or the category listing? These are the most important for SEO.
group.php?do=categorylist
group.php?do=grouplist

Does the above catch this:
group.php?do=discuss&discussionid=302&pp=25&page=42

Without image redirect, the images in posts will break, as well as the image discussion:
group.php?do=picture&groupid=126&pictureid=32408

Groups can have a lot of images listed here:
group.php?do=grouppictures&groupid=126

Or a lot of members listed here:
group.php?do=viewmembers&groupid=126

I think @Nobita wants to implement redirects.
alfa1Please make an thread suggestion for that ;)
 
group.php?do=categorylist
group.php?do=grouplist
alfa1
Both redirects to group home page which seems logical.

Does the above catch this:
group.php?do=discuss&discussionid=302&pp=25&page=42

Without image redirect, the images in posts will break, as well as the image discussion:
group.php?do=picture&groupid=126&pictureid=32408

Groups can have a lot of images listed here:
group.php?do=grouppictures&groupid=126

Pictures are not supported by the importer apparently.

Or a lot of members listed here:
group.php?do=viewmembers&groupid=126

My customer didn't want that redirected so that's fine.
 
Ah I see. You have support for the sonnb addon and for the official XenForo Media Gallery.
XFMG is not third party. So import to the Official XenForo Media Gallery would be nice to have.
 
Back
Top