Simple Machines Community Forum

SMF Support => Converting to SMF => Topic started by: margarett on September 02, 2014, 08:47:19 PM

Title: [WIP - Converter] Kunena 3.0
Post by: margarett on September 02, 2014, 08:47:19 PM
This is a beta, don't just scrap your working forum at the end of the process!

I picked a local install of J! 2.5 and Kunena 3.0.6, created some content and, using the existing WIP converter for Kunena 1.7 (http://www.simplemachines.org/community/index.php?topic=526939.0), I tried to get something working for this software.

What the converter will convert:

What the converter will NOT YET convert:
(are there PMs and polls in Kunena? :o )

Known issues/limitations

How to use the converter
* Install SMF in the same server as Kunena, in a separate folder, in the same or different database
* If installed in different databases, make sure that the MySQL user from SMF is allowed to SELECT (at least) the database from Kunena
* Upload the files "convert.php" and "kunena_to_smf.sql" to your SMF folder
* Edit the file "configuration.php" and define the correct database information, as in the example below:
<?php
// Legacy configuration file
// If you're using Joomla 1.5 or newer, please add this file in your Kunena component directory, before running the converter

$mosConfig_db 'joomla';
$mosConfig_dbprefix 'jos_';

?>


* Upload the file to your Kunena Folder (usually components/com_kunena)
* Run the converter --> www.whatever-path-to-smf.com/convert.php
* After conversion login with your admin account. Make sure you run SMF's Routine maintenance tasks
That's it. If interested test and let us know the outcome.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: larry007 on September 03, 2014, 08:02:12 AM
Hi

so, i try this!  :) Thank you for the first beta.......

I do the right entries but the first error message is below and then stops the converter!?


QuoteConverting...
Converting members...Wrong value type sent to the database. Integer expected. (date_registered)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 03, 2014, 08:14:51 AM
Ahh the joys of converters :P I'll check into it ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 03, 2014, 11:20:02 AM
So, the problem actually is that you have a member in your Kunena table that has no registration date (or a somehow invalid one). It really shouldn't happen since that's a datetime, not null field...

can you please go to phpmyadmin, to your jos_members ("jos_" is probably not your prefix, you need to search it) and click on the column "registerDate"? It should show your members, ordered by registration date. The first row(s) might have some weird looking values, can you let us know what shows up?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: larry007 on September 03, 2014, 01:26:32 PM
Now I have checked all member. No member is wrong in registration date, no null field  :'(.

The right name of the users (Joomla 2.5) is "jos_users" not "jos_members" , you now that?!  :)

The first one is me as admin - regDate is "2009-09-19 12:56:18" or what do you mean with first row?


mhhh ?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 03, 2014, 01:32:40 PM
Yes, it's "users", not "members", sorry.

I meant first row after you order by registerDate. But if you said all dates are OK, then I'm confused :(
Would you mind providing my your cPanel login details via PM so that I can check in place?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: larry007 on September 03, 2014, 02:13:06 PM
oh.....

i have all on localhost (XAMPP)  O:)

have you tested the converter in your own location and everything was fine?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 03, 2014, 02:20:16 PM
Yes... Also on XAMPP.
Could you export your "users" table, zip and password-protect it, upload it somewhere and send me the link, please?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: larry007 on September 04, 2014, 06:37:35 AM
ok

do you have the filelink in PM?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 04, 2014, 06:39:40 AM
Just got it, thanks. I'll look into it now ;)

edit: updated in the first post. Thank you ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 05, 2014, 06:49:56 AM
Another update:
* Avatars (gallery and user uploaded) are now converted
* J! passwords are supported directly by SMF :) Do note that
1) I only tested with J! 2.5. J! 1.7 should also work (untested), J! 3.0 probably should NOT work.
2) At first login, each user will have to enter the password twice (necessary for rehash)
* Minor fixes.

Thank you larry007 for your help ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: larry007 on September 06, 2014, 02:29:00 PM
What must I say : very very very good job!! Well done, thank you so much!!!

I found something to fix it, maby if you can......

I found that the views from supjects are not right converted. Many of them are "0 Views"

please take a look
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 09, 2014, 03:44:47 PM
I gave it a look but it seems OK... Kunena stores each topic's view count in a column "hits". And in the conversion I did from your database, the "hits" were correctly translated into "num_views" and they do show up in SMF...

Can you give me an example from your forum where this happens? I mean, a topic with views in Kunena that don't transfer that to SMF?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: larry007 on September 10, 2014, 04:02:58 AM
Hi

Eg: ....board 5.0 -> topic 1519 - 1526 this is only a few of manys - not all have 0 !?, in board 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 46.0 there are also a few of manys.

do you have a screenshot maybe of board 5 in PM for me?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 10, 2014, 05:43:31 AM
Well, those topics did convert with 0 views (and many others, yes)

But the "hits" column in the original database also presents "0". So the conversion was actually correct.
I imagine that the topic views might be stored somewhere else... What is the correct value those topics should have, any idea?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: larry007 on September 10, 2014, 05:53:26 AM
Mhh

look at the kunena (j!) location http://localhost/fw_statisch/forum/5-einstellungsvoraussetzungen-.html , the hits are all over "0"

This is the board 5.0 in smf and there are many "0" hits - there must be no "0" hits.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 10, 2014, 06:03:05 AM
Eheheh I can't see your localhost :P

Give me the number of views for topics 1519 - 1526 in Kunena.
I'll try to find it in the database.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: larry007 on September 10, 2014, 06:23:27 AM
Yes I now.... i think you have installed the kunena on localhost? O:)  ;)

ok I understand, here it comes... 8)

kunena topics:

1525 - 699 views
1524 - 473
1523 - 476
1522 - 909
1521 - 517
1520 - 386
1519 - 548

Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 10, 2014, 06:25:06 AM
I did but I did not "connect" your database to my test install.

I'll look into that ;)

edit: Hummm I see now. Need to investigate a bit more. Thanks ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: larry007 on September 10, 2014, 06:40:47 AM
Quote from: margarett on September 10, 2014, 06:25:06 AM
I did but I did not "connect" your database to my test install.

Yes I now that..... sorry  ;-)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 10, 2014, 08:20:11 PM
OK, updated, should be better now :)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: larry007 on September 12, 2014, 04:40:44 AM
Hi,

now is it good - all views are now the same as in kunena and I see that the sortings of the sticky and closes topics are very well too.

How about the converted avatars, where can I find it in the file directory, I must resize them because the most of them are to big.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 12, 2014, 02:36:55 PM
Kunena 3.0.5
Joomla 3.3.3

> Install SMF in the same server as Kunena, in a separate folder, in the same or different database

Done

>Upload the files "convert.php" and "kunena_to_smf.sql" to your SMF folder

Done

>Edit the file "configuration.php" and define the correct database information

Done. I put the joomla database name in this file, the one which contains kunena tables.

>If you're using Joomla 1.5 or newer, please add this file in your Kunena component directory

Done

>Upload the file to your Kunena Folder (usually components/com_kunena)

Done

>Run the converter --> www.whatever-path-to-smf.com/convert.php

Database is on the same server, DB's for both kunena and smf have the same password

Path to SMF: /var/www/vhosts/mysite/forums

Path to Kunena 3.0: /var/www/vhosts/mysite/html
Not clear if this should be root of site or in com_component and Kunena?

Each time I run the converter, I get

Sorry, the database connection information used in the specified installation of SMF cannot access the installation of Kunena 3.0. This may either mean that the installation doesn't exist, or that the Database account used does not have permissions to access it.

The error that was received from the Database was: Incorrect database name ''

Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 13, 2014, 01:38:21 PM
Surely I am not the only one wanting to convert from kunena to smf? There must be others who have tried this and can give some input?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 13, 2014, 01:59:58 PM
Hi.

