News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

YaBB 2.1 -> SMF 1.1.2 - Attachment Problem and little fix

Started by simfactor, March 24, 2007, 07:00:54 AM

Previous topic - Next topic

simfactor

Got a problem when converting my board. The converter (yabb21_to_smf.php) didn't parse the Path.pl [nofollow] 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.

JayBachatero

Ummm I fixed this issue a while back.  Are you using the converter in this topic: YaBB 2.1?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

simfactor

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?

JayBachatero

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.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Advertisement: