FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Converters » Problems converting modified WWWboard to FUD
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Problems converting modified WWWboard to FUD [message #23133] Sun, 06 March 2005 05:38 Go to next message
Bester is currently offline  Bester   United States
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. Embarassed )
  • 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 #162038 is a reply to message #23133] Mon, 15 March 2010 19:27 Go to previous messageGo to next message
parocks is currently offline  parocks   United States
Messages: 5
Registered: March 2010
Karma: 0
Junior Member
I'm trying to do the same thing - move wwwboard messages to fudforum - and I have some of the similar problems.

I find that I get "anonymous coward" in all cases where no email was initially entered.

In all cases I can't get the date. The dates are set as today. In my case that's March 14 or March 15.

I ran 2 separate versions of wwwboard. One gave 19101, the other gave 2001 for the year.

I can also tell you that one version of wwwboard gave an ip address. (123.45.67.89) between posted by and the date.

If you remove that ip address, and the person who originally posted did include their email address, their name will show up properly in fudforum.

If there's anyone able to answer this question or would be able to tweak the wwwboard.php script a little or tell me how to tweak the script, etc etc, I could zip up a few messages if need be.
Re: Problems converting modified WWWboard to FUD [message #162067 is a reply to message #162038] Wed, 17 March 2010 09:07 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
I may be able to help. Please post or mail me a couple of messages to test with.
Re: Problems converting modified WWWboard to FUD [message #162079 is a reply to message #162067] Thu, 18 March 2010 05:13 Go to previous messageGo to next message
parocks is currently offline  parocks   United States
Messages: 5
Registered: March 2010
Karma: 0
Junior Member
naudefj wrote on Wed, 17 March 2010 05:07
I may be able to help. Please post or mail me a couple of messages to test with.


I think that what I'll do is upload the old messages and the
old index files to a website. Would that work?

I've found recently a couple of pieces of software that will do bulk changes on large number of of html files simultaneously.

Because I found that software, I have removed the IP address from all of my wwwboard html messages. By doing that, I was able to get user names (with the email) visible.

But I still have as the date the date that it was brought into fudforum, not the original date, and what I'm really looking for now is for the original date to appear.

I could also modify the dates in the html messages.
here are the urls to 2 different types of message.

parocks.com/wwwboard/1.html
this one is the newer one. It does have the IP address in - I've taken it out, and it has the correct date (2003 instead of 19103)

parocks.com/wwwboard/11.html
this is the older one. it has 19101 instead of 2001.
Re: Problems converting modified WWWboard to FUD [message #162107 is a reply to message #162079] Fri, 19 March 2010 05:56 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Don't worry too much about changing the files. We should be able to fix the dates in the conversion script. If everything goes according to plan, I should have it ready later today.
Re: Problems converting modified WWWboard to FUD [message #162111 is a reply to message #162107] Fri, 19 March 2010 16:21 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
OK, here's the updated version:
http://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 #162113 is a reply to message #162111] Fri, 19 March 2010 18:30 Go to previous messageGo to next message
parocks is currently offline  parocks   United States
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:21
OK, 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 #162114 is a reply to message #162113] Fri, 19 March 2010 19:59 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Here 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.

http://sourceforge.net/apps/trac/fudforum/changeset/4927
Re: Problems converting modified WWWboard to FUD [message #162115 is a reply to message #162114] Fri, 19 March 2010 21:12 Go to previous messageGo to next message
parocks is currently offline  parocks   United States
Messages: 5
Registered: March 2010
Karma: 0
Junior Member
naudefj wrote on Fri, 19 March 2010 15:59
Here 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 #162116 is a reply to message #162115] Fri, 19 March 2010 21:27 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
parocks wrote:
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


Yea, that's what happen when you don't test! Anyway, I still haven't, but you may want to change all '$u->' to '$usr->' in the script.

Best of luck.
Re: Problems converting modified WWWboard to FUD [message #162128 is a reply to message #162116] Tue, 23 March 2010 21:24 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
How's you WWWboard conversion coming along?
Re: Problems converting modified WWWboard to FUD [message #162129 is a reply to message #162128] Tue, 23 March 2010 22:34 Go to previous messageGo to next message
parocks is currently offline  parocks   United States
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.
Re: Problems converting modified WWWboard to FUD [message #162133 is a reply to message #162129] Wed, 24 March 2010 10:25 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
parocks het op Wed, 24 March 2010 00:34 geskryf:
The conversion is going well. The wwwboard section of it is done for the most part. The final version of the script did work.


Great news! Smile

Please open new topics for your other conversion discussions. Let's try not to confuse the people who are reading this thread for WWWBoard info.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Various imports
Next Topic: IPB 1.3.1 Conversion not working
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 08:06:59 GMT 2024

Total time taken to generate the page: 0.02280 seconds