Advertisement:

Author Topic: [SMF Converter] THWBoard  (Read 11131 times)

ThorstenE

  • Guest
[SMF Converter] THWBoard
« on: August 13, 2008, 01:58:13 PM »
Software: THWBoard
Version: 3.0

This is the official support topic for THWBoard converter.  Use this topic to ask for support for this converter.

Note: This was tested on thwb-300-beta-2.84, but should in theory work on other versions of THWBoard if the database changes have not been to great.

Does Not Convert
  • Permissions (This might not be supported at all so please check permissions before making the board live..)

Changelog


convert.php
Use this convert.php with the .sql file attached in this topic.
« Last Edit: November 17, 2008, 01:21:45 PM by TE »

Offline Askir

  • Newbie
  • *
  • Posts: 7
Re: [SMF Converter] THWBoard
« Reply #1 on: October 20, 2008, 10:56:09 AM »
Helo,

I have a problem with your converter :-(
My board Version: thwb-300-beta-2.84

This come at step 1 (the secound page)
I try it and he say to me this:

Quote
Converting...
Converting members... Unsuccessful!
This query:
SELECT
userid AS ID_MEMBER, SUBSTRING(username, 1, 255) AS memberName,
SUBSTRING(username, 1, 255) AS realName, useremail AS emailAddress,
SUBSTRING(userpassword, 1, 60) AS passwd, userposts AS posts,
SUBSTRING(usertitle, 1, 255) AS usertitle,
userlocation AS location, userlastpost AS lastLogin,
IF(userisadmin = '1', 1, 0) AS ID_GROUP, userjoin AS dateRegistered,
SUBSTRING(userhomepage, 1, 255) AS websiteUrl, useravatar AS avatar,
SUBSTRING(userhomepage, 1, 255) AS websiteTitle, SUBSTRING(usericq, 1, 255) AS ICQ,
SUBSTRING(useraim, 1, 16) AS AIM, '' AS YIM, userinvisible AS showOnline,
SUBSTRING(usermsn, 1, 255) AS MSN, SUBSTRING(usersignature, 1, 65534) AS signature,
userhideemail AS hideEmail, '' AS totalTimeLoggedIn,
IF(useractivate = '0', 1, 0) AS is_activated, u.userbday AS birthdate
FROM `zulu_forum`.tb_user
LIMIT 0, 500;
Caused the error:

Unknown table 'u' in field list

What i can do?

Best
« Last Edit: October 20, 2008, 10:59:32 AM by Askir »

ThorstenE

  • Guest
Re: [SMF Converter] THWBoard
« Reply #2 on: October 20, 2008, 11:12:48 AM »
Try the attached version please..

Offline Askir

  • Newbie
  • *
  • Posts: 7
Re: [SMF Converter] THWBoard
« Reply #3 on: October 20, 2008, 11:48:24 AM »
Yeah, it works perfekt :) Thanks  8)

Offline Askir

  • Newbie
  • *
  • Posts: 7
Re: [SMF Converter] THWBoard
« Reply #4 on: October 21, 2008, 08:48:16 AM »
Hm, ok i found a converter error.
By some topics the forum show the replies same as the views?

I try it again, but the same error...  :-\
« Last Edit: October 21, 2008, 08:57:39 AM by Askir »

ThorstenE

  • Guest
Re: [SMF Converter] THWBoard
« Reply #5 on: October 21, 2008, 01:27:55 PM »
another small bug..  O:)
try this version..

btw, Admin - Maintenance - Find and repair any errors should also fix it..

Offline Askir

  • Newbie
  • *
  • Posts: 7
Re: [SMF Converter] THWBoard
« Reply #6 on: October 22, 2008, 06:42:12 AM »
sooo, now yes now it works perfect, all ;-)

Thanks for your support.

and thanks for this perfect forum ;-)

Offline steiger

  • Semi-Newbie
  • *
  • Posts: 90
Re: [SMF Converter] THWBoard
« Reply #7 on: January 22, 2010, 11:25:08 AM »
Is this topic also used for converting to SMF 2 RC2?
If not, please move my posting to the right place.

I just tried to convert using the latest files from the download area and I got two errors. I could fix the first one but I am hanging on the second one.


Converting members
The SELECT statement contains
'' AS total_time_logged_in

This generates the error:
Wrong value type sent to the database. Integer expected. (total_time_logged_in)

