Topic: phpBB->punBB polls not converting
trying to convert an oldish version of phpBB (2.0.4) forum to punBB 1.2.5. Everything goes fine until I hit the polls. PunPolls is installed and works when posting a new poll to a fresh punBB install.
What happened is, when the converter hits the section where it starts to convert the polls... it stops with a db error unknown field. The field names the converter is looking for in it's INSERT query are not in the pun_polls table.
I investigated further and checked out the converter file at converter package/PhpBB/polls.php and found this bit of code where it converts from phpbb and inserts into punBB:
$todb = array(
'id' => $ob['vote_id'],
'topic_id' => $ob['topic_id'],
'question' => $ob['vote_text'],
'answers' => serialize($answers),
'voters' => implode(',', $voter_ids),
'votes' => implode('|', $results),
'tot_votes' => array_sum($results),
);
// Save data
insertdata('polls', $todb);
}
convredirect('vote_id', $_SESSION['phpnuke'].'vote_desc', $last_id);
those field names do not match fields in pun_polls
topic_id should be pollid
questions is actually stored in pun_topics
answers should be options
tot_votes not present
so I changed some field names and got the data to insert (albeit, into incorrectly named fields) and then wrote an insert to move the question text to the corresponding pun_topic record. NO go... the options, voters and votes are not serializing correctly (from the code above, they apparently don't get serialized at all, however viewpoll.php expects them to be)??
So it kind of seems like this converter code wont do the job for me... any suggestions?