4
I'm going to have to do some importing myself so I had a look at this.
The MySQL utils that come with MySql can be used. I have shell access, you'll need this too if you do this.
The idea is to dump the db to a text file then use that as an example to create a text file of sql commands.
This can then be used by the MySQL utils to import the links. It wasn't too hard.
In the XOOPS admin, Activate the links, set up the Categories and add a link for an example.
Now get the DB into a text file:
mysqldump [-hhostname if not local] -uuser -ppassword XOOPS > xoops.sql
Assuming the XOOPS db is called xoops, and your MySQL user name is user with a password of password. This will dump ALL of the XOOPS DB to xoops.sql as ascii text.
You'll see your example links in this file.
Have a look at section under
-- Dumping data for table `xoops_mylinks_cat`
to find the number for each link group like this
INSERT INTO xoops_mylinks_cat VALUES (1,0,'News','http://');
in the above link the number for the News cat' is 1. It is a sub'cat' of cat 0, I guess that 0 is top cat'.
You'll need to note the number if you want catogories, other wise just make one general one and add them all to that. The cat number should be 1.
Heres a line I just imported:
----sql-start---
use xoops;
INSERT INTO xoops_mylinks_links VALUES (2,1,'boingboing','http://boingboing.net','',1,1,1101166311,1,0.0000,0,0);
INSERT INTO xoops_mylinks_text VALUES (2,'Boing boing: Interesting things.');
----sql-end----
There are two lines for each link
The first number must increment for the next link eg:
INSERT INTO xoops_mylinks_links VALUES (3,1,'Slashdot','ht..
INSERT INTO xoops_mylinks_text VALUES (3,'Slashdot: tech news
The second number is the Category. I've left all mine as 1, the news Category.
Other then that, change the name and the url in the first line and the description in the second.
save this file as new-links.sql then import them:
mysql -uuser -ppassword XOOPS < new-links.sql