The goal of this page is to get all comments on how to convert articles from Wikini to Tikiwiki
Wikini: http://www.wikini.net/
Tikiwiki: http://www.tikiwiki.org
Status: Currently Testing Conversion
Source: Wikini MST Version
Champ Type Null Défaut
id int(10) Non
tag varchar(50) Non
time datetime Non 0000-00-00 00:00:00
body text Non
body_r text Non
owner varchar(50) Non
user varchar(50) Non
latest enum('Y', 'N') Non N
handler varchar(30) Non page
comment_on varchar(50) Non
tiki_pages
Champ Type Null Défaut Relié à Commentaires MIME
page_id int(14) Non
pageName varchar(160) Non
hits int(8) Oui NULL
data text Oui NULL
description varchar(200) Oui NULL
lastModif int(14) Oui NULL
comment varchar(200) Oui NULL
version int(8) Non 0
user varchar(200) Oui NULL
ip varchar(15) Oui NULL
flag char(1) Oui NULL
points int(8) Oui NULL
votes int(8) Oui NULL
cache text Oui NULL
wiki_cache int(10) Oui NULL
cache_timestamp int(14) Oui NULL
pageRank decimal(4,3) Oui NULL
creator varchar(200) Oui NULL
page_size int(10) Oui 0
lang varchar(16) Oui NULL
lockedby varchar(200) Oui NULL
created int(14) Oui NULL
is_html tinyint(1) Oui 0
1°) Get all pages from Wikini
2°) Convert all the Wikini syntax to Tikiwiki syntax
3°) Insert converted pages into the database
1°) Get all pages from Wikini
SQL Request to get all data from Wikini
SELECT * FROM `wikini_pages` where latest='Y'
2°) Convert all data from Wikini
Need to use regular expressions
then replace structures [[ x y ]] by (( x | y ))
Regular expression to catch Wikini pages: \[\[(\w*)\s((\w|\s)*)\]\]
In Visual Basic, the macro should be:
Private Sub Test() Dim reg_exp As New RegExp Dim t As String Selection.WholeStory t = Selection.Text reg_exp.Pattern = "\[\[(\w*)\s((\w|\s)*)\]\]" reg_exp.Global = True MsgBox reg_exp.Replace(t, "(($1 | $2))") End Sub
3°) Insert into Tikiwiki
Be sure to remove any similar pages with the same name
DELETE FROM tiki_pages;
INSERT INTO tiki_pages(pageName,data,user,version,creator,lastModif) SELECT tag, body, 'admin',1,'admin',1115680000 FROM `wikini_pages` WHERE latest='Y' and user<>'WikiNiInstaller';
UPDATE tiki_pages SET page_size = CHAR_LENGTH(data);
UPDATE tiki_pages SET data = REPLACE(data, "é","é");
UPDATE tiki_pages SET data = REPLACE(data, "è","è");
UPDATE tiki_pages SET data = REPLACE(data, "à","Ã ");
UPDATE tiki_pages SET data = REPLACE(data, "ê","ê");
UPDATE tiki_pages SET data = REPLACE(data, "ç","ç");
Database structure that matches
Actually at this point, I am wondering if it is not the best to manually copy data directly from the pages... but since I have many pages, ... that might take some time.
Let's see. In fact, in Wikini, all the different versions of the pages are stored. So we need first to extract latest articles from the Wikini pages and insert them into the Tikiwiki articles table.
1) |
21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting |
2) |
19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting |
3) |
Tiki birthday |