Resource icon

vBulletin 5 to Xenforo Importer 1.1.414.1

No permission to download
If I make this change, do I need to start the convert process over? If so, what happens to the previous import/convert that stopped?

Does this look right:

while ($row = $result->fetch_assoc()){
$nope = "@" "&" "/" "*" "!" ";";
(false === strpbrk($row['username'], $nope)) ? echo "Good<br>" : continue;
$vb_member_groups = explode(",", $row['membergroupids']);
 
Nope lol
$nope is just a variable not an array.
$nope = "@&/*!;:";
The above is better and should work.
The process will be where you left off. You wont have to redo the usergroups. But when you click members. It will restart the members process.
Because members are skipped. You'll also need to:
Line 256
Change variable $row['member'] to 2
And again on line 276
Or somewhere close to there.
This will open the convert forums without having all the users existing. Make sure you've converted all the users you wanted first!
Doing the forums without all the members existing could result in unknown behavior.
 
Not exactly sure where to insert the "2"

My Line 255 and 256 is:
255: echo "<tr><td>Members</td><td style='text-align: center;'>".$row['member']."<input type='hidden' name='total' value='".$row['member']."'></td><td style='text-align: center;'>".($row2['d_member'] ? $row2['d_member']."/".$row['member'] : " - ")."</td><td style='text-align: center;'><input type='text' value='250' name='qty' style='width: 50px;'></td><td style='text-align: center;'>".($row2['d_usergroup'] ? "<input type='submit' value='Convert' onclick=\"return confirm('This will clear all current members except the first (Administrator). Also any members with more than 25 character names will be truncated to 25 characters. Continue?');\">" : "")."</td></tr>";
256: echo "</form>";

My Line 275 and 276 is:
275: echo "<tr><td>Polls</td><td style='text-align: center;'>".$row['poll']."<input type='hidden' name='total' value='".$row['poll']."'></td><td style='text-align: center;'>".($row2['d_poll'] ? $row2['d_poll']."/".$row['poll'] : " - ")."</td><td style='text-align: center;'><input type='text' value='100' name='qty' style='width: 50px;'></td><td style='text-align: center;'>".(($row2['d_post'] == $row['post']) ? "<input type='submit' value='Convert'>" : "")."</td></tr>";
276: echo "</form>";
 
Look for this.
$row2['d_member'] >= $row['member']
Change it to
$row2['d_member'] >= 2

There should be 2 of them. Close to those line numbers I gave you.
 
I tried... now the page won't load. There is a syntax error here that I don't know how to fix.

echo "<tr><td>Forums</td><td style='text-align: center;'>".$row['forum']."<input type='hidden' name='total' value='".$row['forum']."'></td><td style='text-align: center;'>".($row2['d_forum'] ? $row2['d_forum']."/".$row['forum'] : " - ")."</td><td style='text-align: center;'><input type='text' value='100' name='qty' style='width: 50px;'></td><td style='text-align: center;'>".(($row2['d_member'] >= 2 "<input type='submit' name='forum' value='Convert' onclick=\"return confirm('This will clear all current forums Continue?');\">" :"")."</td></tr>";
echo "</form>";
 
And you removed the ?
So it should say
$row2['d_member'] >= 2) ? "<input
Code:
echo "<tr><td>Forums</td><td style='text-align: center;'>".$row['forum']."<input type='hidden' name='total' value='".$row['forum']."'></td><td style='text-align: center;'>".($row2['d_forum'] ? $row2['d_forum']."/".$row['forum'] : " - ")."</td><td style='text-align: center;'><input type='text' value='100' name='qty' style='width: 50px;'></td><td style='text-align: center;'>".(($row2['d_member'] >= 2) ? "<input type='submit' name='forum' value='Convert' onclick=\"return confirm('This will clear all current forums Continue?');\">" :"")."</td></tr>";
 
I put the ")" back in but it still doesn't work. Here's the error:

[Thu Jan 25 21:23:34.528875 2018] [proxy_fcgi:error] [pid 9162] [client 127.0.0.1:57798] AH01071: Got error 'PHP message: PHP Parse error: syntax error, unexpected '"<input type='submit' name='fo' (T_CONSTANT_ENCAPSED_STRING) in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php on line 259\n'
 
Put the ? back in as well.

Now I get this error:

[Thu Jan 25 21:25:42.730704 2018] [proxy_fcgi:error] [pid 9240] [client 127.0.0.1:57868] AH01071: Got error 'PHP message: PHP Parse error: syntax error, unexpected 'echo' (T_ECHO) in /home/137258.cloudwaysapps.com/scbuekeedq/public_html/convert_vb5_to_xenforo.php on line 610\n'
 
Its all good. I remember being new to PHP. But I had a little coding background from when I was younger. I try to remember how it was when I was learning :)

Whats line 609 look like?
Actually your better off sending me the file in a PM and we can continue this convo through PM's instead of here.
 
Top Bottom