Simple Machines Community Forum

SMF Support => Converting to SMF => Topic started by: wing on June 02, 2005, 10:25:58 PM

Title: Anyone ever convert from discusware??
Post by: wing on June 02, 2005, 10:25:58 PM
Hi,  I'm looking at taking over a site that is currently running discusware.

From what I understand it is a mySQL based board as well, has anyone converted this?  Or have any ideas if it is even do-able?

Thanks!
Title: Re: Anyone ever convert from discusware??
Post by: [Unknown] on June 03, 2005, 03:26:21 AM
I don't know of anyone who has converted from that software.

Do you have any more information on it?  A website, perhaps?  Is it free or is there a download available?

-[Unknown]
Title: Re: Anyone ever convert from discusware??
Post by: Oldiesmann on June 03, 2005, 10:51:15 AM
http://www.discusware.com
Title: Re: Anyone ever convert from discusware??
Post by: wing on June 03, 2005, 01:24:07 PM
Thanks Oldiesmann funny as I just found your site before coming here! hehehehe

There is a free version, the version I would be converting from would be the purchased version, I'm sure they are very similar although the free has a few features disabled.

Thanks.
Title: Re: Anyone ever convert from discusware??
Post by: dtm.exe on June 03, 2005, 01:26:28 PM
wing, can you please post a link to your website so that we can get a taste of what it looks like?

-Dan The Man
Title: Re: Anyone ever convert from discusware??
Post by: wing on June 03, 2005, 03:10:04 PM
http://www.canadiandriver.com/cgi-bin/discus/discus.pl

Well not mine yet, but I can dream right?  ;)
Title: Re: Anyone ever convert from discusware??
Post by: dtm.exe on June 03, 2005, 03:13:54 PM
Quote from: wing on June 03, 2005, 03:10:04 PM
http://www.canadiandriver.com/cgi-bin/discus/discus.pl

Well not mine yet, but I can dream right?  ;)

I can see why you'd like to switch to SMF ;).

-Dan The Man
Title: Re: Anyone ever convert from discusware??
Post by: [Unknown] on June 03, 2005, 03:20:07 PM
Quote from: wing on June 03, 2005, 03:10:04 PM
http://www.canadiandriver.com/cgi-bin/discus/discus.pl

Well not mine yet, but I can dream right?  ;)

You pay for that?  Kidding :P!  Looks possible...

-[Unknown]
Title: Re: Anyone ever convert from discusware??
Post by: wing on June 09, 2005, 07:24:58 PM
Well I'm still working on obtaining the site, if I can then get ahold of a database can someone help me out with the conversion?  I looked at the code and not knowing what the heck it is doing (the conversion tools) it seems overwhelming.

I am guessing here, but I would suspect the conversion basically reads the database, gets all the fields out and then re-populates the new database with those same fields.  So The key is knowing which fields to extract?  Am I close?

So if I can get the database, I can dump the entire thing to figure out what the heck the fields are and then go from there.
Title: Re: Anyone ever convert from discusware??
Post by: Grudge on June 09, 2005, 07:33:17 PM
If you can get a dump I can probably help. Only thing is I'm on holiday *very* shortly for a few weeks so I can't promise to get anything done before then :/
Title: Re: Anyone ever convert from discusware??
Post by: wing on June 09, 2005, 08:33:39 PM
Thanks for the offer!  I don't think there is a hurry yet, I still have to develop the new site if this happens.  So I'll have to do graphics and create a new site first, then when everything is set and ready to go, I'll attempt to convert the old site over.  This wouldn't be until at least August.
Title: Re: Anyone ever convert from discusware??
Post by: Grudge on June 10, 2005, 04:34:10 AM
If you could provide me a schema before then I would appreciate it. You only really need to provide a dump of your forum STRUCTURE, although I'd appreciate a little test data if possible.
Title: Re: Anyone ever convert from discusware??
Post by: Confused Too on November 19, 2005, 03:27:54 PM
Did anyone ever come up with a converter for discusware?
I have just converted another site from eBlah to SMF and would like to do the same with another one I have at http://www.uvc-cog.org.uk/discus/index.html (http://www.uvc-cog.org.uk/discus/index.html).
Grudge if you need a copy of the database I can arrange for you to have access to mine.
Title: Re: Anyone ever convert from discusware??
Post by: wing on November 20, 2005, 10:59:14 AM
Yeah I ended up creating one.