QuotePath to Kunena 3.0: /var/www/vhosts/mysite/html
Not clear if this should be root of site or in com_component and Kunena?
It should be "path_to_joomla/com_component/Kunena"
(The same path to where you put configuration.php)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 14, 2014, 12:01:42 PM
Ah ok, I've updated that.

Converting members... Unsuccessful!
This query:

    SELECT
    m.userid AS id_member, SUBSTRING(md.username, 1, 80) AS member_name,
    SUBSTRING(md.username, 1, 255) AS real_name,
    IF(ISNULL(m.signature), '', SUBSTRING(m.signature, 1, 65534)) AS signature,
    IF(ISNULL(m.posts), 0, m.posts) AS posts,
    md.password AS passwd, '' AS password_salt,
    IF(ISNULL(m.karma), 0, m.karma) AS karma_good, SUBSTRING(md.email, 1, 255) AS email_address,
    SUBSTRING(m.location, 1, 255) AS location,
    '1' AS is_activated,
    IF (md.registerDate IS NULL, 0, UNIX_TIMESTAMP(md.registerDate)) AS date_registered,
    IF (md.lastvisitDate IS NULL, 0, UNIX_TIMESTAMP(md.lastvisitDate)) AS last_login,
    '1' AS hide_email,
    IF(md.usertype = 'Super Administrator' OR mm.group_id = '8' OR mm.group_id = '7', 1, 0) AS id_group,
    '' AS lngfile, '' AS buddy_list, '' AS pm_ignore_list, '' AS message_labels,
    '' AS personal_text, '' AS website_title, '' AS website_url, '' AS icq,
    '' AS aim, '' AS yim, '' AS msn, '' AS time_format, '' AS avatar,
    '' AS usertitle, '' AS member_ip, '' AS secret_question, '' AS secret_answer,
    '' AS validation_code, '' AS additional_groups, '' AS smiley_set, '' AS member_ip2
    FROM `priders`.qdmiu_kunena_users AS m
    LEFT JOIN `priders`.qdmiu_users AS md ON (m.userid= md.id)
    LEFT JOIN `priders`.qdmiu_user_usergroup_map AS mm ON (m.userid= mm.user_id)
    GROUP BY m.userid
    LIMIT 0, 500;

Caused the error:

    Unknown column 'md.usertype' in 'field list'
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 14, 2014, 06:04:22 PM
Of course... :(

I adapted the converter with J! 2.5
Now J! 3.0 moved something around, methinks :(

I guess I have to go on and install J! 3.0, isn't it?...
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 14, 2014, 09:18:59 PM
yes, 3.3.3 I believe. It's crazy how much they change things.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 15, 2014, 10:47:35 PM
If it is of any value to you, this is because I want to see if I can convert some Joomla sites into SMF forums so it's for a good cause :)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 16, 2014, 09:55:49 AM
On question about converting is how do people deal with re-creating the accounts and passwords?
It's one thing to convert the forums from kunena to smf but my interest is to see if I could go from a joomla site fully to only smf.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 16, 2014, 09:27:48 PM
Member accounts are also converted.
For J! 3.x it should be necessary for everyone to reset his password, as that version uses bcrypt (not totally sure but I think so...) and, AFAIK, that encryption can't be handled in SMF.

As for the converter itself, I'm sorry but I've been extremely busy with my job, lots of working hours so I couldn't yet try it with your J! version...
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 17, 2014, 11:05:30 AM
If you need some help, I am happy to do what ever I can. For example, I can set up a dev vsp with joomla and smf so we can reset over and over as needed.

Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 17, 2014, 11:07:57 AM
Thank you for your kind offer ;)

I can do that myself on my localhost too ;) It's time that I'm missing :P
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 17, 2014, 07:42:18 PM
Well, I'll be sleeping less hours than recommended :P

Try the attached *.sql file.

edit: in my test forum, J! 3.3.3 passwords don't work in SMF...
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 17, 2014, 08:10:39 PM
Wow, the conversion seemed to happen as it should. Very exiting.

When I try to log in using a known user, I am being told;

"Password security has recently been upgraded. Please enter your password again".

This is a little confusing since entering the password leads to an error but once I figured that out, is works.
I will spend a little time going over the site and report back.

Looks good so far, everything seems to be there.


Title: Re: [WIP - Converter] Kunena 3.0
Post by: larry007 on September 18, 2014, 08:52:35 AM
Quote from: larry007 on September 12, 2014, 04:40:44 AM

How about the converted avatars, where can I find it in the file directory, I must resize them because the most of them are to big.

Question again.....
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 18, 2014, 05:37:58 PM
This worked so well that now I am wondering why I don't just replace kunena but leave the joomla site up without that. The joomla site simply uses jomsocial and not much else but without the forums.

I have read that there are no bridges however.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 18, 2014, 05:41:11 PM
Quote from: larry007 on September 18, 2014, 08:52:35 AM
Quote from: larry007 on September 12, 2014, 04:40:44 AM

How about the converted avatars, where can I find it in the file directory, I must resize them because the most of them are to big.
Question again.....
Ups :P I forgot...

Avatars are handled as attachments by SMF. So you can find them in "attachments" folder. Problem is, together with all other forum attachments.
Although, I think there is a setting in SMF to resize avatars (need to check, I'm not on the computer now...)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 18, 2014, 05:42:54 PM
Quote from: lewism on September 18, 2014, 05:37:58 PM
This worked so well that now I am wondering why I don't just replace kunena but leave the joomla site up without that. The joomla site simply uses jomsocial and not much else but without the forums.

I have read that there are no bridges however.
You current member base is in SMF. But in won't keep synchronized.
Why don't you try a portal or blog mod to see if if can "replace" your J!
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 18, 2014, 05:53:30 PM
@margarett, so, you mean just make them two different sites right?
Then let users sign up to either or both and each will have their user  account/passwd
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 18, 2014, 06:01:20 PM
No, I mean try to check if you can do with SMF what you do with J! so you have just one site ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 18, 2014, 06:03:26 PM
oh, well, that was/is the intention but losing jomsocial might be an issue for some on some sites.
This is why I was thinking either a bridge or two logins, maybe links on SMF to the joomla user profiles, etc.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 18, 2014, 06:08:55 PM
/me has no idea what jomsocial is :P
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 18, 2014, 06:26:40 PM
It's a social environment addon for Joomla. Somewhat mimicks FB and other social sites. It's ok but it's got plenty of problems.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 18, 2014, 06:45:02 PM
http://custom.simplemachines.org/mods/index.php?mod=2407
maybe?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 19, 2014, 11:01:08 AM
Yes, I looked around to see what there was and there isn't much. What I saw pales quite a lot to a real social network site such as joomla using jomsocial. Jomsocial has been around for quite a long time now and it's a highly polished product even with it's problems but that's like anything else.

I've not decided how I will handle this. One way would be if I could have a link in SMF to users profiles and other things in Joomla so that when someone clicks on a user in smf, it would take them to the profile on joomla.

Just have to play with it and see how things go but now that I have the forums converted, there are other sites which I can convert simply to smf now. So, thank you VERY much for that!!!
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 19, 2014, 11:19:48 AM
You're welcome ;)

That bridge would be really handy... But that's waaaay out of my league :(
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 19, 2014, 02:26:05 PM
From what I have read, there is also some sort of license disagreement involved.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 20, 2014, 03:11:49 PM
Here is a question for you, something I have been wondering about.

It will take me say a week to get the smf forum to a point where it could be used but in the meantime, people are still posting to the kunena forums.

I don't want to have to re-do all of the work I've done on smf to fire up my new forums so could I use your solution just to update my smf forum once it has been built?

Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 21, 2014, 01:16:21 PM
In theory, yes, but it's really tricky so I'd say no, you can't do an "incremental" conversion.

When I converted myself to SMF, like 10 years ago :P this is what I did:
* made a test conversion to see if it fits me
* manually verified membergroups and board permissions.
* got a theme I like
* installed mods I thought would work for me
* ran the parallel forum with my staff for a week

Once we were happy, I did the conversion twice more so that I had all steps covered.
Finally I did the conversion "for real" with a downtime of +-6h.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 21, 2014, 01:29:36 PM
I think I'm going to do something similar with one of the sites. I'll re-install smf right now, use the converter, turn off the kunena forums, make a link on joomla to the new forums and go from there. Maybe I'll keep both sites, maybe I won't, we'll see. Depends on the users I guess. This way, I'm not making huge sudden changes and they can tell me if they miss the rest of the joomla stuff or not.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 21, 2014, 01:31:29 PM
Good luck ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 21, 2014, 01:32:31 PM
Well, thanks to you, this is even possible now!

Thank you for doing this :)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 21, 2014, 04:21:09 PM
As feedback, there is something else I've noticed.

