News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

[WIP - Converter] Kunena 3.0

Started by margarett, September 02, 2014, 08:47:19 PM

Previous topic - Next topic

davecove

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?

margarett

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...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

davecove

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

margarett

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 ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

davecove

How do I let you check it? You want my Plesk credentials?

Dave

margarett

Yes, that's the best way. PM me the details ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Dragon41673

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!
Owner - Aries Games & Miniatures

larry007

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


margarett

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 ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

scotmk

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

margarett

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 ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

scotmk

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

larry007

@margarett

little feedback - my forum works still fine  ;)

thx

snoob

@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

margarett

Go for it! Just drop the latest "e" @ margarett because there isn't one :P
Let us know how it goes ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

snoob

#115
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 : )

margarett

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.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

snoob

What do you think? why i' getting having thaterror? thank you

margarett

#118
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)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

snoob

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

Advertisement: