Problems converting modified WWWboard to FUD [message #23133] |
Sun, 06 March 2005 05:38 |
Bester
Messages: 1 Registered: March 2005
Karma: 0
|
Junior Member |
|
|
I have an old WWWboard archived and I was thinking about upgrading it to a PHP script and reposting just for nostalgia sake. Yours was the only one that had the option of a direct WWWboard conversion that actually worked with the messages. The problem is, the script can't grab the user names or the dates from the posts. I get odd dates (Either recent or from 1969), and everyone gets set to anonymous coward.
Here is a zip with a few messages. Would someone here be able to modify the converter to work with these messages? It was heavily modded so I can see why it would have problems, but I just don't have as much time to do scripting as I used to.
Sorry, you can't see the forum in action as the index was FUBAR'd long ago. No rush, I just would like to be able to see these without having to use a search script. (Just ignore the embedded midi code, it was the 90s. )
-
Attachment: messages.zip
(Size: 8.76KB, Downloaded 2519 times)
[Updated on: Sun, 06 March 2005 05:40] Report message to a moderator
|
|
|
|
|
|
|
|
Re: Problems converting modified WWWboard to FUD [message #162113 is a reply to message #162111] |
Fri, 19 March 2010 18:30 |
parocks
Messages: 5 Registered: March 2010
Karma: 0
|
Junior Member |
|
|
It sort of works. It fixes the date problem, but it creates another different problem.
It tries to fix another problem, which I guess would be called the "anonymous coward" problem - and it moves toward a fix but doesn't quite get there.
The way it worked before is whenever someone didn't add an email,
their userid would be changed to anonymous coward, or whatever you chose to put in there.
What is happening now is the userids are recorded somehow, but the way it's processed by a different part of the fudforum software doesn't work.
Let's say the first person who didn't use an email was called
"John Smith" and he left his email blank. Every time fudforum sees a blank email, it puts "John Smith" as the "anonymous coward".
I think it would work a little better if fudforum would look first at userid instead of email in determining what to put up there on the screen. But I think that's not really something that a converter program could really solve.
it's possible, maybe, to put in a unique, fake, email when the converter sees a blank email? The converter sees "John Smith"
and nothing for an email, and puts in "John Smith" and "fake00001 @fake.com" The converter sees "Jane Doe" and nothing for an email, and puts in "Jane Doe" and "fake00002 @fake.com".
If John Smith posts 50 times, the converter would give him 50 different fake @fake.com emails. The consistency checker would be able to clear that up. I don't know if that's doable, but if it was it could possibly be able to clear that up.
Another note is that the screen you get when the program is running is a big improvement. It makes things a lot easier. 1) you know the program is running and you can see the progress and what the program is doing. 2) When you have an error in your message, the program will tell you exactly which message has an error in it, and you can easily fix the problem.
Good job overall! Thanks.
naudefj wrote on Fri, 19 March 2010 12:21OK, here's the updated version:
sourceforge.net/apps/trac/fudforum/changeset/4926
It loads 11.htm, but it fails on 1.htm - probably because you edited it. I've also successfully tested it with Bester's messages (first post of thread).
|
|
|
|
Re: Problems converting modified WWWboard to FUD [message #162115 is a reply to message #162114] |
Fri, 19 March 2010 21:12 |
parocks
Messages: 5 Registered: March 2010
Karma: 0
|
Junior Member |
|
|
naudefj wrote on Fri, 19 March 2010 15:59Here is another version for you to try. This time untested. It's not pretty, but it will try to assign dummy E-Mail addresses to anonymous WWWboard posters.
sourceforge.net/apps/trac/fudforum/changeset/4927
That fix didn't work.
Here's the error message I got.
***************
Create new user Name=[Mumpheous Orb], EMail=[Mumpheous_Orb(at)oldforum(dot)com]
Fatal error: Call to undefined method stdClass::add_user() in wwwboard.php on line 247
********************
Mumpheous_Orb is the user name.
I looked at the php script, and the actual writing of php scripts is beyond me, I can sometimes look at them and modifty them.
There's a section of the php script that says this
************************
// Link is not an E-mail id.
} elseif (($p = strpos($data, 'Posted by <a href="')) !== false) {
$tmp = substr($data, $p, (stripos($data, ":<p>", $p) - $p));
$x = preg_match('!Posted by \<a href="([^"]+)"\>(.*)</a> [\(\[](.+)[\)\]] on (.*)!', $tmp, $res);
$msg['email'] = '';
$msg['user'] = $res[2];
$msg['time'] = normalize_date($res[4]);
// No E-Mail or link.
} elseif (($p = strpos($data, 'Posted by ')) !== false) {
$tmp = substr($data, $p, (stripos($data, ':<p>', $p) - $p));
$x = preg_match('!Posted by (.*) [\(\[](.+)[\)\]] on (.*)!i', $tmp, $res);
if ( $x == 0 ) {
preg_match('!Posted by (.*) on (.*)!i', $tmp, $res);
$res[3] = $res[2];
$res[2] = '0.0.0.0';
}
$msg['email'] = '';
$msg['user'] = $res[1];
$msg['ipaddr'] = gethostbyname($res[2]);
$msg['time'] = normalize_date($res[3]);
} else { /* We still need date of post and 'anon' user. */
print_msg('ERROR: Unknown message format.');
exit;
}
*****************************
It seems that what is happening is the first thing the script is doing is putting in a blank email at that section, and then later is attempting to put something in that email section.
Maybe, in that section which is putting nothing in the email, something could be put in the email. I like the choice you made for what the email name should be - username(at)oldforum(dot)com
Maybe, instead of
$msg['email'] = '';
it could be something like $msg['email'] = NEWTHINGHERE;
I made a small change which "worked"
I changed
$msg['email'] = '';
to
$msg['email'] = $res[2];
in the sections I identified.
What that did was simply put the user name in the email section
when the email section was blank. It would probably be a little
better to have it say $res[2] (and then @oldforum.com)
but I don't know the right way to say that without giving errors.
I made the changes to the earlier version - the first one from today.
I haven't seen what happens with consistency checker or anything, but it did put the names in right.
|
|
|
|
|
Re: Problems converting modified WWWboard to FUD [message #162129 is a reply to message #162128] |
Tue, 23 March 2010 22:34 |
parocks
Messages: 5 Registered: March 2010
Karma: 0
|
Junior Member |
|
|
The conversion is going well. The wwwboard section of it is done for the most part. The final version of the script did work.
It was able to take the names in and take the emails in. Also, many of my wwwboard messages did have IP addresses. The conversion script was able to take the IP addresses in.
I'm actually not anywhere near finished though, this is the beginning of what may be a very long process. Here are some questions.
1) I have even more old message boards that I'd like to convert to fudforum. Some have converters, some do not. Here are the details on them.
a) One is from a website called "inside the web". Before insidetheweb.com closed down, I was able to take a backup from that site. What it gave me was a seemingly fairly simple txt file or csv file - it has a subject, date, a blank field apparently, the message, the username and a email address. The replies to messages appear directly below the original message, with a re: attached. Is there a "flatfile" to fudforum converter, or would one of these be easily created if I came up with the txt file or the csv file?
b) I used phpbb for a while. I had the phpbb messageboard installed and working on one or another website, and at some point it was deleted. I did save backups from the phpbb. I know that there is a converter for phpbb to fudforum. Could I use the converter to take my backup phpbb files into fudforum, or do I have to install phpbb, put the backup into the phpbb that I've installed, and then convert from phpbb to fudforum that way?
2) other questions that I might have later.
|
|
|
|