All converted posts no longer use the apostrophe properly.

Here is an example;

'Let\'s ride on'

All posts now contain a \ if an apostrophe was used.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 21, 2014, 05:06:06 PM
Hummm actually it shouldn't... The converter should replace those properly... I have to check.

Go to phpmyadmin, to your SMF database and SQL tab. Run the following query:
UPDATE smf_messages SET body = REPLACE(body, "\\\'", "\'");
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 21, 2014, 06:00:52 PM
Oh oh!


HelpManage Members

Below is a listing of all the members currently registered with your forum.

    View All Members
    Search For Members


Pages: [1] 2 3 ... 6
ID    Username    Display name    Email Address    IP address    Last Online    Posts    
793                Never    0    
794                Never    0    
***SNIP***
809                Never    0    
810                Never    0    
813                Never    0    
814                Never    0    
818                Never    0    
819                Never    0    
820                Never    0    
866                Never    0    
867                Never    0    
872                Never    0    
883                Never    74    
905                Never    0    
915                Never    0    
917                Never    0    
927                Never    0    
936                Never    0    
901    01xxxxstar    01xxxxstar    [email protected]       Today    71    
***from here, all users are listed...***

821                Never    0    

I am assuming this is normal since it seems to have saved the users.
Can I/should I delete all of the empty entries?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 21, 2014, 06:50:28 PM
Hum how odd... That means that there are members in Kunena's members table that have no details in J! members table. You can delete them, yes ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 21, 2014, 07:17:08 PM
before I delete them... I clicked on Status for the listing, then all blank entries went away and only users listed now?

Ooops, that's normal right? It's just showing active members first now I think.
Clicking in the status row on any empty ones leads me to sending them a private message.
How do I delete them?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 21, 2014, 07:30:43 PM
On admin memberlist you can select multiple entries and delete them all at once ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 22, 2014, 04:00:43 PM
Yup, noticed I was using the wrong side :)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: lewism on September 22, 2014, 04:02:30 PM
Just so you know, the conversion did do a few weird things. Nothing I could do about it other than delete posts, modify settings etc but it's fixed up now.

The conversion made a number of people moderators of various boards and also jumbled up some posts/authors and a few other small things but nothing so big that it's not repairable with a little work.

All in all, it's all good.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on September 22, 2014, 04:27:06 PM
Nice to hear that. Thank you for your feedback ;)
And sorry for those "hiccups". Yours was the first or second real job that this converter ever performed :P
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 09, 2014, 02:48:27 PM
Margarett,

How's work going on this? I'm currently on Kunena 3.0.6 and am torn between switching to SMF or PHPBB3 as I need to move away from Kunena.

Thanks!
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on October 09, 2014, 02:58:56 PM
Well, it's... The same :P

The previous forum was converted and I had no further feedback from others so... Feel free to try and let us know how it behaves ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 09, 2014, 03:00:57 PM
Ok, thank you, I will decide in the next few days what I want to do based on support ability & how I like the interface.

Thank you very much!
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 09, 2014, 05:49:13 PM
margarett

I'm a little confused as to the steps...when editing the configuration.php file before uploading it to Kunena...it states to "define the correct database information".

Is this the database on my host? If so, do I enter the database for the Kunena host, or my SMF host? Also...how do I tell what prefix to enter?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on October 09, 2014, 06:23:11 PM
You need to enter Kunena's database details.

SMF's database details are known to the converter ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 09, 2014, 06:24:43 PM
So, the database name where Kunena is, correct?

If so...how do I figure out the prefix?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on October 09, 2014, 06:29:17 PM
If you check phpmyadmin, look into the database where the tables are listed. You'll see a pattern in the name of the tables: they start with some letters and an underscore --> that's the prefix ;)

In my test setup, I got "ldxgp_". But that's probably random ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 09, 2014, 06:31:23 PM
Ahhh ok, so it's jos_ as written in your config file. Thank you!
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 09, 2014, 06:36:21 PM
Ok, I'm sorry, I just don't seem to know enough here...

I thought I was entering the path to my Kunena properly, but I guess I'm not. Any advice?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 09, 2014, 06:52:28 PM
Ok, I've tried every possible path to my Kunena and it keeps saying "Unable to find the settings for Kunena 3.0. Please double check the path and try again."

Any advice?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on October 09, 2014, 06:57:44 PM
What are you entering?

It's usually
/some_path_to_joomla/components/com_kunena

That's also the place where you should put configuration.php ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 09, 2014, 06:58:40 PM
I did that, tried my site name as well as the FTP string...and still nothing.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on October 09, 2014, 07:02:31 PM
Site name? No, it's not that...

Get this file:
http://www.simplemachines.org/community/index.php?action=dlattach;topic=512266.0;attach=225567
it's called "whats_the_path.php"
Load it to your Joomla main folder and run it via browser. Eg:
www.your_joomla_address.smt/whats_the_path.php

Whatever it returns you, add "/components/com_kunena" after it and that should be the path.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 09, 2014, 07:15:22 PM
Maybe I did a typo when I tried it, because I did try that path before...but now I get this message...

Sorry, the database connection information used in the specified installation of SMF cannot access the installation of Kunena 3.0. This may either mean that the installation doesn't exist, or that the Database account used does not have permissions to access it.

The error that was received from the Database was: SELECT command denied to user 'smf1222007444011'@'184.168.27.119' for table 'jos_users'


smf1222007444011 is the database I'm using for SMF, but Kunena is on a different database...is that the problem?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on October 09, 2014, 07:43:37 PM
You should read this:
http://www.simplemachines.org/community/index.php?topic=146192.0
Or the first post in this topic:
Quote from: margarett on September 02, 2014, 08:47:19 PM
How to use the converter
* Install SMF in the same server as Kunena, in a separate folder, in the same or different database
* If installed in different databases, make sure that the MySQL user from SMF is allowed to SELECT (at least) the database from Kunena

The converter uses SMF's MySQL user to access both databases. So this user has to have permission to access Kunena's database ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 09, 2014, 07:44:52 PM
Ugh...ok, this is getting over my head. Thank you for trying to help, I appreciate it.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 09, 2014, 11:33:17 PM
margarett,

I decided to give this another try, re-did everything on a test site, and the converter works but, I'm getting this error when converting...

