XML 가져오기-내보내기


Tiki3 에서 소개되었습니다

xml 형식으로 페이지의 목록 혹은 구조체를 가져오기/내보내기를 할 수 있습니다
각각의 페이지는 다음의 내용과 함께 내보내기를 할 수 있습니다:

  • 기록
  • 댓글
  • 첨부 파일
  • 그림

내보내기는 다음을 포함하는 zip 파일을 생성합니다

  • wiki.xml 페이지
  • 각 페이지에 대한 디렉터리. 그리고 이 디렉터리의 각각은
    • page.txt: 페이지의 데이터를 포함함
    • 페이지의 모든 첨부 파일을 포함하는 첨부파일 디렉터리
    • 페이지 내부에 (
       Plugin Image
      No image specified. One of the following parameters must be set: fileId, randomGalleryId, fgalId, attId or src.
      위키 플러그인을 통하여) 포함된 모든 그림들을 포함하는 이미지 디렉터리
    • 각 기록의 모든 데이터를 포함하는 기록 디렉터리


wiki.xml 페이지의 예제

Copy to clipboard
<pages> <page zip="noel/page.txt"> <name>noel</name> <user>me</user> <comments> <comment>Joyeux Noel</comment> </comments> <images> <image zip="test1/images/fgal/2" where="fgal"> <wiki>/test/tikiwikitrunk/tiki-download_file.php?fileId=2&amp;display</wiki> </image> </images> <attachments> <attachment filename="noel.jpg" attId="1" zip="test1/attachments/1"> <filesize>89597</filesize> <filetype>image/jpeg</filetype> </attachment> </attachments> <history> <version version="1" zip="test1/history/1.txt"> <user><![CDATA[admin]]></user> </version> </history> </page> </pages>

이 예제는 매우 단순화 되었습니다. 더 많은 필드가 제공됩니다.

구조체에 대하여는 다음과 같은 것을 보실 수 있습니다.

Copy to clipboard
<structure> <page><name>noel</name></page> <structure> <page>1 noel</page> <structure> <page>1.1 noel</page> </structure> <structure> <structure> <page>2 noel</page> </structure> </structure>


내보내기는 위키->페이지 목록 혹은 구조체->구조체 목록 내부에서 실행가능 합니다
불러오기는 tiki-import_xml_zip.php 를 호출하여 실행가능 합니다
불러오기와 내보내기를 하려면 tiki_p_admin 권한이 있어야 합니다

Image

요구사항

php에 대한 ZipArchive 클래스 가 설치되어있어야만 합니다
(예: gentoo 에서는, emerge pecl-zip 후 서버를 재시작 하십시오)