Simple Machines Community Forum

SMF Support => Converting to SMF => YaBB/YaBB SE => Topic started by: simfactor on March 24, 2007, 07:00:54 AM

Title: YaBB 2.1 -> SMF 1.1.2 - Attachment Problem and little fix
Post by: simfactor on March 24, 2007, 07:00:54 AM
Got a problem when converting my board. The converter (yabb21_to_smf.php) didn't parse the Path.pl variables completely. So I made a small fix to yabb21_to_smf.php. Here's the code -- inside load_converter_settings() :


// In some cases $boarddir is not parsed causing the paths to be incorrect.
foreach ($paths as $path) {
//if (substr($yabb[$path], 0, 9) == '$boarddir')
if (preg_match('/\$boarddir/i', $yabb[$path], $match)) {
//echo $yabb[$path]." converted to ";
$yabb[$path] = str_replace('$boarddir', $yabb['boarddir'], $yabb[$path]);
//echo $yabb[$path]."\n";
}
if (preg_match('/\$htmldir/i', $yabb[$path], $match)) {
//echo $yabb[$path]." converted to ";
$yabb[$path] = str_replace('$htmldir', $yabb['boarddir'], $yabb[$path]);
//echo $yabb[$path]."\n";
}
}


That code does fix the problem, for me at least :D

But I have another problem: this conversion did not generate any thumbnail for attachment. Can tell me how to fix that?

Just realise that uploading new attachment does not generate thumbnail either, Display.php manage to create a dumbnail though.
Title: Re: YaBB 2.1 -> SMF 1.1.2 - Attachment Problem and little fix
Post by: JayBachatero on March 26, 2007, 07:12:13 PM
Ummm I fixed this issue a while back.  Are you using the converter in this topic: YaBB 2.1 (http://www.simplemachines.org/community/index.php?topic=122338)?
Title: Re: YaBB 2.1 -> SMF 1.1.2 - Attachment Problem and little fix
Post by: simfactor on March 27, 2007, 05:44:25 AM
hi Jay,

Firstly, thank you so much for the converter! :D

I downloaded the YaBB 2.1 converter from the download page on SMF website, not from this forum. Is there any difference (beside that fix)?

Also, am I correct that SMF does not create thumbnail when we're uploading an image attachment?
Title: Re: YaBB 2.1 -> SMF 1.1.2 - Attachment Problem and little fix
Post by: JayBachatero on March 28, 2007, 12:20:27 AM
Yes there is a big difference in those converters I fixed a few major bugs that poped up.  Also yes SMF creates the thumbnails for attachments.  I actually updated the converter to get the with and height for the attachments so if you have thumbnails enabled in SMF, SMF will create the missing thumbnails.