Author |
Message |
ozbutcher
Worker


Joined: Jan 17, 2007
Posts: 170
|
Posted:
Sun Aug 05, 2007 10:31 pm |
|
I'm not sure if this is the slightest bit possible or the best way to go about it.
Basically I'm trying to use PHPFileNavigator (http://pfn.sourceforge.net/) on my site (burnt-clan.com) and would like to transfer my users over without getting everyone to re-register.
The table structure is a lot smaller for PHPFileNavigator than the nuke one so I'm wondering if there are command lines to export specific fields only from the nuke table?
I started copy and pasting manually, rofl, but I wasn't getting anywhere!
This is the table structure of PHPfilenavigator for users:
Code:CREATE T A B L E `pfn_usuarios` (
`id` smallint(6) unsigned NOT NULL auto_increment,
`nome` varchar(50) NOT NULL default '',
`usuario` varchar(50) NOT NULL default '',
`contrasinal` varchar(50) NOT NULL default '',
`contrasinal_tmp` varchar(50) NOT NULL default '',
`email` varchar(50) NOT NULL default '',
`estado` tinyint(1) unsigned NOT NULL default '0',
`admin` tinyint(1) unsigned NOT NULL default '0',
`id_grupo` smallint(6) unsigned NOT NULL default '0',
`mantemento` date NOT NULL default '0000-00-00',
`descargas_maximo` bigint(20) unsigned NOT NULL default '0',
`cambiar_datos` tinyint(1) unsigned NOT NULL default '1',
PRIMARY KEY (`id`),
UNIQUE KEY `usuario` (`usuario`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
|
|
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Mon Aug 06, 2007 5:53 am |
|
ozbutcher, not sure of the translation of these fields, but I think you can use phpMyAdmin to export the data from nuke in CSV, XML, etc format. Pick the columns that you want to export and export only that data. You could then even bring that into something like Excel to re-order your columns and can even use its cell-string concatenation abilities to create SQL INSERT statements that you can then import using phpMyAdmin into your pfn table. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
ozbutcher

|
Posted:
Mon Aug 06, 2007 7:35 am |
|
I'll see if I can figure that out. I'm using open office so not sure if its got the same features as excel. I think the php language is spanish, but I can kinda guess most of the fields. I'll let ya know how it goes. |
|
|
|
 |
montego

|
Posted:
Mon Aug 06, 2007 6:22 pm |
|
OpenOffice Calc should work just the same. Good luck! |
|
|
|
 |
ozbutcher

|
Posted:
Tue Aug 07, 2007 12:05 am |
|
got it working thanks! took a bit of fiddling but sussed it out.
is it possible for a php script to automate this process in the future? I would only want my clan members to have access to the file sharing script. So I was thinking...
maybe the script could ask for the user no, and upon entering by a admin the script could pull the neccessary user fields and inject them into the filesharing database? or isnt this possible with php?  |
|
|
|
 |
montego

|
Posted:
Tue Aug 07, 2007 6:26 am |
|
Yes, it could be done. In fact, you could even hook into the new user registration script to make sure and add them in both places automatically. But, you have to code the mySQL calls yourself to connect and execute SQL on the PHPfilenavigator database unless those tables also reside within your same nuke database. |
|
|
|
 |
ozbutcher

|
Posted:
Tue Aug 07, 2007 9:21 am |
|
ok cool. I guess I could merge the PHPfilenavigator database into nuke to make it easier.
is there a tutorial somewhere on how to make sql installers or should I be looking for sql or php specific tuts instead?  |
|
|
|
 |
montego

|
Posted:
Tue Aug 07, 2007 8:27 pm |
|
If you put the tables into your nuke database, then you can pattern your calls after the existing ones in PHP-Nuke.
If you keep them separate, I would just use the on-line mySQL manual on its web site. You will need to make a connection and then execute SQL commands through that connection. |
|
|
|
 |
ozbutcher

|
Posted:
Wed Aug 08, 2007 8:09 am |
|
I just found out today when I copied the user details over the passwords don't work for any of the users. could the phpfilenavigation be using a different password encryption method to nuke? I was hoping it was all a standard  |
|
|
|
 |
Gremmie
Former Moderator in Good Standing

Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA
|
Posted:
Wed Aug 08, 2007 8:30 am |
|
Yeah the password scheme is most likely different. |
_________________ Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module |
|
|
 |
montego

|
Posted:
Thu Aug 09, 2007 6:39 am |
|
Uuugghhhh... that "bites". There is no way to decrypt the one and re-encrypt it (at least no practical way). You may be left with actually figuring out how to modify phpfilenavigation's login code to either do MD5 or to read the PHP-Nuke cookie. |
|
|
|
 |
|