PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
ozbutcher
Worker
Worker


Joined: Jan 17, 2007
Posts: 170

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

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: 7481
Location: Arizona

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

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


Joined: Jan 17, 2007
Posts: 170

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

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


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

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

OpenOffice Calc should work just the same. Good luck!
View user's profile Send private message Visit poster's website
ozbutcher
Worker
Worker


Joined: Jan 17, 2007
Posts: 170

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

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


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

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

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


Joined: Jan 17, 2007
Posts: 170

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

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


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

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

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


Joined: Jan 17, 2007
Posts: 170

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

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
View user's profile Send private message
Gremmie
Former Moderator in Good Standing


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

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

Yeah the password scheme is most likely different.
View user's profile Send private message
montego
Site Admin


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

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

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.
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum