Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
dmtalon
New Member
New Member



Joined: May 10, 2006
Posts: 21

PostPosted: Tue May 16, 2006 11:20 am Reply with quote

Ok...

Long story short I have apparently 'converted' my stand alone phpBB2 forum to RavenNuke76 the hard way. Instead of reading and finding a nice import / BB2Nuke script I manually exported my phpBB2 database and then manually changed phpBB2 -> nuke_bb as well as changing phpBB2_users to nuke_users in the sql dump.

This has, obviously to some of you, caused a few problems. There are a few different 'defaults' within nukeBB etc.. I think I've gotten just about everything 'fixed' except the user_regdate.

I see within the BB2Nuke fixit script that there is a function in there to take the data (including user_regdate) out of your phpBB2 database and import it into your nuke db while converting the unix timestamps of phpBB2 into human readable dates.

I don't quite know enough about php/scripting to create a script to conver my already imported nuke_users.user_regdate into ahuman readable date.

Could anyone here wip up a php scrip or mysql statement that would do that?

Thanks,

Dallace
 
View user's profile Send private message
montego
Site Admin



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

PostPosted: Fri May 19, 2006 6:50 am Reply with quote

<bump>

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
dmtalon







PostPosted: Fri May 19, 2006 7:07 am Reply with quote

Without any input, I'm just manually (through phpmyadmin) doing this. 188 times...
 
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Mon Jun 19, 2006 12:41 am Reply with quote

This part of my conversion script is designed to do this

You need to create the connections to the database and define $phpbb_prefix and $user_prefix

Code:


    $sSQL = "SELECT config_value FROM ".$phpbb_prefix."_config where config_name = 'board_timezone'";
    $result = mysql_query($sSQL);
    list($board_timezone) = mysql_fetch_row($result);
   $sSQL = "SELECT user_id, user_regdate FROM ".$user_prefix . "_users WHERE user_id > 1";
   $result = mysql_query($sSQL);
   if ($result) {
      while(list($user_id, $user_regdate) = mysql_fetch_row($result)) {
         $user_regdate =  gmdate("M d, Y", $user_regdate + (3600 * $board_timezone));
         $sSQL = "UPDATE " . $user_prefix . "_users SET user_regdate = '" . $user_regdate . "' WHERE user_id = '" . $user_id . "'";
         if(!mysql_query($sSQL)) {
         echo "Error updating table " . $user_prefix . "_users user_regdate " . $user_regdate . " - " . mysql_error() . "<br />";
         }
      }
   } else {
         echo "Error grabbing users from " . $user_prefix . "_users for user_regdate  - " . mysql_error() . "<br />";
   }

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

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 ©