===== 목표 ===== 다음 그림과 같이 hwp나 hwpx 파일도 아이콘을 볼 수 있게 바꿔 보자 {{:파일아이콘추가.png?400|}} ===== 아이콘 파일 추가 ===== 다음 위치에 png 혹은 gif 형식의 아이콘 파일을 넣어 주면 된다. (root)/lib/images/fileicons fileicons 폴더에는 16*16 픽셀을, 그 서브폴더인 32x32 폴더에는 32픽셀을, 그 다음에 svg폴더에는 svg 파일을 넣어주자 3군데에 모두 아이콘을 넣어주어야 한다. svg 폴더에 svg파일을 넣지 않으면 동작하지 않을 수 있다. ===== 캐시 새롭게 하기 ===== 도쿠위키의 [관리] -> [환경설정]에 들어간 후 아무거나 새롭게 고치자, 이를테면 템플릿을 다른 템플릿으로 바꾼 후 저장하고, 다시 원래 템플릿으로 바꾸고 저장하면 된다. 이렇게 환경설정을 새롭게 저장하면 도쿠위키의 캐시가 새롭게 된다. 그러면 새로운 파일확장자에도 아이콘이 적용됨을 알 수 있다. ===== 참고 : 파일업로드 확장자 추가하기 ===== 도쿠위키는 허용된 파일확장자만 업로드가 가능하다. hwp와 같은 확장자를 업로드 허용하려면 (root)/conf/mime.conf 파일을 수정하면 된다. 예시 파일은 다음과 같다. # Allowed uploadable file extensions and mimetypes are defined here. # To extend this file it is recommended to create a mime.local.conf # file. Mimetypes that should be downloadable and not be opened in the # should be prefixed with a ! jpg image/jpeg jpeg image/jpeg gif image/gif png image/png ico image/vnd.microsoft.icon mp3 audio/mpeg ogg audio/ogg wav audio/wav webm video/webm ogv video/ogg mp4 video/mp4 vtt text/vtt tgz !application/octet-stream tar !application/x-gtar gz !application/octet-stream bz2 !application/octet-stream zip !application/zip rar !application/rar 7z !application/x-7z-compressed pdf application/pdf ps !application/postscript rpm !application/octet-stream deb !application/octet-stream doc !application/msword xls !application/msexcel ppt !application/mspowerpoint rtf !application/msword hwp !application/hwp docx !application/vnd.openxmlformats-officedocument.wordprocessingml.document xlsx !application/vnd.openxmlformats-officedocument.spreadsheetml.sheet pptx !application/vnd.openxmlformats-officedocument.presentationml.presentation hwpx !application/hwp2022 sxw !application/soffice sxc !application/soffice sxi !application/soffice sxd !application/soffice odc !application/vnd.oasis.opendocument.chart odf !application/vnd.oasis.opendocument.formula odg !application/vnd.oasis.opendocument.graphics odi !application/vnd.oasis.opendocument.image odp !application/vnd.oasis.opendocument.presentation ods !application/vnd.oasis.opendocument.spreadsheet odt !application/vnd.oasis.opendocument.text psd image/vnd.adobe.photoshop xcf image/vnd.gimp svg image/svg+xml # You should enable HTML and Text uploads only for restricted Wikis. # Spammers are known to upload spam pages through unprotected Wikis. # Note: Enabling HTML opens Cross Site Scripting vulnerabilities # through JavaScript. Only enable this with trusted users. You # need to disable the iexssprotect option additionally to # adding the mime type here #html text/html #htm text/html #txt text/plain #conf text/plain #xml text/xml #csv text/csv # Also flash may be able to execute arbitrary scripts in the website's # context #swf application/x-shockwave-flash