News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Anyone ever convert from discusware??

Started by wing, June 02, 2005, 10:25:58 PM

Previous topic - Next topic

wing

I think the problem is the way your forum is setup....  SMF does not support the method you have.

You have
Board --> Topic --> Thread --> Posts

The way the script is looking for it is.
Board --> Thread --> Posts

That extra layer you have is messing up the script, I'm pretty sure about this.  Because this is the method required in SMF.

What you could do to test this theory is change your tree.txt to include only the second layer down.  This I think will fix this. But then I'm not sure what you will do when you move to SMF.


Sanhux

Would be nice to keep the topics and dubtopics strucuture, just like here in this forum, that you have Simple Machines Community Forum  |  SMF Support  |  General English Support  |  Converters and Importers  | And then the thread...

I am not sure on how to change the tree.txt file as you said. If you are interesting in improving your script, I can zip my discus folders to you, for make more precise tests.


wing


wing

Ok, I see that you have a few boards that do not have sub / child boards.  I thought I would focus on those first I see they were not converting properly as well.

It is difficult for me to debug because my admin deleted my discus software just the other day :'(  I really wish he did not as I could have just copied 1 of your files to my machine and tested it as is, I would have to setup discus on my pc or something to test.

Anyways, I found the first problem.

Line 146:
// get Topic Title
            $NameStartPosition = strpos($Scanline,"$TopicID.html?");

Your board does not have TopicID.html?" which would be say 1584.html?"  Yours has only 1584.html"

My board had numbers following the ?  which was the time of the last post.  Your does not, this is why the subject is not being grabbed. 

I think this part is easy to fix.

I'll try to install smf on my pc for you, I will need a copy of what is in tree.txt as I forget.

I do not need the entire files just 1 line so I can test.

I need a sample of each of the following files:
tree.txt
discus.conf
users.txt
us-accts.txt
config.pl

Sanhux

#44
Hello

I turned off the ? option of the forum because I read this is necessary tomake forum google friendly.

If I change the skin to discus classic before run the script, the conversion run better, but the script not collect the titles and the messages page have a few errors, with "No Subject" in title and a broken html like  ST8239">

My forum 1188 doesnt have the topic depth, is just a main topic, with threads list, and the messages page.

I will try to turn the ? on again, apply default skin and run the script.

Thank you so much to providing this support. Im trying to get ride of discus for a while now, but cant lose my data.

wing

I have installed SMF on my local machine to help you.

If you can provide me the other files I requested it would be helpfull, it has been so long since I wrote this script I have to debug as if I am not the author :P

If turning on the ?  solves the issues for that one board, than Adding support for the extra depth with child boards is not that hard, but for sure the script will have to be edited in order to do this.

Or you could convert those child boards one at a time as main boards and move them afterwards with SMF which would be really simple to do.

NOTE:  Try this!

In the discus converter change tree_t.gif to tree_n.gif

Sanhux

Hi

I've send an email to the address in your profile with the requested files.

Turning the ?  doesnt make difference in the conversion, still not gathering the topic names. I can send more discus files as needed.

Sanhux

I changed tree_t.gif to tree_n.gif rerun the converter and dont see any visible effect. In the threads list seems that script are creating empty links like <a href="http://consciencia.org/smf/index.php?topic=1531.0"></a>

Sanhux

I would like to thanks wing for write this script as well the support provided. I finally converted my forum in a reasonable way. Messages and users are keeped and I f can say good bye to Discus now :)
If you gonna run the converter or improve it, you have to note the topics depth issue. In my board, I moved all child topics trough discus administration to a parent topic and then rearranje with SMF administration (enable quick moderation with checkbox is a must). And remember to export all your users in database through discus admin to the flat file, and to demoderated the moderators too. Turn they normal users, and then re-promote then.


wing

Oh thanks for pointing out to you have to demoderate moderators, I didn't have moderation privledge on my forum when I converted it (it was a seperate account from my user account) so I didn't bother writing the conversion for it.

I'm glad everything worked out, the script is not turn-key but it with a little fiddling it works.  Consider yourself lucky :P I had to write it, took me about 1.5 weeks to write that (on my spare time), I was glad it worked at all!  ;D

jaycrowe

I have used Discus for a long time (since it is free) and have always hated it.  I was excited to see this script to covert me over to SMF!  :)

Unfortunately, when I run it, it churns away like all is well, but it ends up finishing without pulling in any of the threads or messages...  I'm still poking at it, but am open to suggestions!

It pulls in the Topics, but nothing under those (the top level of my board)...  hxxp:www.jaycrowe.com [nonactive]