Converting members...
Unsuccessful!
This query:
SELECT
m.userid AS id_member, SUBSTRING(md.username, 1, 80) AS member_name,
SUBSTRING(md.username, 1, 255) AS real_name,
IF(ISNULL(m.signature), '', SUBSTRING(m.signature, 1, 65534)) AS signature,
IF(ISNULL(m.posts), 0, m.posts) AS posts,
md.password AS passwd, '' AS password_salt,
IF(ISNULL(m.karma), 0, m.karma) AS karma_good, SUBSTRING(md.email, 1, 255) AS email_address,
SUBSTRING(m.location, 1, 255) AS location,
'1' AS is_activated,
IF (md.registerDate IS NULL, 0, UNIX_TIMESTAMP(md.registerDate)) AS date_registered,
IF (md.lastvisitDate IS NULL, 0, UNIX_TIMESTAMP(md.lastvisitDate)) AS last_login,
'1' AS hide_email,
IF(md.usertype = 'Super Administrator' OR mm.group_id = '8' OR mm.group_id = '7', 1, 0) AS id_group,
'' AS lngfile, '' AS buddy_list, '' AS pm_ignore_list, '' AS message_labels,
'' AS personal_text, '' AS website_title, '' AS website_url, '' AS icq,
'' AS aim, '' AS yim, '' AS msn, '' AS time_format, '' AS avatar,
'' AS usertitle, '' AS member_ip, '' AS secret_question, '' AS secret_answer,
'' AS validation_code, '' AS additional_groups, '' AS smiley_set, '' AS member_ip2
FROM `tes1222007444011`.jos_kunena_users AS m
LEFT JOIN `tes1222007444011`.jos_users AS md ON (m.userid= md.id)
LEFT JOIN `tes1222007444011`.jos_user_usergroup_map AS mm ON (m.userid= mm.user_id)
GROUP BY m.userid
LIMIT 0, 500;
Caused the error:
Unknown column 'md.usertype' in 'field list'


How can I resolve this?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 10, 2014, 11:11:08 AM
Ok, well, this morning I went to log in to the forum to see if I could do anything, and my Admin username no longer exists. I'm guessing this is due to the convert error above.

Can someone please help me out with this? Thank you
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on October 10, 2014, 12:08:50 PM
Your members table was truncated so you have no accounts :P

Your error is caused by your Joomla version, some versions have that field, others don't... I'll fix it later for you ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 10, 2014, 12:09:36 PM
Ok thank you!
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on October 10, 2014, 05:37:03 PM
Okidoki, use the attached file instead ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 10, 2014, 05:57:12 PM
Awesome...I'll try this as soon as I can restore my test site! I somehow screwed up & deleted my joomla components folder rather than my testforum folder. No idea how since they aren't even close on the tree...but whatever, been a REALLY long day.

I'll post here once I'm able to try this again. Thank you!
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 10, 2014, 09:31:36 PM
Ok, I've got the files uploaded, and I started the convert process...but I'm unsure if it's physically "still" running...I got this message...

Converting...
Converting members...Duplicate entry '540' for key 'PRIMARY'
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 10, 2014, 09:35:25 PM
Ok yeah, that didn't work. Please see the images attached. One shows the error...and I think it's just stalled out. The other shows my members list...there are no names or anything shown.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on October 10, 2014, 09:39:15 PM
No, you can only have a running forum after complete conversion. If there are errors, sorry, we need to fine tune the converter. But until it finishes, no cigar ;)

The fix for that is easy, it just requires to ignore duplicate members. I'm not on the computer but I'll give you the fix tomorrow.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 10, 2014, 09:41:06 PM
Great thank you!

In the mean time, I could rename the duplicate member...it's my admin account, and run this again. Would that resolve the issue?

Also...should I go & delete all members on the SMF forum since they are all blank?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on October 10, 2014, 09:45:07 PM
Not necessary ;) When each step begins, the corresponding table is truncated (emptied) ;)

As for the duplicate, it's unlikel that it's your admin... It has id 540 so it should start a bit higher ;)
I never could really understand these errors... It's not likely that J! can work with a duplicate member id so I don't know how so those duplicates show up...
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 10, 2014, 09:48:43 PM
That's odd...I just looked up member 540...and it's one of the blank entries

Odder still, there's no member ID 540 in Kunena, so that would lead me to believe it's an issue on SMF end...right?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on October 10, 2014, 09:54:12 PM
Not necessarily. I'd have to look into the database to be sure.

/me lets go the phone and goes to sleep!
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 10, 2014, 09:55:36 PM
Quote from: margarett on October 10, 2014, 09:54:12 PM
/me lets go the phone and goes to sleep!

LOL thank you, I will watch for your post tomorrow with the fix.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 11, 2014, 09:48:58 PM
Quote from: margarett on October 10, 2014, 09:39:15 PMThe fix for that is easy, it just requires to ignore duplicate members. I'm not on the computer but I'll give you the fix tomorrow.

Margarett...any luck on this?

Thanks!
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on October 12, 2014, 11:53:52 AM
Sorry for the delay. Weekend is not when I'm most active :P
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 12, 2014, 12:49:11 PM
Thank you thank you thank you! It worked...everything is there.

If you're keeping track...this was done with SMF 2.0.8 (will upgrade now to 2.0.9) and Kunena 3.0.6 on a GoDaddy host (yes...I'm moving away from them ASAP).
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 12, 2014, 12:56:30 PM
One quick comment...

I noticed it made roughly 140 blank user entries...they had no name, no user ID, no posts, no email...nothing listed. I've deleted them all, just not sure why they were there.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on October 12, 2014, 02:34:01 PM
Thank you for your feedback. The previous user also reported blank users. They are caused by unsynchronized members tables between J! and Kunena...
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 12, 2014, 03:09:12 PM
I'll go double check my user data just in case & post here if all or some copied over.

Thank you again!
Title: Re: [WIP - Converter] Kunena 3.0
Post by: davecove on October 13, 2014, 11:02:27 AM
Hi margarett, I am having an issue converting from Kunena 3.0.2 to SMF 2.0.9.  Currently I am using the sql script you posted in this thread a couple of days ago along with the convert.php from the SMF converters page, and a configuration.php like you described at the beginning of this thread (but with my specific details of course).

When I fill out the directories and db password details on convert.php and click 'continue', the next page appears immediately with the message:

Quote
Converting...
-------------------------------------------------
Successful.
Recalculating forum statistics...

In reality, the SMF database is unchanged and the 'Recalculation' never returns a value.

Any ideas where I might be going wrong?

Thank you for your time,
Dave
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on October 13, 2014, 11:10:19 AM
Use convert.php from this topic also (first post)
I've never seen that behaviour... :o

edit: welcome to sm.org ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: davecove on October 14, 2014, 10:08:00 AM
Ok, I tried the one from the first post, but same results.

Let me tell you my entire story.

My server got hacked and started spewing spam.  The ISP shut it down the VPS and allowed it to come up if I keep the mail service off. Since I am not a Linux guru, they advised me to simply rebuild the server instead of trying to find and fix a tricky hack.

That old server was running Joomla 3.1.5 with Kunena 3.0.2  (Kunena had originally been installed with 1.7.2 but was upgraded to 3.0.2 six months ago). The crowd that uses the forums let it be known that they preferred SMF so I am attempting to convert.

So far I have installed Joomla 3.1.5 on the new VPS and added Kunena 3.0.2 to it. I then dropped the Joomla database and restored a recent backup of the Joomla db from the infected VPS. Going to the Kunena control panel in this new Joomla install/restore does show the users so the procedure does seem to have been successful.

I then installed SMF 2.0.9 in a new folder, dropped in the convert.php from this thread, the latest sql file from this thread into the SMF root, and a configuration.php with my db and prefix into the com_kunena folder.

I then pointed my browser at the convert.php, provided the folders and db password, and clicked 'Continue'.

