Simple Machines Community Forum

SMF Support => Converting to SMF => Topic started by: NoRad on August 20, 2004, 01:35:27 AM

Title: Snitz 3.4.03 to SMF
Post by: NoRad on August 20, 2004, 01:35:27 AM
I'm interested in converting Snitz 3.4.03 to the latest version of SMF. I have several custom add-ons, but if I can get at least the most important things (members, topics) then I should be ok. Here is a link I found of a script that converts Snitz 3.4.03 to PHPBB 2.0.6 that might be a good starting point on writing a converter for SMF since it references names of Snitz tables.

http://mraluca.go.ro/snitz2phpbb2.htm

Any help would be greatly appreciated. I'm an experienced ASP programmer trying to learn more about PHP. Thahnks!
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 20, 2004, 02:25:03 AM
I just installed SMF 1.0 RC1 and I'm totally in love. This is the best forum I've ever worked with. I am wondering if I should hold off on setting everything up if I'm going to be importing stuff from another forum?
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 20, 2004, 06:28:52 AM
BTW, my user passwords are encrypted using SHA256. Is there a way to integrate that feature with SMF so that we don't lose them?
Title: Re: Snitz 3.4.03 to SMF
Post by: Tony Reid on August 20, 2004, 06:30:27 AM
Here is a converter for phbb2 to SMF - you can use that after you have converted snitz to phbb :)

http://www.simplemachines.org/download.php?converters
Title: Re: Snitz 3.4.03 to SMF
Post by: [Unknown] on August 20, 2004, 06:40:09 AM
SMF only runs on MySQL; I assume Snitz uses MS SQL, no?

Does the phpBB converter handle this as well?  Or does it not move to MySQL?

-[Unknown]
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 20, 2004, 06:40:41 AM
I was thinking about trying that... I wonder if I could just compare the two scripts and eliminate PHPBB in the middle?
Title: Re: Snitz 3.4.03 to SMF
Post by: Tony Reid on August 20, 2004, 06:41:51 AM
I assumed that he could convert Snitz to phpbb and then convert phpbb to SMF using the SMF converter.
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 20, 2004, 06:42:13 AM
Quote from: Radianation on August 20, 2004, 06:40:41 AM
I was thinking about trying that... I wonder if I could just compare the two scripts and eliminate PHPBB in the middle?

Snitz wasn't bad in the sense that it worked with msSQL, mySQL, and even Access. I just converted eveyrthing from msSQL to mySQL using a 3rd party program. Forums are running fine. So at least that part is good to go.
Title: Re: Snitz 3.4.03 to SMF
Post by: [Unknown] on August 20, 2004, 06:44:17 AM
Quote from: Radianation on August 20, 2004, 06:42:13 AM
Quote from: Radianation on August 20, 2004, 06:40:41 AM
I was thinking about trying that... I wonder if I could just compare the two scripts and eliminate PHPBB in the middle?

Snitz wasn't bad in the sense that it worked with msSQL, mySQL, and even Access. I just converted eveyrthing from msSQL to mySQL using a 3rd party program. Forums are running fine. So at least that part is good to go.

I would suggest, then, trying out the phpBB route - at least for now.

I will investigate the possibility of us creating a Snitz converter (and it is on the list of ones we would like to make...) but, it won't be done overnight.

-[Unknown]
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 20, 2004, 06:45:30 AM
FYI

http://www.louipimps.com/forum <- existing snitz forum
http://www.mindsexit.com <- temp SMF forum (staging site)
Once I get them converted I'll swap the staging site over.

I would be happy to help with the snitz conversion. I've been running it for several years and know it very well. My problem is PHP. I'm still learning... I'll see what I can come up with over the next few days.
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 20, 2004, 07:12:48 AM
Ok, this worked. It took me about 15 minutes to convert from snitz 3.4.03 -> phpbb2 -> smf

I have one rather complex problem... My passwords are encrypted using SHA256. Is there a way to implement this as the default password encryption for SMF? Maybe there is a way to reset the passwords next time somebody logs in? A lot of people have out dated emails or the server email gets lost in spam. I would hate to lose users this way.