(I do lots of VB, but never any PHP, so I'm combing through the script little by little)

I have a fresh install of smf, nothing in it.  When I run the convert the first time:

Converting...
Converting membergroups... successful.
Converting members... successful.
Converting settings... successful.
Converting personal messages... successful.
Converting boards and categories... successful.
successful.
Converting topics (part 1)... successful.
Converting topics (part 2)... successful.
Converting notifications... successful.
Converting posts (part 1 - this may take some time)... successful.
Converting posts (part 2)... successful.
Converting posts (part 3)... successful.
Recalculating forum statistics (part 1)... successful.
Recalculating forum statistics (part 2)... successful.

Conversion Complete

When I run it subsequent times:

Converting...
Converting membergroups... successful.
Converting members... successful.
Converting settings... successful.
Converting personal messages... successful.
Converting boards and categories... successful.
successful.
Converting topics (part 1)... successful.
Converting topics (part 2)...
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\Apache\Apache2\htdocs\smf\discus_to_smf_1.0.php on line 977

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\Apache\Apache2\htdocs\smf\discus_to_smf_1.0.php on line 986
successful.
Converting notifications... successful.
Converting posts (part 1 - this may take some time)... successful.
Converting posts (part 2)... successful.
Converting posts (part 3)... successful.
Recalculating forum statistics (part 1)... successful.
Recalculating forum statistics (part 2)... successful.

Conversion Complete

:-[

wing

#51
Yikes FRAMES!    I suspect it should work anyways with the frames.

You would have to show me the results of your SMF board after conversion, I might be able to figure it out from that.

I think it might be your formatting, that's the most basic formatting I believe.  This converter is a little harder because it is html dependant and not database.

Honestly you do not have enough posts / content to bother converting.  You could probably just move your stuff manually.

jaycrowe

And you wonder why I'd like to upgrade.  Frames AND all posts saved in HTML.    ;)

So, I did play around with your script a little, and did tweak a few simple things to get a little further along, but there is still a pretty heavy problem with the way it is (not) recursing through my board layout correctly.

Discus:  hxxp:www.jaycrowe.com/discus [nonactive]
SMF:  hxxp:www.jaycrowe.com/smf [nonactive]

The script runs without error, but is not drilling through all the sub items (or if it is, it is not storing them correctly).  Just try going to Birdman's Messageboard\Game Specific\.  In the old board, there were sub-topics but no posts (at that level), and in the conversion there are posts but not the sub-topics.  In re-reading the previous posts here, I see another user has/had this issue.  I guess the solution is to re-arrange my board, then convert, then re-arrange in SMF.  I guess I could try that.

Of the things in the script (that I remember) I changed:
.pl to .cgi (no brainer)

<--Text-->  needed to be <--text-->  (case sensitive...?)

In the GetThreadTopics, after the $TopicID = I needed to // one of the $Scanline = .  It was skipping the line it needed to read in my case.

One of the big problems was the default max_allowed_packet= for mySQL was too small (I think it was 16M) and that was why the (huge single) GetDiscusPosts INSERT was not working.  Unfortunately, there was no error generated to alert me to this, I stumbled upon this the hard way.  I think some others posted here with (maybe) the same problem.

Thanks for making your script available.  I do appreciate it and have leaned a little about PHP along the way.  I like the Implode command.   :P

Jay

wing

So you got it working with some tweaking?  Good stuff.

This is the problem with discuss and the reason the developers of SMF really didn't want to do a converter.  It's all HTML based and there are so many combinations and permutations.  I had 70,000+ posts and I had no problems but I wrote it to work with my board :P

Glad you got it working!  Seems like the key is just to rearrange the board, do the conversion and re-arrange it again.  It's a little bit of work but it is not killer and once you convert to SMF you never go back!

akolar

Wing, I'm trying to do the only sensible thing and move from Discus to SMF. I'm converting on a local XP machine but I bump into errors. A ZIP with all files is here:
http://www.naviter.si/discus/discus_to_smf.zip

It includes:
. HTML output of the converter (the errors)
. tree.txt
. the orignial tree.txt(_original)
. discus_to_smf_10.php

Can you provide any insight?

Oldiesmann

This query was causing the errors:

$request = mysql_query("
SELECT mem.ID_MEMBER, COUNT(pmr.ID_PM) AS realNum, mem.instantMessages
FROM {$to_prefix}members AS mem
LEFT JOIN {$to_prefix}im_recipients AS pmr ON (mem.ID_MEMBER = pmr.ID_MEMBER AND pmr.deleted = 0)
GROUP BY mem.ID_MEMBER
HAVING realNum != instantMessages");


Should be
$request = mysql_query("
SELECT mem.ID_MEMBER, COUNT(pmr.ID_PM) AS realNum, mem.instantMessages
FROM {$to_prefix}members AS mem
LEFT JOIN {$to_prefix}im_recipients AS pmr ON (pmr.ID_MEMBER = mem.ID_MEMBER)
WHERE pmr.deleted = 0
GROUP BY mem.ID_MEMBER
HAVING realNum != instantMessages");


Try this one.
Michael Eshom
Christian Metal Fans

akolar

#56
Thanks, Oldiesman!

I don't see much difference in the result. See
http://www.naviter.si/discus/Discus%20to%20SMF%20Converter.htm

Is the change you made related to SMF RC3 (which is what I am doing)?

Looking at the database I can see that all users (19) were successfully moved into the SMF database. All the rest seems empty.

Let me know what data I should give you for better insight.

Oldiesmann

That converter was written for SMF 1.0.3 (but should still work with 1.0.8), and won't work with 1.1 RC3.

That also explains the errors - "im_recipients" was renamed to "pm_recipients" in 1.1.
Michael Eshom
Christian Metal Fans

akolar

If I install 1.0.3 and import my messages. Is there any problem with the data if I then do an upgrade to RC3?

akolar

Oldiesmann - you did a lot of good to the world tonight ;D

As for anyone who is still using Discusware out there:
1. Install SMF 1.0.8 (this is critical, I was messing with RC3, but the converter is not written for that version)
2. Download the converter from this thread (the original from Wing will do)
3. Follow the instructions carefully (don't expect it to work if you have subtopics. It takes a little effort to convert subtopics to topics. Do it)
4. Run the converter.

Never look back.

Advertisement: