Demo

討論

保持飢餓,保持愚笨 (Stay hungry, stay foolish)。 史蒂夫·賈伯斯

公告

本網站已取消討論區的討論方式,如果您有問題請至LINE群行動條碼圖片網址,或Facebook社團

轉出XOOPS的會員到Joomla中

More
2006-11-01 07:50 #4739 來自 Eddy
Eddy created the topic: 轉出XOOPS的會員到Joomla中
沒實際用過,有試過的人給些意見吧。
< ?php
// Export XOOPS login information to Joomla
mysql_connect("localhost", "“, ““);
mysql_select_db(”“);

$sql = “SELECT * FROM xp_users”;
$result = mysql_query($sql);
$id = 69;

while ($row = mysql_fetch_object($result)) {
// convert XOOPS rank to Joomla usertype
// $gid is group_id from jos_core_acl_aro_groups (18: registered, 25: super admin)
if ($row->rank == 7) {
$type = “Super Administrator”;
$gid = 25;
}
else {
$type = “Registered”;
$gid = 18;
}

$date = date(”Y-m-d H:i:s”);

$id++;

// Joomla block field: 1: unconfirmed email, 0: confirmed email
// XOOPS level field : 0: unconfirmed email, 1: confirmed email

// insert into main Joomla user table
$sql = “INSERT INTO jos_users (id, name, username, email, password, usertype, block, sendEmail, gid, registerDate)
VALUES ($id, ‘$row->uname’, ‘$row->loginname’, ‘$row->email’, ‘$row->pass’, ‘$type’, 0, 1, $gid, ‘$date’)”;
mysql_query($sql);
$id = mysql_insert_id();

// insert into lookup tables
$sql = “INSERT INTO jos_core_acl_aro (section_value, value, order_value, name, hidden)
VALUES (’users’, ‘$id’, 0, ‘$row->uname’, 0)”;
mysql_query($sql);
$id = mysql_insert_id();

$sql = “INSERT INTO jos_core_acl_groups_aro_map (group_id, aro_id)
VALUES ($gid, $id)”;
mysql_query($sql);
}
?>

知之者不如好之者,好之者不如樂之者

Please 登入 to join the conversation.

  • pctone
  • pctone 的個人頭像
  • 訪客
  • 訪客
2006-11-01 09:33 #4742 來自 pctone
pctone replied the topic: 轉出XOOPS的會員到Joomla中
奇怪的問題, 上面程式碼區塊, 在 Windows XP Professional + Firefox 2.0 下, 畫面是亂的?

Please 登入 to join the conversation.

More
2006-12-18 17:16 #5269 來自 adaigo
adaigo replied the topic: 轉出XOOPS的會員到Joomla中

pctone 寫了道:: 奇怪的問題, 上面程式碼區塊, 在 Windows XP Professional + Firefox 2.0 下, 畫面是亂的?


在Mac OSX 10.4.8 Firefox2.0下也是亂的。
Safari2.0就不會。

Please 登入 to join the conversation.

  • yankashing36335
  • yankashing36335 的個人頭像
  • 訪客
  • 訪客
2006-12-18 18:48 #5272 來自 yankashing36335
yankashing36335 replied the topic: 轉出XOOPS的會員到Joomla中
Firefox看"code"好像是有問題...

Please 登入 to join the conversation.

  • mCity
  • mCity 的個人頭像
  • 訪客
  • 訪客
2006-12-26 14:59 #5397 來自 mCity
mCity replied the topic: 轉出XOOPS的會員到Joomla中
同樣在 Mozilla1.7.13 及 FireFox1.5.0.9
因為 CSS line-height

Please 登入 to join the conversation.

More
2007-03-25 20:13 #6420 來自 hoha5432
hoha5432 replied the topic: 轉出XOOPS的會員到Joomla中
怎麼使用@_@?

Please 登入 to join the conversation.

  • boscokam
  • boscokam 的個人頭像
  • 訪客
  • 訪客
2009-08-08 18:15 #15093 來自 boscokam
boscokam replied the topic: 轉出XOOPS的會員到Joomla中
can any brother tell me how to do it?
Thanks

Please 登入 to join the conversation.

  • yogur27
  • yogur27 的個人頭像
  • 訪客
  • 訪客
2009-08-09 17:45 #15105 來自 yogur27
yogur27 replied the topic: 轉出XOOPS的會員到Joomla中
要這樣轉,應該要轉格式才可以

Please 登入 to join the conversation.