What do you think?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on October 14, 2014, 10:31:27 AM
I'm sorry, that's not a setup I'm comfortable with. In fact, I just used Kunena enough to create the 2 converters :P

The conversion steps are read directly from the .sql file. You mentioning that it has none (recalculation is an "extra" step created by convert.php) is totally new to me... That basically says that the .sql file was ignored...
If you allow me to check your setup in place I can *try* to see what's wrong. But it's the most I can promise you...
Title: Re: [WIP - Converter] Kunena 3.0
Post by: davecove on October 14, 2014, 10:50:25 AM
Is there a way to edit the sql to run as a script without the php kicking it off? (ie, paste it into a SQL command window and run it)

Dave
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on October 14, 2014, 11:10:01 AM
Not really, without some *heavy* manual work... The dynamic construction of the converter mixes the original SQL construction, some "in-between PHP" for adapting data where needed and the SMF-final SQL construction for each step.
Not for the fainted heart ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: davecove on October 14, 2014, 11:19:16 AM
How do I let you check it? You want my Plesk credentials?

Dave
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on October 14, 2014, 11:41:34 AM
Yes, that's the best way. PM me the details ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: Dragon41673 on October 14, 2014, 02:57:28 PM
Quote from: Dragon41673 on October 12, 2014, 03:09:12 PM
I'll go double check my user data just in case & post here if all or some copied over.

Thank you again!

Sorry, forgot to follow up. All users copied over properly. Thank you again!
Title: Re: [WIP - Converter] Kunena 3.0
Post by: larry007 on October 20, 2014, 06:20:06 AM
Quote from: margarett on September 18, 2014, 05:41:11 PM
Quote from: larry007 on September 18, 2014, 08:52:35 AM
Quote from: larry007 on September 12, 2014, 04:40:44 AM

How about the converted avatars, where can I find it in the file directory, I must resize them because the most of them are to big.
Question again.....
Ups :P I forgot...

