Kunena 7.0.4 Released

The Kunena team has announce the arrival of Kunena 7.0.4 [K 7.0.4] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0

Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Important phpBB Migrator: Looking for phpBB3 users that want to convert their data to Kunena 1.6

More
14 years 11 months ago #94067 by frold

ron273 wrote: Frold,

I used your modified script.

Ronald


Cool, let me know if you spot any errors!

Please Log in or Create an account to join the conversation.

More
14 years 11 months ago - 14 years 11 months ago #94100 by ron273
Frold,

No errors, but I still miss the transfer of avatars to the Kunena database.

Therefor I created a script that works in my situation, only for the user uploaded avatars. I will post the code below, so everyone can use it. It does need modification for your specific situation, but I guess that goes without saying.

This will only work if Joomla and PHPBB3 are running out of the same database!
Code:
<?php /* * This is a script that will retrieve the user uploaded avatar names and puts them in the Kunena database * You need to manually move these images to the Kunena avatars folder. * Adjust to your own needs when needed */ /* * Generates avatar filename from the database entry */ function get_avatar_filename($avatar_entry, $avatar_salt) { global $config; $avatar_group = false; $ext = substr(strrchr($avatar_entry, '.'), 1); $avatar_entry = intval($avatar_entry); return $avatar_salt . '_' . (($avatar_group) ? 'g' : '') . $avatar_entry . '.' . $ext; } /* 1. Set some variables */ $dbhost = 'localhost'; $dbuser = 'your_db_username'; $dbpass = 'your_db_password'; $dbname = 'your_db_name'; $phpbb_prefix = "phpbb3_"; $joomla_prefix = "jos_"; /* 2. Connect to DB */ $db = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); mysql_select_db($dbname); /* 3. Get the avatar salt (say what??) from phpbb3_config */ $sql = "SELECT config_value FROM `{$phpbb_prefix}config` WHERE config_name = 'avatar_salt'"; $result = mysql_query($sql); $avatar_salt = mysql_fetch_row($result); $avatar_salt = $avatar_salt[0]; /* 4. Get the information we need from the corresponding tables */ $sql = "SELECT user_avatar, user_avatar_type, a.username as u_name, b.id as juserid FROM `{$phpbb_prefix}users` as a LEFT JOIN `{$joomla_prefix}users` as b ON a.username = b.username WHERE a.user_avatar_type = 1"; $result = mysql_query($sql); /* Create an array with all objects in it */ while ($row = mysql_fetch_object($result)) { $array[] = $row; } /* 5. Update the table jos_kunena_user with the right entries */ foreach ($array as $entry) { if ($entry->juserid > 0) { /* Create the real name for the avatar file */ $avatar_name = get_avatar_filename($entry->user_avatar, $avatar_salt); $sql2 = "UPDATE `{$joomla_prefix}kunena_users` SET avatar = 'users/$avatar_name' WHERE userid = '$entry->juserid' "; $action = mysql_query($sql2) or die('Could not update database for '.$avatar_name); } } /* 6. Copy the avatars from the PHPBB3 folder(/phpbb3/images/avatars/upload) to the kunena folder (/media/avatars/users) * This is a manual action, but I know there are some smartypants out there that can script this as well. */ echo "Please copy al the avatars from <span style=\"font-weight:bold;\">phpBB3/images/avatars/upload</span> to <span style=\"font-weight:bold;\">media/avatars/users</span>";

Maybe this can be used in the converter script.



Cheers,

Ronald
Last edit: 14 years 11 months ago by ron273.

Please Log in or Create an account to join the conversation.

More
14 years 11 months ago #94287 by rinuccio sp

Please Log in or Create an account to join the conversation.

More
14 years 11 months ago #94326 by ron273

rinuccio sp wrote: Attachment??? Any news?


Wat do you mean? What attachment and what news are you looking for?

Please Log in or Create an account to join the conversation.

More
14 years 11 months ago #94381 by rinuccio sp

Please Log in or Create an account to join the conversation.

More
14 years 11 months ago - 14 years 11 months ago #95045 by Lelldorianx
I'm interested in contributing. Does this still need more help? If so, my stats are:

phpbb3.0.7
Total posts 5859 | Total topics 766 | Total members 520 | Number Attachments 358

edit.: nevermind :/ no attachments :(
Last edit: 14 years 11 months ago by Lelldorianx.

Please Log in or Create an account to join the conversation.

Time to create page: 0.282 seconds