Simple Machines Community Forum

SMF Support => Converting to SMF => Topic started by: Sanhux on July 06, 2005, 11:26:26 AM

Title: Discus 4 and 5 conversor
Post by: Sanhux on July 06, 2005, 11:26:26 AM
Hello

I'm looking for a discus 4 www.discusware.com convertor. There isnt any official. phpbb dont have one either. Discus is popular, someone could make this.

thanks
Title: Re: Discus 4 and 5 conversor
Post by: Owdy on July 06, 2005, 11:57:56 AM
http://www.simplemachines.org/community/index.php?topic=30945.0
Title: Re: Discus 4 and 5 conversor
Post by: wing on July 18, 2005, 05:43:31 PM
We talked about it here:

http://www.simplemachines.org/community/index.php?topic=37636.0

I'm still in the process of obtaining my website and then the database so that this can be done.
Title: Re: Discus 4 and 5 conversor
Post by: [Unknown] on July 18, 2005, 06:17:02 PM
I downloaded a demo from their site (Discus Freeware) and it looks very much like it is flatfile.  It can, however, use MySQL for less-important things:

http://support.discusware.com/manuals/admdoc40/dbmgr03.html

Unfortunately, this makes it much more complicated to right a converter.  There are also other flatfile softwares on my list - including YaBB 2, Cutecast, and others.  I'll probably try to write something designed to make it simpler to convert all of them more easily, but right now I haven't been able to come up with anything.

-[Unknown]
Title: Re: Discus 4 and 5 conversor
Post by: wing on July 19, 2005, 01:21:49 PM
Well that certainly is a bummer  :(

Although I will require this conversion, I'll have to wait to see what kind of format it is in, I haven't yet got the database file for it.

A flat file might be fairly easy to convert, just fill the MySQL tables from start to end for each file, I assume there is a delimeter for each post there has to be.  Where it might get complicated is when there are file attachments, but that can be sorted out I'm sure.

I was looking at the smf database I have yesterday and it seems fairly straight forward, except again for the attachments, I don't see how they get linked into the text of the post, since the file on the local drive is named differently from the attached file.
Title: Re: Discus 4 and 5 conversor
Post by: Grudge on July 19, 2005, 01:24:30 PM
If you're vaguely versed in PHP you may be able to adapt the yabb or e-blah converter to work on flat file I guess...
Title: Re: Discus 4 and 5 conversor
Post by: wing on July 19, 2005, 04:37:22 PM
Yup vaguely would be me, LOL.  I know how to program but just got a view of PHP a few weeks back (yes I've been living under a rock in the TCL world at work).

It might take me longer than a pro, but I'm sure I can figure something out.  Maybe just copy and paste the entire forum LOL j/k
Title: Re: Discus 4 and 5 conversor
Post by: wing on July 20, 2005, 04:34:56 PM
So I took a look at the dicussware system  :o  Does it ever SUCK!

It stores everything as HTML within a text file  :'(

So I can probably write come kind of parser for this, if someone can help me fill the fields in on the SMF side, I am not sure what I need to fill in.

Title: Re: Discus 4 and 5 conversor
Post by: Grudge on July 20, 2005, 07:02:36 PM
wing,

Are you sure that's not just a "cache" - it sounds like html would only be used for caching the data - the posts must be stored in a standard format I'm sure - there's no way a half decent software wouldn't keep stuff uncached :)
Title: Re: Discus 4 and 5 conversor
Post by: wing on July 21, 2005, 08:01:35 AM
Yep, pretty darn sure.  I can check again tonight but I'm 99.99% sure it's the way it is stored, I could not find the messages anywhere else.

There is no "Database"  It stores everything as HTML.

It creates a directory for each topic IE: Dir "1"  == "General Talk" and Dir "2" = "Specific Talk"

Then inside of each directory there is a file that corresponds with the directory name so "1.html" and "2.html"  The "1.html" file and the "2.html" contain links to each thread within that topic area.

Also within these directories are more files, each thread is an html file.  "3.html" for instance would be the first topic in General Talk, "4.html" would be the second topic.  And it's completely sequential, so "5.html" would be the 3rd topic ever created but if it was created under "Specific Talk" it would be in the "2" directory. 

This is all stored in the dicuss/data directory.  The only other directories are kind of like caches for searching, they store portions of the messages in another file for quicker searching.

Each HTML page is fairly easy to parse there is a <!--POST> at the start and <!--/POST> at the end of every post.  Within those tags there is all the  data IE: Text, User, Post #, Date etc etc etc.

I will post another topic incase you miss this as I have a few questions about what's really required for the SMF database.  I began writing a parser last night and it's not that complicated.

Title: Re: Discus 4 and 5 conversor
Post by: wing on August 01, 2005, 06:17:00 PM
I have hacked up a converter for discus.  It works on 2 of my databases I have tried, although it's not really plug and play, if someone want to use it, I can guide them if they have any issues.

Title: Re: Discus 4 and 5 conversor
Post by: george from ohio on August 02, 2005, 09:57:04 AM
Hi wondering if you could show me how to do this? I will need a convertor to make the new smf work. Could you guide me in this? Thanks
Title: Re: Discus 4 and 5 conversor
Post by: wing on August 02, 2005, 11:58:35 AM
Yup sure no problem. 

I'll have to write something up to guide people, the short version is:

Script assumes config.pl so if your database is configured to use .cgi just go in and change config.pl to config.cgi in the script.

The script only converts regular users, not admins.  It converts over all posts and archives as well as board topics.

When putting in the path to the discus directory you have to put in the path to the cgi-bin/discus directory and the script will figure out everything from there.  If you are not using the pro version with the post counts etc, you would have to comment out some of the stuff like where it reads the file us-accts.txt

Also, 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.

That's about all.

I'd attach the script but I don't have permission to, so send me an e-mail at [email protected] and I'll send it to you.
Title: Re: Discus 4 and 5 conversor
Post by: george from ohio on August 04, 2005, 08:20:14 AM
I got it thanks. I'm going to have to wait till i move the discus board over to the php server. Before I work this. Some features in the code are not present in discus 3.10. So what 'm going to do is upgrade to 4.1 before running the convert. Thats an extensive script.
This I assume will happen within the month.

Thanks again!