Avatars are handled as attachments by SMF. So you can find them in "attachments" folder. Problem is, together with all other forum attachments.
Although, I think there is a setting in SMF to resize avatars (need to check, I'm not on the computer now...)

Hallo

can you help?

Admin> Forum> Attachments and Avatars> Avatar Settings. <- here can I adjust the Avatars, I want to have all max 100x100px but it doesen't work to resize after converting.

look at the attachements picture there are many avatars over 100x100 px, how can I resize it?

THX

Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on October 21, 2014, 06:02:40 AM
You are right, those settings are only valid when uploading an avatar...

You need to use CSS to resize the current ones (so that they won't break your display). Try this:
Load.php, find:
'image' => $profile['avatar'] == '' ? ($profile['id_attach'] > 0 ? '<img class="avatar" src="' . (empty($profile['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $profile['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $profile['filename']) . '" alt="" />' : '') : (stristr($profile['avatar'], 'http://') ? '<img class="avatar" src="' . $profile['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" />' : '<img class="avatar" src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($profile['avatar']) . '" alt="" />'),
Replace with:
'image' => $profile['avatar'] == '' ? ($profile['id_attach'] > 0 ? '<img class="avatar" style="max-width:100px; max-height:100px" src="' . (empty($profile['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $profile['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $profile['filename']) . '" alt="" />' : '') : (stristr($profile['avatar'], 'http://') ? '<img class="avatar" src="' . $profile['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" />' : '<img class="avatar" src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($profile['avatar']) . '" alt="" />'),
This should limit any avatar to 100x100px ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: scotmk on October 26, 2014, 04:46:21 PM
Hi, thanks for this.

I have a small problem though.  I have my joomla/kenuna install on a test site in a subfolder.  I have my SMF site installed on same test server in a different subfolder.

I have put all the files in the correct location etc.  When I run covert.php I get "The error that was received from the Database was: SELECT command denied to user 'cl24-smf101'@'10.0.44.100' for table 'jos_users'"

How do I gain access to the joomla/kenuna DB from the SMF DB?, they are install under 2 MySQL DB on the same server host space.

Thanks

Scot
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on October 26, 2014, 05:37:20 PM
If you have cPanel, there is an option there to grant access to your users to your databases. SMF user must be able to access J! database.
If unsure how to do it, maybe ask your host ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: scotmk on October 26, 2014, 06:12:44 PM
yes, I see it but did not work, I asked them and it can not be done apparently.

I have it all working though now, I just reinstalled SMF in a sub folder again but installed it to same mySQL DB and run it all again, worked first time without any problems at all.

Just deleting the many page of blank usernames as previously read here.  ;D

I have noticed also, that i has given random members moderator status on my categories too.

Thanks

Scot
Title: Re: [WIP - Converter] Kunena 3.0
Post by: larry007 on November 08, 2014, 08:36:21 AM
@margarett

little feedback - my forum works still fine  ;)

thx
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on January 17, 2015, 08:20:30 AM
@Margarette  I'm greatful that you created this converter. It's my turn now to convert my forum after a long time of wait. ;D Please guide me. I'll follow the previous posts then ill post whatever problem i will have.

joomla 3.1.1 kunena 3.0.0
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on January 17, 2015, 09:35:07 AM
Go for it! Just drop the latest "e" @ margarett because there isn't one :P
Let us know how it goes ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on January 17, 2015, 12:10:31 PM
Margarette, here we go...

QuoteSorry, the database connection information used in the specified installation of SMF cannot access the installation of Kunena 3.0. This may either mean that the installation doesn't exist, or that the Database account used does not have permissions to access it.

The error that was received from the Database was: Incorrect database name ''

I'm testing it on xampp.
*I installed my kunena using kickstart inside the xampp/htdocs/xampp/newkunenafolder
* then i installed smf inside  xampp/htdocs/xampp/newkunenafolder/newsmfolder
Uploaded the files "convert.php" and "kunena_to_smf.sql" to my xampp/htdocs/xampp/newkunenafolder/newsmfolder
*i put the configuration.php in  xampp/htdocs/xampp/newkunenafolder/components/com_kunena
edited configuration.php : $mosConfig_db = 'kunena_database';
$mosConfig_dbprefix = sin_';


$dbtype = 'mysqli';
   public $host = 'localhost';
   public $user = 'root';
   public $password = '';
   public $db = 'kunena_database';
   public $dbprefix = 'sin_';

(the prefix of kunena and smf are different sample-  sin_ for kunena and nel_ for smf .)

I just used the same  database, username, blank password when i installed smf.

Path to SMF :C:\xampp\htdocs\xampp\newkunenafolder\newsmfolder
Path to Kunena 3.0   : C:\xampp\htdocs\xampp\newkunenafolder

Would i get an error/complication if ever i repeat the process and installed it in new folder name with new database without deleting the previous one that i installed?  I asked this because  im thinking if  i can test it with the host of my live sites without affecting my live forum after i learned the proper convertion. Sorry for my bad english :)

(sometimes im having a hardtime reading the verification before posting here : )
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on January 18, 2015, 05:36:28 PM
I also used XAMPP when I wrote the converter so it has to work :P

You can install another one without deleting the previous one, no problem.  As long as you use a different database, you should be fine.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on January 18, 2015, 09:48:39 PM
What do you think? why i' getting having thaterror? thank you
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on January 19, 2015, 05:24:03 AM
I think (don't remember anymore, I'm sorry :( ) that the path for Kunena needs to be the complete path all the way to com_kunena

edit: it is the full path ;)
Quote from: margarett on September 13, 2014, 01:59:58 PM
Hi.

QuotePath to Kunena 3.0: /var/www/vhosts/mysite/html
Not clear if this should be root of site or in com_component and Kunena?
It should be "path_to_joomla/com_component/kunena"
(The same path to where you put configuration.php)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on January 19, 2015, 05:40:02 AM
Margarett!You are such a blessing for everyone! Don't ever post this anywhere that kunena admins will see because this topic will be flooded :) I'll checki now my forum. I was too excited when i saw that i converted it already. Will check if there are any errors. thanks
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on January 19, 2015, 05:56:05 AM
Cant log in. I'm only using xampp, maybe that's the reason why im not receiving any email :) Can you tell me how to log in as an admin? thanks I'll back read, i'm still wondering about the attachment. But looks like everything is fine.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on January 19, 2015, 05:59:11 AM
What's your J! version?

Anyway, check this wiki article:
http://wiki.simplemachines.org/smf/I_accidentally_lost_my_admin_account!_What_can_I_do
The last topic explains how to easily restore your password ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on January 19, 2015, 06:00:42 AM
joomla 3.1.1 kunena 3.0.0
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on January 19, 2015, 06:05:38 AM
I don't understand to run a query thing but looks like i can do this. Is't right?


Creating a single-purpose script

    Create a php file called createadmin.php
    Copy and paste in it the code below according to your SMF version
    Replace in the code adminusername with the login name you want to set as admin.
    Using FTP upload it to your forum directory -- the same directory that has SSI.php in it.
    Run the script, accessing it from your browser by URL as
    http://www.yourwebsite.tld/forum/createadmin.php.
    Afterwards, make sure to delete the file from your forum's directory.

SMF 1.1
Code: [Select]

<?php

// Pick a username to be the new admin user -- use the login name, not the display name
$yourusername='adminusername';

//---------------------------------------------------------------------------

// You shouldn't need to change anything past this point in the script.
//Here we include SSI for globals used within the sql statement
include_once('SSI.php');
global $db_prefix;

//  Now run the query.
$querystring='UPDATE ' . $db_prefix . 'members
SET ID_GROUP = \'1\' WHERE memberName = \'' . $yourusername . '\'';
$adminsquirt = db_query($querystring, __FILE__,  __LINE__);

echo $yourusername . ' should now be an admin';
?>

SMF 2.0
Code: [Select]

<?php

// Pick a username to be the new admin user -- use the login name, not the display name
$yourusername='adminusername';

//---------------------------------------------------------------------------

// You shouldn't need to change anything past this point in the script.
//Here we include SSI for globals used within the sql statement
include_once('SSI.php');

//  Now run the query to elevate the user to administrator
$querystring='UPDATE {db_prefix}members
SET id_group = \'1\' WHERE member_name = \'' . $yourusername . '\'';
$adminElevate = $smcFunc['db_query']('', $querystring, array());

//Make sure that the account is activated!
$querystringb='UPDATE {db_prefix}members SET is_activated = 1 WHERE member_name = \'' . $yourusername . '\'';
$adminActivate = $smcFunc['db_query']('', $querystringb, array());

echo $yourusername . ' should now be an admin';
?>

Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on January 19, 2015, 06:25:40 AM
Yeah, as the first post says, passwords are supported with J! under 3.0. With new J! versions it is not...

You don't need to run any query or script ;) It is the *last* topic of that page.
Just go to phpmyadmin, smf database, table smf_members. Find your admin user, write your password in the "passwd" field and clear the field "password_salt". Now, when you try to login in SMF, it will hash your password as usual. Your members will need to recover the password via email, yes ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on January 19, 2015, 06:44:42 AM
`password_salt`SELECT * FROM `cit_members`

I should clear the `password_salt` or this whole `password_salt`SELECT * FROM `cit_members` ? Sorry if too slow to pick up :)


wait... looks like i saw it now. :)

Sorry, you are out of login chances. Please come back and try again later.

Should i really wait? :)

there's nothing on on the "password_salt" field
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on January 19, 2015, 06:49:19 AM
No. You should do that ONLY for your own member.

You don't need to run any query, phpmyadmin will do it for you ;)
When you open your "members" table all the fields for each member will be shown. Just find your member in that list, then scroll to the right, delete what is on the "passwd" field and write your password, press enter, scroll to the right again, delete what is on the "password_salt" field, press enter.
Done :)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on January 19, 2015, 07:00:58 AM
I'm ok now with the admin account. I think the only last problem now is the attached photos. thanks

Why almost all of the attached pictures are just blank like this? thanks...


[attachment=336]IMG_0130.JPG[/attachment]

[attachment=337]IMG_0131.JPG[/attachment]

[attachment=338]IMG_0136.JPG[/attachment]


I changed the theme then the pictures that didnt show up, can be seen now. What are other things that should i check?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on January 19, 2015, 07:48:57 AM
SMF doesn't really support inline attachments... You can install this MOD by dougiefresh
http://custom.simplemachines.org/mods/index.php?mod=3770
But I'm not sure if the syntax of the BBC is the same :(
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on January 19, 2015, 07:54:36 AM
I'm sorry if this question is so basic.  This is about from the previous post that i saw about  the oversized avatar. Where can i found the load.css that i need to put this ?      
Quote'image' => $profile['avatar'] == '' ? ($profile['id_attach'] > 0 ? '<img class="avatar" style="max-width:100px; max-height:100px" src="' . (empty($profile['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $profile['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $profile['filename']) . '" alt="" />' : '') : (stristr($profile['avatar'], 'http://') ? '<img class="avatar" src="' . $profile['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" />' : '<img class="avatar" src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($profile['avatar']) . '" alt="" />'),


If ever i install that mod then those attachment will show up? I'm wondering why when i changed the theme then the other attachement shows up.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on January 19, 2015, 07:59:34 AM
No idea. Which theme is it?

There is no load.css. There is a Load.php in folder Sources. It's exactly like in that post that you've seen: Edit the file with a good editor (eg: Notepad++), find the first line, replace that with the second line ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on January 19, 2015, 09:52:14 AM
It's a success! I can't believe it! :) Please remind me if i forgot something else. :0  Thank you Margarette... Who's next now!? :)


Looks like some topics are gone. I have a locked topic where i put all the banned posts but looks like its gone now. Im still checking for other posts that some of replies are gone too. Im not really sure about it but i think  its ok than staying on kunena :D  Some of the members become moderator but its manageable
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on January 19, 2015, 01:39:45 PM
Thank you for your feedback. I glanced over the converter again, no idea how members got to moderators.
About the missing topics/posts: make sure you run the maintenance tasks in SMF after conversion (check for errors, recount totals).

PS: it's "margarett", no "e" in the end :P :P
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on January 22, 2015, 04:46:31 AM
May i know what can i do with those posts and pics that are gone now when i converted?  Some of the members gonna be mad because they spent their time posting it.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on January 22, 2015, 06:08:36 AM
I still have no idea why these posts are missing. The converter doesn't exclude anything that might cause that, methinks.
Do you still have access to your original database?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on January 24, 2015, 04:42:21 AM
Cool! So there's still chance. I thought its normal to the converter. Maybe i'll try to reinstall it. What should i need to do with the original?  I switch back to kunena so members are posting again so i might use the updated original database. Please give me the things i should do and avoid so the convertion will become smooth. thanks
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on January 24, 2015, 06:45:20 AM
You can try the conversion again (it will delete the current content in SMF of course), then we can compare both topics and find the missing content ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on January 30, 2015, 10:31:42 PM
thank you.

Another question. I noticed that the folder/link of the old kunena forum can still be accessed. Is't safe to show them the link? Will there be no problem if they can access it? I want to show it to them too. Is't ok? Or should i upload it to another folder or link? Any suggestions?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on January 31, 2015, 05:04:02 AM
Well no... After you are happy with the conversion (and only at that time) you should remove your old forum ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on January 31, 2015, 06:41:19 AM
I will remove it but i want to give them a month so they could also see if there are problems. I didnt get what you mean of no. Ist safe?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on January 31, 2015, 09:43:19 AM
It isn't unsafe ;) But if you keep two forums live, you risk having content generated in both (and then you can't really merge it...)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on January 31, 2015, 07:02:47 PM
ok thanks. Maybe in few weeks i will shut down the other copy of the forum.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on January 31, 2015, 09:48:31 PM
May i know what's wrong with this?


Converting...
Converting members... Unsuccessful!
This query:
SELECT
m.userid AS id_member, SUBSTRING(md.username, 1, 80) AS member_name,
SUBSTRING(md.username, 1, 255) AS real_name,
IF(ISNULL(m.signature), '', SUBSTRING(m.signature, 1, 65534)) AS signature,
IF(ISNULL(m.posts), 0, m.posts) AS posts,
md.password AS passwd, '' AS password_salt,
IF(ISNULL(m.karma), 0, m.karma) AS karma_good, SUBSTRING(md.email, 1, 255) AS email_address,
SUBSTRING(m.location, 1, 255) AS location,
'1' AS is_activated,
IF (md.registerDate IS NULL, 0, UNIX_TIMESTAMP(md.registerDate)) AS date_registered,
IF (md.lastvisitDate IS NULL, 0, UNIX_TIMESTAMP(md.lastvisitDate)) AS last_login,
'1' AS hide_email,
IF(md.usertype = 'Super Administrator' OR mm.group_id = '8' OR mm.group_id = '7', 1, 0) AS id_group,
'' AS lngfile, '' AS buddy_list, '' AS pm_ignore_list, '' AS message_labels,
'' AS personal_text, '' AS website_title, '' AS website_url, '' AS icq,
'' AS aim, '' AS yim, '' AS msn, '' AS time_format, '' AS avatar,
'' AS usertitle, '' AS member_ip, '' AS secret_question, '' AS secret_answer,
'' AS validation_code, '' AS additional_groups, '' AS smiley_set, '' AS member_ip2
FROM `database_name`.ind_kunena_users AS m
LEFT JOIN `database_name`.ind_users AS md ON (m.userid= md.id)
LEFT JOIN `database_name`.ind_user_usergroup_map AS mm ON (m.userid= mm.user_id)
GROUP BY m.userid
LIMIT 0, 500;
Caused the error:
Unknown column 'md.usertype' in 'field list'
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on February 01, 2015, 02:08:57 AM
Quote from: margarett on January 31, 2015, 09:43:19 AM
It isn't unsafe ;) But if you keep two forums live, you risk having content generated in both (and then you can't really merge it...)

Is't ok if i will just lock the kunena forum before i remove it. So we can still copy whatever post that will be gone in converting
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on February 01, 2015, 05:28:16 AM
Quote from: snoob on January 31, 2015, 09:48:31 PM
May i know what's wrong with this?


Converting...
Converting members... Unsuccessful!
This query:
SELECT
m.userid AS id_member, SUBSTRING(md.username, 1, 80) AS member_name,
SUBSTRING(md.username, 1, 255) AS real_name,
IF(ISNULL(m.signature), '', SUBSTRING(m.signature, 1, 65534)) AS signature,
IF(ISNULL(m.posts), 0, m.posts) AS posts,
md.password AS passwd, '' AS password_salt,
IF(ISNULL(m.karma), 0, m.karma) AS karma_good, SUBSTRING(md.email, 1, 255) AS email_address,
SUBSTRING(m.location, 1, 255) AS location,
'1' AS is_activated,
IF (md.registerDate IS NULL, 0, UNIX_TIMESTAMP(md.registerDate)) AS date_registered,
IF (md.lastvisitDate IS NULL, 0, UNIX_TIMESTAMP(md.lastvisitDate)) AS last_login,
'1' AS hide_email,
IF(md.usertype = 'Super Administrator' OR mm.group_id = '8' OR mm.group_id = '7', 1, 0) AS id_group,
'' AS lngfile, '' AS buddy_list, '' AS pm_ignore_list, '' AS message_labels,
'' AS personal_text, '' AS website_title, '' AS website_url, '' AS icq,
'' AS aim, '' AS yim, '' AS msn, '' AS time_format, '' AS avatar,
'' AS usertitle, '' AS member_ip, '' AS secret_question, '' AS secret_answer,
'' AS validation_code, '' AS additional_groups, '' AS smiley_set, '' AS member_ip2
FROM `database_name`.ind_kunena_users AS m
LEFT JOIN `database_name`.ind_users AS md ON (m.userid= md.id)
LEFT JOIN `database_name`.ind_user_usergroup_map AS mm ON (m.userid= mm.user_id)
GROUP BY m.userid
LIMIT 0, 500;
Caused the error:
Unknown column 'md.usertype' in 'field list'


It's  ok now. I just reinstalled everything including my xampp. But im still curious what happened here.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on February 01, 2015, 05:44:15 AM
I'm still not yet done with my convertion of my kunena (canada -sample). At first it was all fine up to the point that i uploaded it already to my live host and convert my other the same  kunena forum(italy) except they are from different country but i didnt upload it to the live host. I restore my old kunena(canada) to my site because i need to figure out how to fix or install the gallery plugin. But now i tried to install again the kunena(canada) on my local host from my latest download of my akeeba back up. Then i converted it successfully to smf but when i tried to log in,  I cant log in even i  changed the password at the database table. And when i tried to explore the other tables. I saw the users of my other kunena(italy) inside the table. Im confused what happened? Can the members of kunena/smf(italy) will able to access the kunena/smf(canada) if i just ignored that which are two different forums? Please help me how to access the admin because even im done converting, i cant log in.


The bad thing is im already done. I was just going to fix the gallery then all those problems came up.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on February 01, 2015, 09:26:25 AM
I tried to repeat the process but i still cant log in even i changed the password at the table. When i tried to reinstall everything , i tried not to change the prefixes and let jml and smf_ remain. I checked the prefixes in the database, i didnt see the smf_  but what i saw is the smf prefix from my other country's forum which i used before when i tested it on xampp. I'm confused. I even tried the sql file uploaded around october and not from the first post.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on February 03, 2015, 05:23:40 AM
Now I'm confused :P

I have the feeling that you might have swapped databases or prefixes or...

The converter has no idea what's the purpose of the data it's converting. So if you got data from "italy" but wanted "canada" I can only assume you gave it the wrong database or prefix...
Title: Re: [WIP - Converter] Kunena 3.0
Post by: snoob on February 04, 2015, 02:57:23 AM
I just ignored it and tried to just let the suggested remain. Just like jml in restoring my kunena and smf_ installing smf
Title: Re: [WIP - Converter] Kunena 3.0
Post by: tranhiep_116 on February 04, 2015, 05:12:25 AM
nice beta, i try it so ;D
Title: Re: [WIP - Converter] Kunena 3.0
Post by: MM617 on February 24, 2015, 07:58:04 AM
Nice tool! :D

I'm facing a little problem though, I'm running Kunena 3.0.5 on my Joomla, now we are switching to SMF because it offers us much more pssibilities.

I followed the instructions and the conversion succeeded, but now on my SMF forum I get a blank page I did various refreshes and hard refreshes sometimes it shows up with the message I have to re-enter my password because of the security reasons.. but then again returns a blank page..

What could be causing this issue?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on February 24, 2015, 05:16:13 PM
Check your server logs. Also check the table smf_log_errors via phpmyadmin.
Let us know if you find anything worth mentioning ;)

PS: welcome to SMF ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: MM617 on February 24, 2015, 05:50:48 PM
I just checked the smf_log_errors table, it contains the 3 following lines:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Foi60.tinypic.com%2F2w5q9w8.jpg&hash=7ba036b8cee7c1e4efc3299e6831e3188f2b291f)

I didn't find my server logs yet since I have no clue where they are located, I'll get back to that ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on February 24, 2015, 06:02:22 PM
Nothing too much there, nothing that would cause your issues ;)

Do you have a file called error_log somewhere in your forum folder?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: MM617 on February 25, 2015, 03:38:12 AM
I checked my root, my joomla, forum & subfolders but it seems there's no error_log file in any of these.. Might a re-install of SMF help?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on February 25, 2015, 05:23:51 AM
No, not really...

A white page is usually a PHP error. Check with your host where to find PHP's error log
Title: Re: [WIP - Converter] Kunena 3.0
Post by: MM617 on February 25, 2015, 07:56:41 AM
I contacted my host, they gave me a piece of code to add to the htaccess file to display the errors on screen when something goes wrong, but that doesn't work either.. they told me the htaccess could be cached so I cleaned the serve cache and it still doesn't appear, if that's the case they told me to look into my CMS system because it might override the settings.. but I enabled error reporting in Joomla and still no errors are displayed so I'm pretty lost now ???
Title: Re: [WIP - Converter] Kunena 3.0
Post by: MM617 on February 26, 2015, 05:06:06 AM
Quote from: MM617 on February 25, 2015, 07:56:41 AM
I contacted my host, they gave me a piece of code to add to the htaccess file to display the errors on screen when something goes wrong, but that doesn't work either.. they told me the htaccess could be cached so I cleaned the serve cache and it still doesn't appear, if that's the case they told me to look into my CMS system because it might override the settings.. but I enabled error reporting in Joomla and still no errors are displayed so I'm pretty lost now ???

I didn't find a way to edit the previous message so I'm sorry for the double, I figured out something new though.. I noticed that the passwords of all users are changed to a long slug of text, I changed mine in the table and I managed to log in succesfully after logging in everything works like a charm.. then I asked my girlfriend to take a look and she got the blank page.. the error log of the forum shows nothing, I did all the maintenance and that worked well too.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on February 26, 2015, 06:29:46 AM
The passwords are copied directly from Kunena/J! to SMF so there is no interaction in the converter about that.

If you use J! up to 2.5, SMF will recognize the password directly. Starting from J! 3.0 the password hashing was changed in J! and SMF does not recognize them anymore. So everyone needs to reset their passwords in order to login. It shouldn't cause a white page, though :( just a failed login

QuoteI noticed that the passwords of all users are changed to a long slug of text
No "serious" software stores the passwords in plain text. That would be a humongous security hole. If you go and see your password now in SMF table, it will be hashed again.

What J! version are you coming from?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: peer79 on April 01, 2015, 05:01:43 AM
I'm transferring my kunena 3.07 forum to smf, and tried to convert the data with this converter.
Got the database info working, but when converting I'm getting this error.

Converting members... Unsuccessful!
This query:

    SELECT
    m.userid AS id_member, SUBSTRING(md.username, 1, 80) AS member_name,
    SUBSTRING(md.username, 1, 255) AS real_name,
    IF(ISNULL(m.signature), '', SUBSTRING(m.signature, 1, 65534)) AS signature,
    IF(ISNULL(m.posts), 0, m.posts) AS posts,
    md.password AS passwd, '' AS password_salt,
    IF(ISNULL(m.karma), 0, m.karma) AS karma_good, SUBSTRING(md.email, 1, 255) AS email_address,
    SUBSTRING(m.location, 1, 255) AS location,
    '1' AS is_activated,
    IF (md.registerDate IS NULL, 0, UNIX_TIMESTAMP(md.registerDate)) AS date_registered,
    IF (md.lastvisitDate IS NULL, 0, UNIX_TIMESTAMP(md.lastvisitDate)) AS last_login,
    '1' AS hide_email,
    IF(md.usertype = 'Super Administrator' OR mm.group_id = '8' OR mm.group_id = '7', 1, 0) AS id_group,
    '' AS lngfile, '' AS buddy_list, '' AS pm_ignore_list, '' AS message_labels,
    '' AS personal_text, '' AS website_title, '' AS website_url, '' AS icq,
    '' AS aim, '' AS yim, '' AS msn, '' AS time_format, '' AS avatar,
    '' AS usertitle, '' AS member_ip, '' AS secret_question, '' AS secret_answer,
    '' AS validation_code, '' AS additional_groups, '' AS smiley_set, '' AS member_ip2
    FROM `4718estafette`.jos_kunena_users AS m
    LEFT JOIN `4718estafette`.jos_users AS md ON (m.userid= md.id)
    LEFT JOIN `4718estafette`.jos_user_usergroup_map AS mm ON (m.userid= mm.user_id)
    GROUP BY m.userid
    LIMIT 0, 500;

Caused the error:

    Table '4718estafette.jos_user_usergroup_map' doesn't exist

Should I make an new entry in the 4717estafette database? or should I exclude something in the converter? I don't know :$
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on April 01, 2015, 05:26:27 AM
Hi and welcome to sm.org ;)