Thanks!
Title: Re: Snitz 3.4.03 to SMF
Post by: [Unknown] on August 20, 2004, 07:20:33 AM
It could, if you have mhash... do you know if PHP has mhash support compiled in? (you can ask your host..)

-[Unknown]
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 20, 2004, 07:29:29 AM
I run my own server (actually, my own server colocation room). I can install or run anything required as long as it does not conflict with other applications. What is mhash? A com object or something?
Title: Re: Snitz 3.4.03 to SMF
Post by: Tony Reid on August 20, 2004, 07:40:46 AM
Sorry to but in - but I jsut gotta say it....... The snitz calendar rocks!
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 20, 2004, 07:42:24 AM
Quote from: Tony on August 20, 2004, 07:40:46 AM
Sorry to but in - but I jsut gotta say it....... The snitz calendar rocks!

That was an addon that I had to code into it. I tweaked it a bit to make it look nicer.
Title: Re: Snitz 3.4.03 to SMF
Post by: [Unknown] on August 20, 2004, 07:42:47 AM
No, actually, mhash is a module.  Are you running on a Windows or Linux server?

Under Windows, you have to edit php.ini and add the php_mhash.dll line... as well as make sure the extensions_dir is right.

On Linux, you have to configure it with --with-mhash.

This will make it possible, but then you will need to modify a piece of code in LogInOut.php.

-[Unknown]
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 20, 2004, 07:47:56 AM
ok, I can handle all of this. Could you assist me with what code needs to be modified? Also, I've noticed that my forum now lists topics with 0 replies first. This was explained as an issue in the snitz -> phpbb document. Any ideas?

I tested it on my gaming forum before I did it on my main site.

http://www.thesilents.org/forum
http://www.thesilents.org/smf <-- you can see here what's happening, but it worked. =)

Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 20, 2004, 07:56:23 AM
Or so I thought...

In my php.ini t looks like this:
;extension=php_mhash.dll

I uncomment it and then when I load a php file it hangs.

so I tried to change it to this:
extension=extensions\php_mhash.dll

same thing. I think it's having trouble finding the extensions folder. My setup is like this:

c:\php\extensions\php_mhash.dll
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 20, 2004, 02:54:07 PM
I started a new thread in the coding section for this.

http://support.simplemachines.org/community/index.php?topic=15551.0
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 20, 2004, 09:45:16 PM
Uh oh - bigger problem than I thought.

The posts are all out of order. For example, what used to be the initial post is now like reply #8, and one of the replies is now the initial post. It almost reads backwards otherwise. Any ideas? I bet this happened during the snitz -> phpbb2 conversion.
Title: Re: Snitz 3.4.03 to SMF
Post by: [Unknown] on August 20, 2004, 10:43:47 PM
Sounds like you're going to need a resort... (they're not pretty, but they can be done...)

Try these two files.  Just put them in the smf directory and run them... and if they don't work, I guess you can always reconvert :/.  They were made way-back-when and haven't been tested lately :P.

