Advanced search  

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]

Pages: [1]   Go Down

Author Topic: CPG users to PHPBB  (Read 2949 times)

0 Members and 1 Guest are viewing this topic.

harmzz

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
CPG users to PHPBB
« on: August 25, 2005, 06:05:01 pm »

Is it possible ??

Over 500 users need to be migrated...
« Last Edit: August 26, 2005, 08:47:54 am by GauGau »
Logged

Nibbler

  • Guest
Re: CPG users to PHPBB
« Reply #1 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.
Logged

harmzz

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: CPG users to PHPBB
« Reply #2 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
Logged

Nibbler

  • Guest
Re: CPG users to PHPBB
« Reply #3 on: August 25, 2005, 06:38:42 pm »

Keep questions about a mod on the thread dealing with that mod.
Logged
Pages: [1]   Go Up
 

Page created in 0.014 seconds with 15 queries.