If I change this to
0 AS total_time_logged_in
it works.


Converting topics...Wrong value type sent to the database. Integer expected. (id_member_updated)
I can't fix this.
id_member_updated is mediumint(8)
r.userid which is referenced is int(10)

Every CAST statement I tried resulted in a SQL Syntax error.
I am used to work with SQL Server, DB2 and Oracle but have almost no experience with mySQL.

BTW, I am using MySQL  5.0.77 on CentOS 5.4

Regards
Michael

ThorstenE

  • Guest
Re: [SMF Converter] THWBoard
« Reply #8 on: January 22, 2010, 11:56:34 AM »
Sorry, our 2.0 converters are still in developement and a bit "buggy".. I'd recommend to use the 1.1.x converter instead. You can upgrade your forum afterwards.

Upgrading SMF

Offline steiger

  • Semi-Newbie
  • *
  • Posts: 90
Re: [SMF Converter] THWBoard
« Reply #9 on: January 23, 2010, 04:47:15 AM »
Sorry, our 2.0 converters are still in developement and a bit "buggy".. I'd recommend to use the 1.1.x converter instead. You can upgrade your forum afterwards.

Upgrading SMF
I know but the RC1 version did work, so I tried the current one.

Will have to implement the hard way (1.1.x - convert - upgrade)

Thanks
Michael

Offline Norv

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,314
  • Blue Wolf
Re: [SMF Converter] THWBoard
« Reply #10 on: January 28, 2010, 05:13:57 AM »
I suspect the value that is sent to the database this time is NULL or an empty string, as id_member_updated. That is, it may be better if you use in the .sql file:
Code: (find) [Select]
r.userid AS id_member_updated,

Code: (replace) [Select]
IFNULL(r.userid, 0) AS id_member_updated,

Please note that it's not tested.
To-do lists are for deferral. The more things you write down the later they're doneā€¦ until you have 100s of lists of things you don't do.
File a security report | Developers' Blog | Bug Tracker

Also known as Norv on D* | Norv N. on G+ | Norv on Github

Offline steiger

  • Semi-Newbie
  • *
  • Posts: 90
Re: [SMF Converter] THWBoard
« Reply #11 on: January 29, 2010, 05:23:00 AM »
Hi Norv,
good point.

I have now setup a new testforum using 1.x -> convert -> upgrade to 2.0RC2.
But the next time I will try to use your fix.

Offline steiger

  • Semi-Newbie
  • *
  • Posts: 90
Re: [SMF Converter] THWBoard
« Reply #12 on: December 05, 2012, 07:52:15 AM »
Hello again,

I just tried to convert a very old thwboard forum to SMF 2.0.2 using the existing converter.
While converting it had a problem with
Duplicate entry for key PRIMARY
in topics.
After analyzing convert.php and many debug entries I solve the problem by adding
ORDER BY id_topic
as the last line of the topics SELECT statement.

Somehow after a few valid 500 entry blocks the LIMIT 3500, 500 block returned rows which were already returned before and which were out of order.
The ORDER BY solved this situation.


In addition to that I added the above mentioned fixes so the complete topics SELECT is now:
---* {$to_prefix}topics
SELECT
   t.threadid AS id_topic, t.boardid AS id_board,
   t.threadtop AS is_sticky, t.threadviews AS num_views,
   IFNULL(u.userid,0) AS id_member_started,
   IFNULL(r.userid,0) AS id_member_updated,
   MIN(p.postid) AS id_first_msg, MAX(p.postid) AS id_last_msg,
   t.threadviews AS num_replies,    t.threadclosed AS locked
FROM {$from_prefix}thread AS t
   LEFT JOIN {$from_prefix}user AS u ON (t.threadauthor = u.username)
   INNER JOIN {$from_prefix}post AS p ON (p.threadid=t.threadid)
   LEFT JOIN {$from_prefix}user AS r ON (t.threadlastreplyby = r.userid)
GROUP BY t.threadid
HAVING id_first_msg != 0
   AND id_last_msg != 0
ORDER BY id_topic;   
---*


As stated in a previous posting I also had to change for "Converting members"
'' AS total_time_logged_in
to
0 AS total_time_logged_in

And also for "Converting personal messages (step 2)"
'' AS deleted
to
0 AS deleted


I doubt that this converter is used very often but could you please change this.

Thanks
Michael
« Last Edit: December 05, 2012, 08:04:30 AM by steiger »