I never saw that :o

Which J! version are you using? That table is a Joomla table, not Kunena's...
Title: Re: [WIP - Converter] Kunena 3.0
Post by: peer79 on April 01, 2015, 05:41:45 AM
I'm on joomla 2.5.27

PHP gebouwd op    Linux web18 3.16.0-33-generic #44~14.04.1-Ubuntu SMP Fri Mar 13 10:33:29 UTC 2015 x86_64
Database versie    5.1.73-0ubuntu0.10.04.1
Database collatie    utf8_general_ci
PHP versie    5.5.9-1ubuntu4.7
Webserver    Apache
WebServer naar PHP interface    apache2handler
Joomla! versie    Joomla! 2.5.27 Stable [ Ember ] 30-September-2014 14:00 GMT
Joomla! Platform versie    Joomla Platform 11.4.0 Stable [ Brian Kernighan ] 03-Jan-2012 00:00 GMT
Gebruikersagent    Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on April 01, 2015, 07:02:03 AM
It's strange, because I developed the converter using exactly J! 2.5.something...
Title: Re: [WIP - Converter] Kunena 3.0
Post by: peer79 on May 04, 2015, 02:07:49 PM
I finally did the convertion, installed smf on the new location, installed the same joomla version, copied the kunena directory to the new site, inserted the kunena tables from the database and run the converter.
The only issue is now that the atachements are missing, due to this error.
open_basedir restriction in effect.
The host has open base_dir disabled, is there a way to insert the attachements?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on May 04, 2015, 03:18:06 PM
Well, the files really have to be copied...

Your open_basedir is not disabled... It if was, you wouldn't get that error...

Your only possibility is to install SMF in the same folder as Joomla... Then the open_basedir protection should give you no problems.
Then after the conversion you move SMF's files to their final location and run repair_settings to fix the paths ;)
Title: Re: [WIP - Converter] Kunena 3.0
Post by: peer79 on May 05, 2015, 01:31:51 PM
I tried the opposit, joomla is installed with an folder named joomla within the same folder as smf.
Also copied the kunena folders directly into the smf folder, and tried to run the converter, still the same error.
Title: Re: [WIP - Converter] Kunena 3.0
Post by: margarett on May 05, 2015, 01:48:24 PM
OK, let me try to understand...

When the converter starts, do you see a warning "The converter detected that your host has open_basedir enabled on this server.  Please ask your host to disable this setting or try moving the contents......" in the converter itself?

Also, where did you see the error "open_basedir restriction in effect"?
Title: Re: [WIP - Converter] Kunena 3.0
Post by: blix on August 14, 2016, 07:00:18 AM
Hello and thanks for reading...

is there any way to convert kunena 4.0.11 to smf?