coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 (BBS) Integration / Bridging => Topic started by: harmzz on August 25, 2005, 06:05:01 PM

Title: CPG users to PHPBB
Post by: harmzz on August 25, 2005, 06:05:01 PM
Is it possible ??

Over 500 users need to be migrated...
Title: Re: CPG users to PHPBB
Post by: Nibbler on August 25, 2005, 06:08:00 PM
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.
Title: Re: CPG users to PHPBB
Post by: harmzz on August 25, 2005, 06:11:37 PM
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
Title: Re: CPG users to PHPBB
Post by: Nibbler on August 25, 2005, 06:38:42 PM
Keep questions about a mod on the thread dealing with that mod.