-[Unknown]
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 20, 2004, 10:51:13 PM
Any specific order in which to run them?
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 20, 2004, 10:56:37 PM
The script appeared to resort the posts related to the topic, but now all of the topics are in the wrong forums with no apparent sorting.  :(
Title: Re: Snitz 3.4.03 to SMF
Post by: [Unknown] on August 20, 2004, 11:16:41 PM
Quote from: Radianation on August 20, 2004, 10:56:37 PM
The script appeared to resort the posts related to the topic, but now all of the topics are in the wrong forums with no apparent sorting.  :(

Hmm, that's worse isn't it :P?

Did you run both of them?  It should put them in order of post date, but they may or may not work with the current database structure totally well... I don't believe they do.  It was worth a shot :/.

-[Unknown]
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 21, 2004, 05:09:35 AM
Yeah, it was worth a shot. I bet they could be modified though.   ;D

I re-ran them after I posted this and I ended up losing like 1/2 of my posts. I'll just reconvert and see if I can't fix it somewhere between the Snitz / Phpbb2 steps.
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 21, 2004, 04:40:35 PM
Well, I think one of my first PHP projects is going to be writing  a converter for Snitz 3.4.03+ ->  SMF, assuming both are using mySQL. I'll let you know how the progress goes and submit it once I'm finished.
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 22, 2004, 03:36:39 AM
Hmmm... In the meantime, any quick fix for the ordering problem? This is what the Snitz -> PHPBB2 script says

Quote
The last problem
----------------

You will notice that the topics are not sorted in the right order, more
precisely, the topics with no replies will be on top. To fix this you
have to modify viewforum.php and replace this line:

ORDER BY t.topic_type DESC, t.topic_last_post_id DESC

with:

ORDER BY t.topic_type DESC, p2.post_time DESC
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 22, 2004, 04:29:01 AM
Somehow I need to re-sort all topics based on the most recent reply and topic post date. I don't appear to have dates set for the most recent replies when converting from snitz -> phpbb2 -> smf

Good news. The forum Maintenance fixed this problem. It found tons of errors on "bad first post" and fixed them, but now my replies are doing that weird thing again. The first post is last, but all the others are in order.  :-[


Here is an example of what I'm talking about:

http://www.thesilents.org/forum/index.php?topic=3493.0

Notice the last post *should* be the first one. It's like this on every thread AFAIK.
Title: Re: Snitz 3.4.03 to SMF
Post by: Grudge on August 22, 2004, 06:18:25 AM
I have a suspecion that the repair_ID_TOPIC file I wrote may be dodgy... I'll try check it out today.

Also... I would recommend running the converter again and NOT running any of the repair files until I look over them.

EDIT: Or if you only ran the repair files ONCE just renamed old_topics table to topics...
Title: Re: Snitz 3.4.03 to SMF
Post by: Grudge on August 22, 2004, 06:24:11 AM
Grrr... think I found the bug in the repair file already! Try this one attached instead. Remember you need to restore the old topics table FIRST!
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 22, 2004, 07:06:56 AM
QuoteYou have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE ID_BOARD = 2' at line 3
File: C:\Inetpub\tsl\forum\repair_id_topic.php
Line: 131

Note: It appears that your database may require an upgrade. Your forum files are currently at version , whereas your database is at version SMF 1.0 RC1. It is recommended that you execute the latest version of upgrade.php.

I renamed smf_topic to smf_topic_broken and also renamed smf_topic_old to smf_topic

Now I get the above message...
Title: Re: Snitz 3.4.03 to SMF
Post by: Grudge on August 22, 2004, 07:26:36 AM
Do you have any boards that don't have any topics in them (i.e empty boards). If so that would explain the error. If not then I think we're in a little more trouble... If you do have any "empty" boards then running an error check will fix it.

If you don't, then I think you are unfortunatly going to have to run the converter from phpBB again (very sorry about this). I've tested the fixed repair_ID_TOPIC on my test board and it now seems to be OK so it shouldn't happen again hopefully...
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 22, 2004, 01:52:26 PM
Nope, empty boards. So is your file different than when I go through the forum_maintenance from the admin panel?
Title: Re: Snitz 3.4.03 to SMF
Post by: Grudge on August 22, 2004, 02:30:30 PM
Is that you "don't" have any empty boards?

The file I posted should be used instead of the one of the same name that Unknown had posted. It sorts the topics table by ID, but unlike the old one doesn't have a problem with it. Forum maintenance would only be needed if you had had an empty board - as the script error wouldn't have updated the boards table correctly...
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 22, 2004, 06:33:31 PM
Correct - I do not have any empty boards.

Your file might do what it's supposed to, but when I try to run it on my forum it seems to screw things up worse than they already are. Should I also run the message_ID fix with your new topic fix?

The forum maint fixes a lot of problems and creates new ones as well. It will find like 1,000 errors and "fix them"... Most of the errors say incorrect initial post (which sounds right), but then I think it gets confused on how to really fix it.

I sure wish I could write this converter directly from snitz to smf. I think I'm losing a lot of stuff in the phpbb2 conversion.
Title: Re: Snitz 3.4.03 to SMF
Post by: [Unknown] on August 22, 2004, 06:38:38 PM
I'm working on a direct converter, but it's pretty rough and I'm going to need you to test it.

-[Unknown]
Title: Re: Snitz 3.4.03 to SMF
Post by: [Unknown] on August 22, 2004, 09:25:27 PM
Okay, this is what I've got.  It should be as functional as the other converter, plus some.  You will still need to do "Recount all forum totals and statistics." and "Find and repair any errors." afterward, because it's not really 100% done, but it should get everything generally over.

It may or may not work... but it is a direct converter.  I can only guess at what needs to be done to the post text itself (probably a lot!) so bare with me.  And, I haven't been able to test it, so it may not even work at all.

Could you try this?  If you want to try it with a separate installation of SMF, and keep your current working, I'm happy with that... I just want to know if this is even working.

Thanks,
-[Unknown]
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 22, 2004, 10:04:59 PM
That was way faster than I expected. I'll test it tonight. I am doing all of this on a side project at the moment, so it's not having an impact on my community. Thank you so much.
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 23, 2004, 05:35:35 AM
First time through:
Quote
Converting...
Converting members... successful.
Converting categories... successful.
Converting boards...
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\Inetpub\tsl\smf\snitz_to_smf.php on line 478

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\Inetpub\tsl\smf\snitz_to_smf.php on line 488
successful.
Converting messages... (this may take some time) incomplete.
Not quite done yet!
This conversion has paused to avoid overloading your server, and hence not working properly.
Don't worry though, nothing's wrong - simply click the continue button below to start the converter from where it left off.


After clicking continue:
QuoteConverting...
Converting messages... (this may take some time) successful.
Converting topics... successful.
Recalculating forum statistics... successful.


After checking my forums, it looks like there are no posts and no members (it says it can't find my member name). Upon closer inspection of the database I can see that smf_members has all of the users listed, but it only has the membername for the first user (admin) and not for any other others. I think it's important to point out that Snitz has two membername-like fields in the database. The one I think you might have called from is if you use NT Authentication (rarely used). The correct field to pull from would be M_NAME instead of M_USERNAME ... I'm making that change now.

The forum Maintenance found this:
Quote
The following errors are fouling up your forum (blank if none):

Topic 17 contains no messages
Topic 18 contains no messages
Topic 24 contains no messages
Topic 34 contains no messages

etc...

Topic 8 has a bad first message: 0
Topic 8 has a bad last message: 0
Topic 16 has a bad first message: 0
Topic 16 has a bad last message: 0
Topic 17 has a bad first message: 0
Topic 17 has a bad last message: 0
Topic 17 has a wrong number of replies: 0

etc...

Topic 1116 does not have a matching board (Board 2).
Topic 1264 does not have a matching board (Board 2).
Topic 1792 does not have a matching board (Board 2).
Topic 2065 does not have a matching board (Board 2).
Topic 2117 does not have a matching board (Board 2).
Topic 2158 does not have a matching board (Board 2).
Topic 2285 does not have a matching board (Board 2).
Topic 2313 does not have a matching board (Board 2).
Topic 2337 does not have a matching board (Board 2).
Topic 2338 does not have a matching board (Board 2).
Topic 2343 does not have a matching board (Board 2).
Topic 2347 does not have a matching board (Board 2).
Topic 2348 does not have a matching board (Board 2).
Topic 2356 does not have a matching board (Board 2).
Topic 2370 does not have a matching board (Board 2).
Topic 2372 does not have a matching board (Board 2).
Topic 2373 does not have a matching board (Board 2).
Topic 2379 does not have a matching board (Board 2).
Topic 2380 does not have a matching board (Board 2).
Topic 2381 does not have a matching board (Board 2).
Topic 2384 does not have a matching board (Board 2).
Topic 2386 does not have a matching board (Board 2).
Topic 2391 does not have a matching board (Board 2).
Topic 2396 does not have a matching board (Board 2).
Topic 2402 does not have a matching board (Board 2).
Topic 2413 does not have a matching board (Board 2).
Topic 2418 does not have a matching board (Board 2).
Topic 2421 does not have a matching board (Board 2).
Topic 2424 does not have a matching board (Board 2).
Topic 2437 does not have a matching board (Board 2).
Topic 2449 does not have a matching board (Board 2).
Topic 2456 does not have a matching board (Board 2).
Topic 2466 does not have a matching board (Board 2).
Topic 2471 does not have a matching board (Board 2).
Topic 2472 does not have a matching board (Board 2).
Topic 2477 does not have a matching board (Board 2).
Topic 2478 does not have a matching board (Board 2).
Topic 2482 does not have a matching board (Board 2).
Topic 2494 does not have a matching board (Board 2).
Topic 2497 does not have a matching board (Board 2).
Topic 2516 does not have a matching board (Board 2).
Topic 2521 does not have a matching board (Board 2).
Topic 2526 does not have a matching board (Board 2).
Topic 2530 does not have a matching board (Board 2).
Topic 2535 does not have a matching board (Board 2).
Topic 2537 does not have a matching board (Board 2).
Topic 2538 does not have a matching board (Board 2).

etc...


After that the results were:
Quote
130 topic(s) without messages have been removed successfully
Successfully inserted salvaged messages in salvage category
Successfully inserted salvaged messages in salvage category
Successfully inserted salvaged messages in salvage category
Successfully inserted salvaged messages in salvage category
Successfully inserted salvaged messages in salvage category
Successfully inserted salvaged messages in salvage category
Successfully inserted salvaged messages in salvage category
Successfully inserted salvaged messages in salvage category
Successfully inserted salvaged messages in salvage category
Successfully inserted salvaged messages in salvage category
Successfully inserted salvaged messages in salvage category
Successfully inserted salvaged messages in salvage category

All errors fixed! You will want to check on any created categories, boards, or topics to decide what to do with them.

Now I have 13 "Salvaged" boards. My original forum only had 12. It looks like one or more might also be empty now, but it shouldn't be that way.
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 23, 2004, 05:40:24 AM
A few more comments.

The topics don't list a "started by" (it's blank) - This is probably because of the M_NAME / M_USERNAME issue in the previous post.

Good news, the posts are in the correct order !!!


line 201:       'memberName' => 'M_USERNAME',
This should be M_NAME


line 207:      'realName' => 'M_USERNAME',
This should be M_FIRSTNAME + M_LASTNAME from Snitz.

Other fields of interest:
M_AVATAR_URL (if they have avatar mod) will be a URL (relative or absolute, depending on how they set it up. Mine is relative).
M_DOB and/or M_AGE (I use M_DOB. ie. 19780605 would be my bday).
M_SEX (male/female)
M_LEVEL (3 = admin, 2 = moderator, 1 = normal user)
M_QUOTE (this could = personal text)


// *** SMF column => other forum's column. ************************************
$members_table = array(
'ID_MEMBER' => 'MEMBER_ID',
'memberName' => 'M_NAME',
'dateRegistered' => 'UNIX_TIMESTAMP(M_DATE)',
'posts' => 'M_POSTS',
'ID_GROUP' => '',
'lngfile' => '',
'lastLogin' => 'UNIX_TIMESTAMP(M_LASTHEREDATE)',
'realName' => 'M_NAME',
'instantMessages' => '',
'unreadMessages' => '',
'im_ignore_list' => '',
'passwd' => 'M_PASSWORD',
'emailAddress' => 'M_EMAIL',
'personalText' => 'M_QUOTE',
'gender' => 'M_SEX',
'birthdate' => 'M_DOB',
'websiteTitle' => 'M_HOMEPAGE',
'websiteUrl' => 'M_HOMEPAGE',
'location' => 'M_COUNTRY',
'ICQ' => 'M_ICQ',
'AIM' => 'M_AIM',
'YIM' => 'M_YAHOO',
'MSN' => 'M_MSN',
'hideEmail' => '',
'showOnline' => '',
'timeFormat' => '',
'signature' => 'M_SIG',
'timeOffset' => '',
'avatar' => 'M_AVATAR_URL',
'im_email_notify' => '',
'karmaBad' => '',
'karmaGood' => '',
'usertitle' => '',
'notifyAnnouncements' => '',
'secretQuestion' => '',
'secretAnswer' => '',
'additionalGroups' => '',
);
// ****************************************************************************
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 23, 2004, 07:07:49 AM
Not sure if you're taking it into consideration, but Snitz has 2 tables for archived data.

FORUM_A_REPLY
FORUM_A_TOPIC


Is there a way to quickly get all the table structures so you can see them? I am wondering if you're referencing the snitz -> phpbb2 converter that I posted in order to get the field names, but I think that they left out a lot of things that can easily be imported to SMF making it a more complete migration.

My modifications to the member table appear to have worked. We might need to check certain fields (like M_AVATAR_URL) to see if they exist before trying to get data from them. If it's a stock Snitz install (rare to find) they won't have that field.

Also, do you think it would be useful to transfer private messages? I can give you those fields as well (different tables). How do you currently track events?

FORUM_TOPIC has some fields:
T_ISEVENT (1/0)
T_EVENTDATE (date of the event)

Also

T_ISPOLL
T_POLLSTATUS

-----


I think that       'ID_MEMBER_UPDATED' => 'T_LAST_POSTER', is wrong

T_LAST_POSTER is empty in my tables. Looks like they use: T_LAST_POST_AUTHOR and T_LAST_POST_REPLY_ID
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 23, 2004, 07:44:30 AM

// *** SMF column => other forum's column. ************************************
$topics_table = array(
'ID_TOPIC' => 'TOPIC_ID',
'isSticky' => 'T_STICKY',
'ID_BOARD' => 'FORUM_ID',
'ID_FIRST_MSG' => '',
'ID_LAST_MSG' => 'T_LAST_POST_REPLY_ID',
'ID_MEMBER_STARTED' => 'T_AUTHOR',
'ID_MEMBER_UPDATED' => 'T_LAST_POST_AUTHOR',
'ID_POLL' => '',
'numReplies' => 'T_REPLIES',
'numViews' => 'T_VIEW_COUNT',
'locked' => 'T_STATUS',
);
// ****************************************************************************


I'm not 100% sure on T_LAST_POST_REPLY_ID
Also, T_STATUS on my forum reports 1 for active and 0 for locked. This might not be the same value for SMF. It did not appear to make a difference after the conversion. Everything else worked though. Still getting errors on 478 and 488 I think.
Title: Re: Snitz 3.4.03 to SMF
Post by: [Unknown] on August 24, 2004, 03:23:06 AM
Quote from: Radianation on August 23, 2004, 07:07:49 AM
Not sure if you're taking it into consideration, but Snitz has 2 tables for archived data.

FORUM_A_REPLY
FORUM_A_TOPIC

Currently, I'm not.... for a first version, this actually went pretty well I'd like to think.

QuoteIs there a way to quickly get all the table structures so you can see them? I am wondering if you're referencing the snitz -> phpbb2 converter that I posted in order to get the field names, but I think that they left out a lot of things that can easily be imported to SMF making it a more complete migration.

I was able to look at them some, but yes I am referencing the phpBB one.... not sure what some of the fields are even for.

Oh, so there are polls?  Looks like this is going to have more room for improvement...

Actually, the converter is resorting so REPLY_ID is always going to be wrong.

I think I've fixed the board conversion error - can you try the attached, please?

-[Unknown]
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 24, 2004, 03:46:11 AM
No error message this time. Looks like it worked rather well. I had to run the forum_maint again and that fixed the problem. Prior to running that, I would click on a category and there would be no topics, but page #'s for more topics. Odd.

The POLLS in Snitz are another mod/add-on, so not everybody will have them.

http://www.thesilents.org/smf/index.php

You can view my forum. It's in working order. I'll keep the other one up until we're done testing the conversion script so that it won't bother my users. When we're 100% finished I'll switch it over to the live one.

---- Edit ----

We have a problem. The first post is repeated over and over after each reply.

http://www.thesilents.org/smf/index.php?topic=2241.0
Title: Re: Snitz 3.4.03 to SMF
Post by: [Unknown] on August 25, 2004, 01:47:23 AM
Quote from: Radianation on August 24, 2004, 03:46:11 AM
We have a problem. The first post is repeated over and over after each reply.

http://www.thesilents.org/smf/index.php?topic=2241.0

Okay, that's most certainly a problem... try this one.

-[Unknown]
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 25, 2004, 09:48:54 AM
You fixed that problem.

test / example here:
http://www.thesilents.org/smf/index.php?topic=3489.0

Ok, you should include in your script the changes I've made


// *** SMF column => other forum's column. ************************************
$members_table = array(
'ID_MEMBER' => 'MEMBER_ID',
'memberName' => 'M_NAME',
'dateRegistered' => 'UNIX_TIMESTAMP(M_DATE)',
'posts' => 'M_POSTS',
'ID_GROUP' => 'IF(M_LEVEL = 3, 1, 0)',
'lngfile' => '',
'lastLogin' => 'UNIX_TIMESTAMP(M_LASTHEREDATE)',
'realName' => 'M_NAME',
'instantMessages' => '',
'unreadMessages' => '',
'im_ignore_list' => '',
'passwd' => 'M_PASSWORD',
'emailAddress' => 'M_EMAIL',
'personalText' => 'M_QUOTE',
'gender' => 'M_SEX',
'birthdate' => 'M_DOB',
'websiteTitle' => 'M_HOMEPAGE',
'websiteUrl' => 'M_HOMEPAGE',
'location' => 'M_COUNTRY',
'ICQ' => 'M_ICQ',
'AIM' => 'M_AIM',
'YIM' => 'M_YAHOO',
'MSN' => 'M_MSN',
'hideEmail' => '',
'showOnline' => '',
'timeFormat' => '',
'signature' => 'M_SIG',
'timeOffset' => '',
'avatar' => 'M_AVATAR_URL',
'im_email_notify' => '',
'karmaBad' => '',
'karmaGood' => '',
'usertitle' => 'M_QUOTE',
'notifyAnnouncements' => '',
'secretQuestion' => '',
'secretAnswer' => '',
'additionalGroups' => '',
);
// ****************************************************************************


2 of those are possibly not on every install, so you'll want to check first.
1. M_DOB
2. M_AVATAR_URL
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 26, 2004, 05:24:36 AM
Do you still want to try and add the support for polls and other features? Let me know and I'll get all the detailed table references.
Title: Re: Snitz 3.4.03 to SMF
Post by: [Unknown] on August 26, 2004, 03:17:59 PM
For now, I'd rather not try for things that are not common in most distributions...

-[Unknown]
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 26, 2004, 04:37:30 PM
No problemo. I think you've done a fantastic job. Thank you so much for the help.
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 27, 2004, 05:40:45 PM
Well, I just ran a very simple test and I'm a little confused. Since I have a "mirrored" installation of Snitz and SMF I loaded the same page on both forums. Here are the load time results:

Snitz: This page was generated in 0.08 seconds.
SMF: Page created in 0.218 seconds with 15 queries.

So I optimized SMF:
Quote
Your database contains 110 tables.
Attempting to optimize your database...
Optimizing smf_collapsed_categories... 0.004883 kb optimized.
Optimizing smf_log_online... 0.140625 kb optimized.
Optimizing smf_members... 0.148438 kb optimized.
Optimizing smf_sessions... 17.335938 kb optimized.
Optimizing smf_topics... 4.189453 kb optimized.

5 table(s) optimized.

SMF: Page created in 0.212 seconds with 15 queries.

Unless Snitz is cheating on the generation time I'm at a complete loss. I thought SMF was (and should be) much faster? Does this have anything to do with running on IIS instead of Apache?
Title: Re: Snitz 3.4.03 to SMF
Post by: [Unknown] on August 27, 2004, 07:56:27 PM
The time may be measured differently. (or in other words they may be cheating :P.)  It can also depend on how your server and MySQL are configured.

What version of MySQL are you using?

-[Unknown]
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 30, 2004, 07:37:00 AM
mySQL 4.0.18
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on August 30, 2004, 04:49:45 PM
I have a lot of events I'd really like to convert. Interested in doing an add-on to convert event posts and/or polls? Something that can be run after-the-fact (like the attachment's converter).
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on September 01, 2004, 02:43:02 AM
http://www.thesilents.org/forum/index.php?board=2.0

If you check this out, I have a thread:
Hackers found on server « 1 2 »

That has replies to it which are most recent, but it doesn't want to move to the top. As far as I can tell, the other topics are not sticky and don't have more recent posts. It shows in the index the last post being mine made several days ago. Is this because it's sorting via LAST POST instead of LAST REPLY?
Title: Re: Snitz 3.4.03 to SMF
Post by: [Unknown] on September 01, 2004, 02:48:38 AM
Quote from: Radianation on August 30, 2004, 04:49:45 PM
I have a lot of events I'd really like to convert. Interested in doing an add-on to convert event posts and/or polls? Something that can be run after-the-fact (like the attachment's converter).

Well, it does at least work... perhaps after 1.0 is released. (sorry, not as much a priority now..)

Bored    Radianation    5    21    Yesterday at 08:52:27pm
Left arm hitbox..    WoooSaaaW    7    80    August 26, 2004, 04:27:08 pm
CS : Source « 1 2 3 4 »    Radianation    46    263    August 24, 2004, 08:04:52 pm
New: SERVER SCHEDULE    Radianation    8    79    August 20, 2004, 10:43:08 am
Annoying ass bastards    BISHOP    4    53    August 17, 2004, 05:34:19 pm
Hackers found on server « 1 2 »    SnipeZ    17    155    August 13, 2004, 03:51:34 pm

Looks to be in order of last post to me... try clicking this, maybe?

http://www.thesilents.org/forum/index.php?board=2.0;sort=last_post;desc

-[Unknown]
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on September 01, 2004, 03:07:12 AM
My mistake. It was a post in the child board.
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on September 01, 2004, 03:20:45 AM
Well, if anybody wants to assist with this... Here are the tables and how I think they match up.

smf_calendar

(Populate SMF_CALENDAR from Snitz table forum_topics)
ID_EVENT -> Auto Increment
eventDate -> T_EVENT_DATE
ID_BOARD -> FORUM_ID (might be CAT_ID instead. I'm not sure)
ID_TOPIC -> TOPIC_ID
title -> T_SUBJECT
ID_MEMBER -> T_AUTHOR


I think these are correct.
Title: Re: Snitz 3.4.03 to SMF
Post by: [Unknown] on September 01, 2004, 03:38:24 AM
INSERT INTO smf_calendar
   (eventDate, ID_BOARD, ID_TOPIC, title, ID_MEMBER)
SELECT T_EVENT_DATE, FORUM_ID, TOPIC_ID, T_SUBJECT, T_AUTHOR
FROM FORUM_TOPICS
WHERE IFNULL(T_EVENT_DATE, '0000-00-00') != '0000-00-00';

That's a guess on the WHERE clause, but you can get that I'm sure.

-[Unknown]
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on September 01, 2004, 04:49:07 AM
There is a field T_ISEVENT in the forum_topics that is either 1 or 0. If it's 1 then the topic is also an event. If it's 0 or blank then it's not. This would be a good way to check?
Title: Re: Snitz 3.4.03 to SMF
Post by: [Unknown] on September 01, 2004, 01:38:45 PM
INSERT INTO smf_calendar
   (eventDate, ID_BOARD, ID_TOPIC, title, ID_MEMBER)
SELECT T_EVENT_DATE, FORUM_ID, TOPIC_ID, T_SUBJECT, T_AUTHOR
FROM FORUM_TOPICS
WHERE T_ISEVENT;

That's a guess on the WHERE clause, but you can get that I'm sure.

-[Unknown]
Title: Re: Snitz 3.4.03 to SMF
Post by: NoRad on September 01, 2004, 03:37:40 PM
I'm pretty sure that worked. Thank you. I just ran it as SQL command.