It's not the fanciest thing but gets the job done, several others have e-mailed me and received the converter and proceeded to convert their boards! :)  So it does work for more than just me.

Here's a copy of the converter, you'll have to rename .php to run it discus converter (http://www.cartalkcanada.com/discus_to_smf_1.0.txt)

And some instructions.....

My discus was not a sql database it was taken from the html files as that is where all my stuff was stored, not in a database. If this is the same as yours it should work without any changes.


You want to put the php file into the main forum directory of your smf
instalation.

WHen you run it, it will figure out where smf is, but you will have to
point it to your discus cgi-bin directory IE: /var/www/cgi-bin/discus


The script only converts the posts and the users (the only thing there
really IS to convert anyways).  When you run the script you will see a
check box to erase all posts. 


1 issue I ran into,  I converted my board on a trial run with no
issues, I re-ran another trial a few weeks later after having more
posts and for some odd reason it no longer worked

I believe it is timing out.   There was a simple solution, I
simply ran the conversion in smaller chunks by breaking up the
tree.txt file into multiple smaller segments, I had to run the script
3 times instead of once, and I had to ensure that I did not convert
the users more than once.  It only took me 2 minutes to set this up,
so if you run into a similar issue I can help you out.

My board has about 4000 users and 100,000 posts.  If yours is smaller
there shouldn't be an issue, if it's larger (mainly the posts that
matter, users are no issue), then I'll explain exactly what is
required to split up the process to work.

I didn't bother to figure out how to convert the admins over.  So what you do is make sure you have 1 account in
discus that you know the password of and is NOT an admin.

After conversion, simply go into phpmyadmin and find this user. Change
the ID_GROUP to 1 (all of them should be 0 after conversion).  Now
that user will be an admin and you can do what you wish from there.

If you have the users in a database convert the user DB to flat file first that makes it much
easier for you as you don't have to change the script in any way.

For passwords to work after conversion.......

You will have to make a change to the discus board itself.  In the
sources directory you'll have to edit LogInOut.php


Look for
// Old style encryption... now's the only time to fix it.
       if ($user_settings['passwd'] == crypt($_REQUEST['passwrd'],substr($_REQUEST['passwrd'], 0, 2)) || $user_settings['passwd'] ==
md5($_REQUEST['passwrd']))
       {


Change it to:

// Old style encryption... now's the only time to fix it.
       if ($user_settings['passwd'] == crypt($_REQUEST['passwrd'], substr($user_settings['passwd'], 0, 2)) || $user_settings['passwd'] ==
md5($_REQUEST['passwrd']))
       {


Title: Re: Anyone ever convert from discusware??
Post by: wing on November 20, 2005, 11:00:46 AM
If someone wants to figure out how to make this more robust and user friendly go ahead.  I needed to convert 1 board once, so I didn't bother, just making it work had me smiling for a while.  ;D
Title: Re: Anyone ever convert from discusware??
Post by: H on November 20, 2005, 11:49:02 AM
Hopefully Grudge or Compuart will come along and edit this converter so it can be part of the offical converter system ;)
Title: Re: Anyone ever convert from discusware??
Post by: Confused Too on November 20, 2005, 01:30:40 PM
Thanks Wing I will give it a go soon. The forum is not massive at all so should be OK to convert.
The problem is that the DiscusWare forums are quite secure and people who use tham appear to be totally dedicated to them or too scared to touch them incase they break them.  I must admit I have used them for 6 years and never had a problem with them but they haven't moved on with the times and lack a lot of functionality now available.
I will let you know how it goes.
Title: Re: Anyone ever convert from discusware??
Post by: Sanhux on December 31, 2005, 01:41:02 PM
Hi

I try to run the convertor and it gives the following error


Converting membergroups... successful.
Converting members... Notice: Use of undefined constant preg_ - assumed 'preg_' in /var/www/vhosts/domain/htdocs/smf/discus_to_smf_1.0.php on line 294
Fatal error: Call to undefined function: cgiit() in /var/www/vhosts/domain/htdocs/smf/discus_to_smf_1.0.php on line 294


Maybe the version of php?
Title: Re: Anyone ever convert from discusware??
Post by: Sanhux on December 31, 2005, 02:35:38 PM
Oops, that's was my fault. I made a vim command to replace .pl to .cgi.
Now the script runs but give one more error

Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 502 is not allowed to access /var/www/vhosts/domain/htdocs/forum/messages/1/1.html owned by uid 33 in /var/www/vhosts/consciencia.org/htdocs/smf/discus.php on line 106
Warning: fopen(/var/www/vhosts/domain/htdocs/forum/messages/1/1.html): failed to open stream: Success in /var/www/vhosts/consciencia.org/htdocs/smf/discus.php on line 106Can't Open File /var/www/vhosts/domain/htdocs/forum/messages/1/1.html

I guess it can read the messages files, nor import it? I cant chmod these files, because it are created by www-data, like that:

-rw-rw-rw-  1 www-data sanhux 22858 2005-12-31 14:56 9.html
Title: Re: Anyone ever convert from discusware??
Post by: Sanhux on December 31, 2005, 04:00:53 PM
I searched google for the error and try a dummy solution. I compress the messages folder in shell and then descompress it. But now I belive the script is timing out. My forum is not that large: about 9000 messages. How I split tree.txt as mentioned?
Title: Re: Anyone ever convert from discusware??
Post by: Sanhux on December 31, 2005, 04:06:56 PM
I  erased some dirs in tree.txt and the script finally convert. But is messing up. I dont with the cause is some customization that I've made. The topics names contains bgcolor="#f7f7f7"> instead of name and in the post everything is in left colum instead of right. ;(
Title: Re: Anyone ever convert from discusware??
Post by: Infinite on December 31, 2005, 04:35:15 PM
Great Job on the converter. My friend needed a converter like this, so I will tell him as soon as possible.
Title: Re: Anyone ever convert from discusware??
Post by: Sanhux on December 31, 2005, 05:01:41 PM
I change the skin for the discus default, repeated the procedure to replace messages dir, erased once more some lines of tree.txt and the convertor works better in that time, but still have problems. Each message have a "no subject" label and a mess html like that ST4661"> just before the post. Algo My discus installation, because of the messages trich, becomed corrupted, and I had replace with the backup

Maybe the conversor intend to work only with english version of discus? My discus is in another language, if that matter.

Anyway that convertor is not mature indeed
Title: Re: Anyone ever convert from discusware??
Post by: wing on December 31, 2005, 05:11:27 PM
Possibly the converter looks for some specific english strings... It's been awhile since I wrote it but I do remember it searching for specific titles in order to determine if the topic was a thread or an archive.  You may want to look at the code a bit, there are comments where it gets the specific information you will have to change it to your language. 

I only had 1 to test it on, there was a few people that converted using it, but my forum was very basic, I didn't write all the possibilities and setups with discuss. 

Title: Re: Anyone ever convert from discusware??
Post by: Sanhux on January 01, 2006, 12:34:00 AM
Can anyone post here the language.conf and lang40.conf files so I can make a english installation? I think maybe will be easier. I am not a coder at all.

And how about the timeout issue? Its ok to rerun the script with one tree.txt for each topic?

thanks
Title: Re: Anyone ever convert from discusware??
Post by: wing on January 01, 2006, 10:04:39 AM
Yes you can run the script with 1 topic in each tree.txt that is how I did it.

I would post my language files but unfortunatly..... my server ran out of space last night and the admin just toasted discus  :o
Title: Re: Anyone ever convert from discusware??
Post by: Sanhux on January 01, 2006, 01:59:05 PM
Hi wing! Thanks for the answer

I searched the code for english specific variables, but I found only global variables of the program, which have a english name, but is not related to the language instalation. However, the lang files of discus have original english commented, I only need to know what to uncomment
Title: Re: Anyone ever convert from discusware??
Post by: Sanhux on January 01, 2006, 02:09:06 PM
I noticed know that the script dont convert all members. Discus list about 900 members, and ony 286 are in new smf list
Title: Re: Anyone ever convert from discusware??
Post by: wing on January 01, 2006, 02:10:12 PM
Is this the same in your version?
In my script I have this:
// look for this for each topic<!--Top:
           if (strstr($Scanline, "<!--Param: MessagesAdd-->")) {
That is looking for the top of the file and the messages

It also looks for <!--Post:

Maybe show me your website I can see what is going on.

It will only convert members in the flat file, unless it is hitting an error that should work no problem......  Do you have a sql database for your discus?  This will not work with the database.
Title: Re: Anyone ever convert from discusware??
Post by: Sanhux on January 01, 2006, 02:22:53 PM
Hello

My discus is in http://consciencia.org/cgi-bin/forum/discus.cgi and My smf in http://consciencia.org/smf


I have a Mysql database for discus, but I toggle it off in discus admin interface

I commented a line in the script //$converting_name = 'YaBB'; and rerun. The output stands below

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 /var/www/vhosts/consciencia.org/htdocs/smf/discus.php on line 997
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/consciencia.org/htdocs/smf/discus.php on line 1006successful.
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.
Title: Re: Anyone ever convert from discusware??
Post by: wing on January 01, 2006, 02:39:01 PM
Looks like it worked mostly .... I'll look at it in a bit I have a serious issue with RC2 here..... What's on line 997?
Title: Re: Anyone ever convert from discusware??
Post by: wing on January 01, 2006, 03:23:01 PM
I think your problem is the depth of your topics.

I wrote the tool to work with my board, someone else was able to get it to work with the depth, it's easy enough you just have to look at the recursive part where it looks for Top

My site didn't have topics inside of topics inside of topics like yours.  It had 1 flat system with posts inside of topics only..... :-\

The only tricky thing I had was the archive stuff.

Also even if you unclick the database option, you must have all your user files etc in the flat file system.
Title: Re: Anyone ever convert from discusware??
Post by: Sanhux on January 01, 2006, 03:50:47 PM
Ooops, what now?

I could import all users ! I use the function export in admin of discus and then it wrote everything to flat and the script converts well. The problems are in the posts now. Not well converted. Any suggestion?

Im start to reconsider discus as not so bad after all. Its a good script =)
Title: Re: Anyone ever convert from discusware??
Post by: wing on January 01, 2006, 04:03:57 PM
Well if all the users are there.  You are almost there......

Discus is horrible, my site had 90,000 posts and 3000 users and it was taking 2.5 gigs of space.  With SMF I'm using 300 meg with double those counts!
Title: Re: Anyone ever convert from discusware??
Post by: Sanhux on January 01, 2006, 04:42:24 PM
Hi

I noticed that msg_index directory inside discus_admin have an tree txt file for each of the major topic .Maybe this would help about the topics depth.

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/consciencia.org/htdocs/smf/discus.php on line 997
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/consciencia.org/htdocs/smf/discus.php on line 1006

line 997: while ($row = mysql_fetch_assoc($result))
line 1006: if (mysql_num_rows($result) < 150)
Title: Re: Anyone ever convert from discusware??
Post by: wing on January 01, 2006, 04:50:48 PM
Is your smf database empty when you start this?  IE, clean install?

Title: Re: Anyone ever convert from discusware??
Post by: Sanhux on January 01, 2006, 04:57:27 PM
I think is not, because I am running and rerunning the script for test. But I started with a clean install. However a mark the box  Clear current SMF posts and members during conversion. when running the script. In the first times that I run this error do not occur
Title: Re: Anyone ever convert from discusware??
Post by: wing on January 01, 2006, 05:02:10 PM
Yes, I would start over, it creates tables this could be a problem.

Just to rule it out, now that you have solved some other issues, I would try a fresh database install of smf.
Title: Re: Anyone ever convert from discusware??
Post by: Sanhux on January 01, 2006, 05:23:43 PM
Ok, I reinstall SMF and script output point no errors: all successfull. The user data seem to be right.

However the main problem continues: the posts are not correct. The topic pages looks strange with op bgcolor="#ffffff"> as a title and in the messages pages the message are on a left frame, and it have broke html once more. I could stop this by turning to default skin theme once, now I am with a default table3 skin, my usual sking is a customized tables4.
Title: Re: Anyone ever convert from discusware??
Post by: wing on January 01, 2006, 06:07:59 PM
Oh I'm wondering if it is reading the lines incorrectly for the topic data....

Because it is all HTML all the tables have to line up etc.

I'll have to look at it again, I'm sure it is something simple.
Title: Re: Anyone ever convert from discusware??
Post by: wing on January 01, 2006, 06:17:07 PM
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.

Title: Re: Anyone ever convert from discusware??
Post by: Sanhux on January 01, 2006, 06:30:48 PM
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.

Title: Re: Anyone ever convert from discusware??
Post by: wing on January 02, 2006, 10:54:39 AM
I think I can fix this for you...... 
Title: Re: Anyone ever convert from discusware??
Post by: wing on January 02, 2006, 11:33:07 AM
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
Title: Re: Anyone ever convert from discusware??
Post by: Sanhux on January 02, 2006, 01:26:33 PM
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.
Title: Re: Anyone ever convert from discusware??
Post by: wing on January 02, 2006, 01:40:33 PM
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
Title: Re: Anyone ever convert from discusware??
Post by: Sanhux on January 02, 2006, 01:51:13 PM
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.
Title: Re: Anyone ever convert from discusware??
Post by: Sanhux on January 02, 2006, 01:58:21 PM
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>
Title: Re: Anyone ever convert from discusware??
Post by: Sanhux on January 04, 2006, 01:19:11 AM
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.

Title: Re: Anyone ever convert from discusware??
Post by: wing on January 04, 2006, 07:32:30 AM
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
Title: Re: Anyone ever convert from discusware??
Post by: jaycrowe on February 07, 2006, 11:40:42 PM
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)...  www.jaycrowe.com (http://www.jaycrowe.com)

(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

:-[
Title: Re: Anyone ever convert from discusware??
Post by: wing on February 08, 2006, 09:52:36 PM
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.
Title: Re: Anyone ever convert from discusware??
Post by: jaycrowe on February 11, 2006, 11:07:04 PM
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:  www.jaycrowe.com/discus
SMF:  www.jaycrowe.com/smf

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
Title: Re: Anyone ever convert from discusware??
Post by: wing on February 14, 2006, 08:51:56 AM
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!
Title: Re: Anyone ever convert from discusware??
Post by: akolar on October 19, 2006, 12:51:05 PM
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?
Title: Re: Anyone ever convert from discusware??
Post by: Oldiesmann on October 20, 2006, 10:16:11 AM
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.
Title: Re: Anyone ever convert from discusware??
Post by: akolar on October 20, 2006, 12:10:21 PM
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.
Title: Re: Anyone ever convert from discusware??
Post by: Oldiesmann on October 20, 2006, 02:16:43 PM
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.
Title: Re: Anyone ever convert from discusware??
Post by: akolar on October 20, 2006, 02:25:20 PM
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?
Title: Re: Anyone ever convert from discusware??
Post by: akolar on October 20, 2006, 03:56:59 PM
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.
Title: Re: Anyone ever convert from discusware??
Post by: Oldiesmann on October 21, 2006, 02:20:08 PM
Glad I was able to help. I'll try to get someone to make an official 1.1 converter based on that one since it works well :)
Title: Re: Anyone ever convert from discusware??
Post by: akolar on October 22, 2006, 05:27:52 AM
I'm gonna be converting a larger site this week (the one I was really going to convert anyway). I think it makes sense to hold our breath until I am sure it works well - or at least to be perfectly sure under which conditions it works well.

I did encounter a few errors with the test site when I tried to do a bulk conversion. Since I didn't have the time to go into details I can't be sure if it was user or converter error.

Will post back soon. Thanks for your effort so far. It would be great to have an official release converter.
Title: Re: Anyone ever convert from discusware??
Post by: akolar on October 28, 2006, 11:06:54 PM
// Entire post deleted by author because it was completely:
// . misleading
// . wrong
Title: Re: Anyone ever convert from discusware??
Post by: akolar on October 31, 2006, 05:17:14 AM
I'm sorry for any confusion I created with my previous post. I deleted it rather than to keep it as reference, it was so badly off topic.

I answered my question a few posts back. The result is:
1. I was able to convert my Discus Forum to SMF 1.0.8 forum without errors using discus_to_smf_10.php
2. I could not convert the whole forum at once, I had to split the tree.txt into sections, then it worked
3. Admin user gets lost after conversion and I had to create a new admin through PHPmyAdmin to be able to login into the backend and make the final modifications.

Anyone who can help with the final tweaks, please PM me - I'm happy to help release a stable converter from Discus.
Title: Re: Anyone ever convert from discusware??
Post by: Oscar on November 13, 2006, 01:17:50 PM
I just converted a test board Discus 4.00.9. The script worked well, but I really do not understand how to change SMF's LogInOut.php to allow the old passwords to work.  From Wings' post:

// Old style encryption... now's the only time to fix it.
if ($user_settings['passwd'] == crypt($_REQUEST['passwrd'], substr($user_settings['passwrd'], 0, 2)) || $user_settings['passwd'] == md5($_REQUEST['passwrd']))
{
updateMemberData($user_settings['ID_MEMBER'], array('passwd' => '\'' . $md5_passwrd . '\''));
$user_settings['passwd'] = $md5_passwrd;
}

This is the section wings post points me to, but changing $_REQUEST to $user_settings gets me to the "password reminder" screen, as before.

Also, not sure how to "... in the login.template of SMF you have to change the login code to accept the salt as the first 2 chars from the database password rather than the inputted password."

I think I need hand-holding. I welcome suggestions to resolve the password issues.
Thanks,
Oscar
Title: Re: Anyone ever convert from discusware??
Post by: Oscar on November 13, 2006, 04:09:35 PM
I was mistaken ::). Conversion moved all of the user names, but hosed the passwords. The main topics/categories were moved, but all of the posts seem to have been dropped into the SMF topics count, but the content of the posts were lost. (Shows 0 posts.)
So, the conversion seem to be a bust overall.  :(   Conversion Log below...

Any help would be appreciated.


Oscar

log:
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 /home/hm7468/public_html/ibanezworld/smf.php on line 997

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/hm7468/public_html/ibanezworld/smf.php on line 1006
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.
Title: Re: Anyone ever convert from discusware??
Post by: akolar on November 14, 2006, 06:06:34 AM
Not sure if this helps, but being now an SMF user instead of Discus i can only reccommend you do anything at all within your power to convert. Life is good afterwards.

1. Passwords are indeed (mostly) not converted, but there is password recovery option in SMF which works well. I'm sure your users will understand. Post count is lost. I have changed mine and change it for those who ask me to.

2. You must absolutely make sure that no topic has a subtopic. I have moved all of the posts to a new topic to be sure of that.

3. For me - I had to do split the tree.txt into a few smaller chunks to make the conversion successfully.  Each separately converted OK while all at once did not.

HTH
Title: Re: Anyone ever convert from discusware??
Post by: Oscar on November 14, 2006, 09:19:45 AM
Thanks akolar.

I have many posts, I think I should break-up the tree.txt file, but I do not know how. If I wanted to take the top layer of the board off and move all of the sub-topics up to the top level, would that be possible?

tree.txt

0 15 15 0 Effects SublistCreateAbout 428 1162046602 146 Michaelkaufman
0 11 11 0 Acoustic+Guitars SublistCreateAbout 1297 1163086171 301 Bobzilla
0 12 12 0 Vintage+%26amp%3b+Custom+Electrics SublistCreateAbout 15682 1163095752 1686 Bobzilla
0 13 13 0 Replicas SublistCreateAbout 3812 1163100479 503 Mrbluesman126
0 14 14 0 Cool+Contemporary+Electrics SublistCreateAbout 6741 1163072603 1037 Gemberbier
0 16 16 0 Hollow+%26amp%3b+Semi%2dHollow+Body+Guitars SublistCreateAbout 4423 1155931674 592 Guitartim
0 17 17 0 Miscellaneous SublistCreateAboutMessages 6075 1162841873 698 Johns
0 21 21 0 Free+Classifieds SublistCreateAboutAnnouncement 3390 1163086933 1186 Bobzilla
0 2502 2502 0 Account+Holders+Test+Area SublistCreateAbout 796 icon=tree_n;hidden=0 1163434288 274 Oscar
0 2632 2632 0 Jeff%26%2339%3bs+Black+Hole SublistCreateAbout 258 1152369962 48 Johns
0 5751 5751 0 Captain+Ibanez+%2d+Defender+of+Truth%21 SublistCreateAbout 1970 1163089665 283 Canadianbluespower
0 6484 6484 0 Jim+Donahue+Answers+Your+Questions%2e SublistCreateAbout 826 1162311851 172 Mike80sguy
0 652 652 0 Bass SublistCreateAbout 1150 1163047681 265 Pinoybaho
0 8912 8912 0 The+Back+Room Sublist 0 icon=tree_n;hidden=1 0 1
0 13674 13674 0 ICW+Hall+of+Fame AnnounceSublistCreateAbout 19 1162776409 3 Admin
0 16978 16978 0 The+Player%26%2339%3bs+Lounge SublistCreate 142 icon=tree_n;hidden=0 1162939759 15 Sixvsix
Title: Re: Anyone ever convert from discusware??
Post by: akolar on November 14, 2006, 11:15:09 AM
Breaking up the tree.txt is simply making a copy of the tree.txt with a subselection of the lines. Each line is one Topic. Make sure you keep a copy of the original. Each time you do the migration you use a new tree.txt with a new subselection.

Note that if you keep the same users.txt your users will be imported twice (if you do the tree.txt in two steps). To avoid that I did one import with users.txt, then created an empty users.txt file and did subsequent imports with an empty users.txt.

Most important of all is that your topic does not have subtopics. I made sure of that so that I created new topics in Discus (I named them "topic-subtopic"). I then moved all posts from the old to the new location, then made the migration to SMF. That did the trick.
Title: Re: Anyone ever convert from discusware??
Post by: Oscar on November 14, 2006, 12:48:01 PM
I am not clear on how to restructure the Discus topics. At the moment there are 16 topics. Each of these have many sub-topics, with many more posts to each sub-topic.

I do not understand how to move the topics in Discus or SMF. Also, if I move the topics, is there a way to regroup them in SMF?

Thanks
Title: Re: Anyone ever convert from discusware??
Post by: akolar on November 14, 2006, 12:55:06 PM
Moving, de-grouping and re-grouping topics is easy in both forums. RTFM.
Title: Re: Anyone ever convert from discusware??
Post by: Oscar on November 15, 2006, 11:18:52 AM
I have been experimenting with manual edits of the tree.txt file.

The converter seems to work a little more soothly when it processes only one line at a time:

0 11 11 0 Acoustic+Guitars SublistCreateAbout 1297 1163086171 301 Bobzilla


The trouble I am now having with this, is that there are no subjects in SMF.  (I have the classic theme enabled.)
Title: Re: Anyone ever convert from discusware??
Post by: wing on December 11, 2006, 08:57:57 PM
Wow sorry, guys I didn't know anyone was actually still using Discus  :-X

I wrote this in haste to get my site working and once Discus was gone from my life I hid the dark secret away in the closet... oh man that was a pain.  I helped someone else convert as well though.  The converter is loosely (VERY loosely) based off of a typical database conversion but I had to write A LOT of code to read the HTML and parse it since Discus was based completely off of HTML.  Therefore you must use the proper theme for it to work as it expects certain items in certain places.

The passwords should work, all of my passwords worked after conversion.  The post counts were not lost for me after conversion as well.  I converted from Discusware 3 I believe to SMF 1.0.6  So that is what it is based off of.

I'll try to keep an eye out here more often, I'll help as much as I can.  When I wrote the tool I was a NooB to PHP so a lot of that code is probably pretty bad, but it got my fairly large board up and running in SMF.  You will have to split the Tree.  I was able to convert a few times with smaller boards no problem but the larger board causes time-out issues that I could never understand.  I had one of the SMF developers try to aid me but it was of no use, splitting the tree.txt was the simplest solution.  Also remember when you split the tree.txt file and run the subsequent upgrades you have to remember to check that box on the first screen or you lose everything you did before, you only want to convert the forums not the users and such on the second pass.

Oh also I remember that you need to run the SMF count fixes to get all the post counts correct.  You'll run into a little pain with this converter, it is not very polished but it works!
Title: Re: Anyone ever convert from discusware??
Post by: jomaco1 on January 27, 2007, 11:11:19 PM
I have a discus board I'm trying to convert and not having any luck. I can't get the script to run; the page just refreshes with this message at the top:
QuoteUnable to find the settings for Discus. Please double check the path and try again.
I have tried multiple variations of the path, but it seems it should work with /home/********/public_html/cgi-bin/discus

My discus board is setup to use mysql tables and I have tried running the script using different versions of SMF, but nothing seems to make any difference. :(

Any help will be greatly appreciated.
Title: Re: Anyone ever convert from discusware??
Post by: joejackson on April 13, 2007, 06:16:21 AM
I'd love to be able to use this convertor, but I can't for the life of me find LogInOut.php in Discus. Perhaps this file has been replaced by something else since 2005 ?
Title: Re: Anyone ever convert from discusware??
Post by: jomaco1 on July 16, 2007, 12:27:07 PM
Joe,

Have you had any luck converting your board? I'm still running my Discus board but would love to be able to convert. I have too much good information posted to start over again; so conversion is my only option.  ::)
Title: Re: Anyone ever convert from discusware??
Post by: wing on October 05, 2007, 10:56:53 PM
Hi guys, the discus converter was never written to work with mysql it was written to work with the old flat file system.
Title: Re: Anyone ever convert from discusware??
Post by: joejackson on December 05, 2007, 04:15:01 PM
Apologies for not replying - notification didn't seem to send me anything.
I haven't been able to convert discus - has anyone else?
Title: Re: Anyone ever convert from discusware??
Post by: jomaco1 on December 16, 2007, 07:26:44 PM
No...I've started to look at other boards hoping they might have a conversion script. If I can convert it to something like phpBB then maybe I can finally get it converted to SMF.
Title: Re: Anyone ever convert from discusware??
Post by: rv65 on June 20, 2010, 04:44:55 AM
Sorry for bumping this topic but does this converter work with v1.1.
Title: Re: Anyone ever convert from discusware??
Post by: xseoer on June 26, 2010, 02:31:44 AM
Quote from: wing on June 03, 2005, 03:10:04 PM

Well not mine yet, but I can dream right?  ;)
Hi,
unfortunately I'm having the same problem.
Title: Re: Anyone ever convert from discusware??
Post by: Randem on September 15, 2015, 05:08:21 PM
Old post I know but people are still searching for answers - http://www.simplemachines.org/community/index.php?topic=513910.0