|
#1
|
||||
|
||||
Import Users
This script is working 100%
i tested it and you can import the users and users don't even have to recover the pass This code is very useful when you try to change from one source to another i did it my friend wanted to change from X*m to Tbdev and it worked fine Note: All Thanks goes to Aurthor of this code use this import.php Code:
<?php require_once("include/bittorrent.php"); dbconn(); # Table Names $old_tableprefix = "users2"; // Old table name $new_tableprefix = "users"; //New Table Name #$query = do_mysql_query("SELECT id, username, email, added, secret, passhash, uploaded, downloaded, donor, gender, country, vip_until FROM {$old_tableprefix}") or sqlerr(__FILE__,__LINE__); $query = do_mysql_query("SELECT id, username, email, added, secret, passhash, uploaded, downloaded, gender, status FROM {$old_tableprefix}") or sqlerr(__FILE__,__LINE__); stdhead(); echo "I will try to update user table --> "; $count=0; while ($olduser = mysql_fetch_assoc($query)) { // $id = intval($olduser['id']); // if ($id == 1) // $class = UC_SYSOP; // else // $class = UC_USER; $id = sqlesc($olduser['id']); $username = sqlesc($olduser['username']); $passhash = sqlesc($olduser['passhash']); $secret = sqlesc($olduser['secret']); $email = sqlesc($olduser['email']); $added = sqlesc($olduser['added']); $uploaded = sqlesc($olduser['uploaded']); $downloaded = sqlesc($olduser['downloaded']); // $donor = sqlesc($olduser['donor']); $gender = sqlesc($olduser['gender']); $status = sqlesc($olduser['status']); // $country = sqlesc($olduser['country']); // $donoruntil = sqlesc($olduser['vip_until']); /* do_mysql_query("INSERT INTO {$new_tableprefix} (id,username,email,passhash,secret,added,uploaded,downloaded,donor,gender,countr y,donoruntil) VALUES ($id, $username, $email, $passhash, $secret, $added, $uploaded, $downloaded, $donor, $gender, $country, $donoruntil)"); $count++; } */ do_mysql_query("INSERT INTO {$new_tableprefix} (id,username,email,passhash,secret,added,uploaded,downloaded,gender,status) VALUES ($id, $username, $email, $passhash, $secret, $added, $uploaded, $downloaded, $gender, $status)"); $count++; } echo "Done.. Total {$count} users has been updaded... Note: All users should recover their password..."; stdfoot(); ?> Because it will not import passkey [ its not added in importing code] Code:
UPDATE users SET passkey=md5(passhash); If can make this code better please do so and some feedback :D Update: you can also try this SQL queries Code:
INSERT INTO users (field1, field2, field3, field4) SELECT field1, field2, field3, field4 FROM users3 Code:
REPLACE INTO users (field1, field2, field3, field4) SELECT field1, field2, field3, field4 FROM users3 Sam007@tbdev.net |
#2
|
|||
|
|||
Re: [TBDev]Import Users
Import users from WHAT to tbdev?! or tbdev to WHAT?!
|
#3
|
|||
|
|||
Re: [TBDev]Import Users
posted by me on tbdev :P aka sam007 :P
you can important users from nearly any source to any source. hope this helps
__________________
I install Site Source for $ |
#4
|
||||
|
||||
Re: [TBDev]Import Users
not PMBT it wont because I dont have some of them tabble and my user status is not the same neather is user level they use 1,2,3 and I use user premium moderator and admin.
I was going to creat a script that would allow for you to get table info and then select what you wanted to transfer in to what table. and A good source changer should also convert your torrents and files to shouldn't it?
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent Do not ask me to make a mod for any other source Do not Ask me to setup your site. I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum My Current Demo is here http://demo.btmanager.org/ |
#5
|
|||
|
|||
Re: [TBDev]Import Users
Code:
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) |
#6
|
|||
|
|||
how do u use this add your code in ftp also import.php go to db leave users table there add the sql above thats it??
|
#7
|
||||
|
||||
Quote:
It did users, torrents, forum posts, the code is pretty interesting, as it builds a cross reference list. but it shouldnt be that much more work to have it export to a different tracker source. |
#8
|
|||
|
|||
not working,is showing a blank page :(
|
Tags |
import , users |
Thread Tools | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Q??] Import users | Zuby | Gazelle | 0 | 16th March 2010 21:40 |
import users and torrent | Njep | TBDev | 3 | 5th March 2009 10:42 |
Import Users Tbdev Netmaniack 1.6 to Yuna Scatari v2.0 r 2.1 | Izacic | Yuna Scatari Edition (YSE) | 0 | 21st February 2009 19:26 |
Import Users TT --> TS | zape | Template Shares | 0 | 23rd October 2008 18:23 |
Import Users | Swompen | Template Shares | 0 | 30th July 2008 06:32 |