Advertisement:

Author Topic: Snitz 3.4.03 to SMF  (Read 63099 times)

Offline Radianation

  • Sophist Member
  • *****
  • Posts: 1,269
  • Gender: Male
  • Why not believe in me?
Re: Snitz 3.4.03 to SMF
« Reply #40 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
« Last Edit: August 23, 2004, 07:36:51 AM by Radianation »

Offline Radianation

  • Sophist Member
  • *****
  • Posts: 1,269
  • Gender: Male
  • Why not believe in me?
Re: Snitz 3.4.03 to SMF
« Reply #41 on: August 23, 2004, 07:44:30 AM »
Code: [Select]
// *** 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.

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Snitz 3.4.03 to SMF
« Reply #42 on: August 24, 2004, 03:23:06 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.

Quote
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.

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]

Offline Radianation

  • Sophist Member
  • *****
  • Posts: 1,269
  • Gender: Male
  • Why not believe in me?
Re: Snitz 3.4.03 to SMF
« Reply #43 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
« Last Edit: August 24, 2004, 04:02:12 AM by Radianation »

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Snitz 3.4.03 to SMF
« Reply #44 on: August 25, 2004, 01:47:23 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]

Offline Radianation

  • Sophist Member
  • *****
  • Posts: 1,269
  • Gender: Male
  • Why not believe in me?
Re: Snitz 3.4.03 to SMF
« Reply #45 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

Code: [Select]
// *** 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

Offline Radianation

  • Sophist Member
  • *****
  • Posts: 1,269
  • Gender: Male
  • Why not believe in me?
Re: Snitz 3.4.03 to SMF
« Reply #46 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.

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Snitz 3.4.03 to SMF
« Reply #47 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]

Offline Radianation

  • Sophist Member
  • *****
  • Posts: 1,269
  • Gender: Male
  • Why not believe in me?
Re: Snitz 3.4.03 to SMF
« Reply #48 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.

Offline Radianation

  • Sophist Member
  • *****
  • Posts: 1,269
  • Gender: Male
  • Why not believe in me?
Re: Snitz 3.4.03 to SMF
« Reply #49 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?

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Snitz 3.4.03 to SMF
« Reply #50 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]

Offline Radianation

  • Sophist Member
  • *****
  • Posts: 1,269
  • Gender: Male
  • Why not believe in me?
Re: Snitz 3.4.03 to SMF
« Reply #51 on: August 30, 2004, 07:37:00 AM »
mySQL 4.0.18

Offline Radianation

  • Sophist Member
  • *****
  • Posts: 1,269
  • Gender: Male
  • Why not believe in me?
Re: Snitz 3.4.03 to SMF
« Reply #52 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).

Offline Radianation

  • Sophist Member
  • *****
  • Posts: 1,269
  • Gender: Male
  • Why not believe in me?
Re: Snitz 3.4.03 to SMF
« Reply #53 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?

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Snitz 3.4.03 to SMF
« Reply #54 on: September 01, 2004, 02:48:38 AM »
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]

Offline Radianation

  • Sophist Member
  • *****
  • Posts: 1,269
  • Gender: Male
  • Why not believe in me?
Re: Snitz 3.4.03 to SMF
« Reply #55 on: September 01, 2004, 03:07:12 AM »
My mistake. It was a post in the child board.

Offline Radianation

  • Sophist Member
  • *****
  • Posts: 1,269
  • Gender: Male
  • Why not believe in me?
Re: Snitz 3.4.03 to SMF
« Reply #56 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.

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Snitz 3.4.03 to SMF
« Reply #57 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]

Offline Radianation

  • Sophist Member
  • *****
  • Posts: 1,269
  • Gender: Male
  • Why not believe in me?
Re: Snitz 3.4.03 to SMF
« Reply #58 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?

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Snitz 3.4.03 to SMF
« Reply #59 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]