CPG users to PHPBB CPG users to PHPBB
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

CPG users to PHPBB

Started by harmzz, August 25, 2005, 06:05:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

harmzz

Is it possible ??

Over 500 users need to be migrated...

Nibbler

It's possible, yes. There's no easy to use mod to accomplish it though. Try making a dump of your coppermine users table and then changing the field names using find/replace in your text editor. Then import into phpbb. Needs fair knowledge of phpbb and mysql though. You could try asking at phpbb, perhaps they have existing converters that could be adapted.

harmzz

cat cpg_users.csv | tr -d "\"" | while read LINE; do

       user_id=$(echo "$LINE" | cut -d ";" -f 1)
       user_active=$(echo "$LINE" | cut -d ";" -f 3)
       username=$(echo "$LINE" | cut -d ";" -f 4)
       user_password=$(echo "$LINE" | cut -d ";" -f 5)
       user_lastvisit=$(echo "$LINE" | cut -d ";" -f 6)
       user_regdate=$(echo "$LINE" | cut -d ";" -f 7)
       user_email=$(echo "$LINE" | cut -d ";" -f 9)
       user_website=$(echo "$LINE" | cut -d ";" -f 10)
       user_from=$(echo "$LINE" | cut -d ";" -f 11)
       user_interests=$(echo "$LINE" | cut -d ";" -f 12)
       user_occ=$(echo "$LINE" | cut -d ";" -f 13)
       user_actkey=$(echo "$LINE" | cut -d ";" -f 14)

       if [ "$user_active" == "YES" ]; then user_active="1"; fi
       if [ "$user_active" == "NO" ]; then user_active="0"; fi

       echo "INSERT INTO phpbb_users SET user_id='$user_id',user_active='$user_active',username='$username',user_password=MD5('$user_password'),user_lastvisit=UNIX_TIMESTAMP('$user_lastvisit'),user_regdate=UNIX_TIMESTAMP('$user_regdate'),user_email='$user_email',user_website='http://$user_websited',user_from='$user_from',user_interests='$user_interests',user_occ='$user_occ',user_actkey='$user_actkey',user_style='1',user_lang='english',user_viewemail='1',user_attachsig='1',user_allowhtml='0',user_notify='0',user_avatar='';"
done


When searching I found this, how does this script wok, i.e. qwhere do u put it in ?? anhy ideas

Nibbler

Keep questions about a mod on the thread dealing with that mod.