Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> MySQL
Author Message
ozbutcher
Worker
Worker



Joined: Jan 17, 2007
Posts: 170

PostPosted: Sun Aug 05, 2007 10:31 pm Reply with quote

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 ;
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Mon Aug 06, 2007 5:53 am Reply with quote

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! 
View user's profile Send private message Visit poster's website
ozbutcher







PostPosted: Mon Aug 06, 2007 7:35 am Reply with quote

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







PostPosted: Mon Aug 06, 2007 6:22 pm Reply with quote

OpenOffice Calc should work just the same. Good luck!
 
ozbutcher







PostPosted: Tue Aug 07, 2007 12:05 am Reply with quote

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? Smile
 
montego







PostPosted: Tue Aug 07, 2007 6:26 am Reply with quote

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







PostPosted: Tue Aug 07, 2007 9:21 am Reply with quote

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? Idea
 
montego







PostPosted: Tue Aug 07, 2007 8:27 pm Reply with quote

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







PostPosted: Wed Aug 08, 2007 8:09 am Reply with quote

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 Sad
 
Gremmie
Former Moderator in Good Standing



Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Wed Aug 08, 2007 8:30 am Reply with quote

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 
View user's profile Send private message
montego







PostPosted: Thu Aug 09, 2007 6:39 am Reply with quote

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.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> MySQL

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©