[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"blog-categories":3,"blog-category-omekas":78},[4,10,14,19,24,30,36,40,45,51,55,58,62,68,73],{"id":5,"databaseId":6,"name":7,"slug":8,"count":9},"dGVybTo1NQ==",55,"AI","ai",2,{"id":11,"databaseId":12,"name":13,"slug":13,"count":9},"dGVybTo2MQ==",61,"backend",{"id":15,"databaseId":16,"name":17,"slug":18,"count":16},"dGVybToyMA==",20,"Devops","devops",{"id":20,"databaseId":21,"name":22,"slug":22,"count":23},"dGVybToxNQ==",15,"frontend",25,{"id":25,"databaseId":26,"name":27,"slug":28,"count":29},"dGVybTo2MA==",60,"GAS","gas",1,{"id":31,"databaseId":32,"name":33,"slug":34,"count":35},"dGVybTo5",9,"HTML","html",4,{"id":37,"databaseId":38,"name":39,"slug":39,"count":29},"dGVybToyMg==",22,"mac",{"id":41,"databaseId":42,"name":43,"slug":43,"count":44},"dGVybTo2",6,"node",18,{"id":46,"databaseId":47,"name":48,"slug":49,"count":50},"dGVybTo2OQ==",69,"Nuxt","nuxt",3,{"id":52,"databaseId":53,"name":54,"slug":54,"count":50},"dGVybTo1NA==",54,"office",{"id":56,"databaseId":9,"name":57,"slug":57,"count":21},"dGVybToy","omekas",{"id":59,"databaseId":60,"name":61,"slug":61,"count":16},"dGVybToxNg==",16,"vue",{"id":63,"databaseId":64,"name":65,"slug":66,"count":67},"dGVybTo1",5,"WordPress","wordpress",13,{"id":69,"databaseId":29,"name":70,"slug":71,"count":72},"dGVybTox","無","uncategorized",null,{"id":74,"databaseId":75,"name":76,"slug":77,"count":9},"dGVybTo3MA==",70,"生活","life",[79,93,105,118,130,142,154,165,175,186,197,208,219,230,241],{"id":80,"slug":81,"title":82,"description":83,"content":84,"date":85,"image":86,"imageAlt":82,"author":87,"categories":90,"path":92,"minRead":29},3364,"omekas-4-0-0釋出囉！","OmekaS 4.0.0釋出囉！","OmekaS 4.0.0釋出囉！ 過個年假，發現OmekaS 默默推出4.0了！這次更新滿不錯的，補足了很多之 […]","\u003Ch1>OmekaS 4.0.0釋出囉！\u003C\u002Fh1>\n\u003Cp>過個年假，發現OmekaS 默默推出4.0了！這次更新滿不錯的，補足了很多之前遇到的需求，稍微快速檢視一下更新的內容吧！\u003Cbr \u002F>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fomeka\u002Fomeka-s\u002Freleases\u002Ftag\u002Fv4.0.0\" title=\"更新資訊\">更新資訊\u003C\u002Fa>\u003C\u002Fp>\n\u003Ch2>系統更新\u003C\u002Fh2>\n\u003Cp>現在全面支援PHP8.1和8.2，最低需求為PHP 7.4\u003C\u002Fp>\n\u003Ch2>重點更新\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\n\u003Cp>Resource page blocks強化資源區塊的設定\u003Cbr \u002F>\n稍微用了一下，這次將過去要靠外掛補足的資源頁面區塊位置直接放到原生系統中了，也就是每個資源頁面(例如條目、媒體等等)，如果要放置某些特製區塊，像是後設資料、圖片、地圖資訊等等，然後需要編排位置，現在可以透過這個設定來實作，但看起來需要在主題中先埋好相關設計。\u003Cbr \u002F>\n預設主題中可以看到「Configure resource pages」選項，使用這個選項就能進行上述操作。看來之後要做主題得更放心思在後台操控性上了。\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>Configurable browse columns and sorting瀏覽介面的控管與瀏覽\u003Cbr \u002F>\n首先是後台的頁面新增了排序，小功能，哈哈哈XD但另一個就是重磅功能，現在於使用者(User)管理中，可以單獨針對每個使用者賦予不同頁面、資源等權限控制，太棒了，過去貧弱的資源控管終於有較強的管理功能，這個功能出現代表能在較大型的單位中使用囉，可以切各不同單位的使用者。\u003C\u002Fp>\n\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>其他更新\u003C\u002Fh2>\n\u003Cp>只稍微列出我覺得很需要一提的更新內容\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Resources, metadata, and description\u003Cbr \u002F>\nAdded a &quot;Select all&quot; option when using quick add on resource selection sidebars\u003Cbr \u002F>\n在區塊工具中的資源選擇器，現在有全選了\u003C\u002Fli>\n\u003Cli>Search\u003Cbr \u002F>\n原生進階搜尋多了更多細部的設定\u003C\u002Fli>\n\u003Cli>Sites\u003Cbr \u002F>\n站點的排除資源現在不會被連結到\u003Cbr \u002F>\n屬性標籤資訊可以在特定站點個別設定\u003Cbr \u002F>\n頁面編輯器現在有展開與收納，好功能！\u003C\u002Fli>\n\u003C\u002Ful>\n","2023-02-07T12:04:06","\u002Fapi\u002Fproxy-image?url=https%3A%2F%2Fpost.billxu.net%2Fwp-content%2Fuploads%2F2022%2F05%2FOmekaBadge.png",{"name":88,"link":89},"Chih Fan","http:\u002F\u002Fpost.billxu.net",[91],{"name":57,"slug":57},"\u002Fblog\u002Fomekas-4-0-0釋出囉！",{"id":94,"slug":95,"title":96,"description":97,"content":98,"date":99,"image":86,"imageAlt":96,"author":100,"categories":101,"path":104,"minRead":29},118,"omekas實作分散架構的omekas-on-dcoker","[OmekaS]實作分散架構的OmekaS on Dcoker","實作分散架構的omekas on Dcoker 好吧，我不太確定這次標題要怎麼寫XD終於完成了專案的環境轉移， […]","\u003Ch1>實作分散架構的omekas on Dcoker\u003C\u002Fh1>\n\u003Cp>好吧，我不太確定這次標題要怎麼寫XD終於完成了專案的環境轉移，原先我們的OmekaS是建置Vmware上，最近由於辦公室搬遷關係，順便做了系統環境大搬遷(\u003Cdel>才怪\u003C\u002Fdel>)，這邊就分享整個架構的作法與遇到問題。\u003C\u002Fp>\n\u003Ch3>架構說明\u003C\u002Fh3>\n\u003Cp>考慮到一個好系統的三大特性：可靠性 (Reliabilty)、可擴展性 (Scalability)、可維護性 (Maintainability)，毅然決然選定了Docker為基礎來進行轉移，並且一定要實作負載平衡(load balancing)，由於辦公室已經採用proxmox(PVE)環境(上述的Vmware架在別的辦公室)，那就來試試看PVE的LXC(LinuX Containers) + Docker吧！\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>也許有人會問用了LXC為什麼還要用Docker？我們的考量點是也許未來不一定還會使用PVE環境，為了最大幅度的可搬遷性決定使用泛用度更高的Docker\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Cp>既然已經選定建置方式了，那接下來就得考慮幾個實務問題：\u003C\u002Fp>\n\u003Col>\n\u003Cli>資料庫放在哪？\u003C\u002Fli>\n\u003Cli>檔案放在哪？\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch4>關於資料庫\u003C\u002Fh4>\n\u003Cp>OmekaS使用MySQL，因為分散架構關係，我們將SQL拉出去獨立做一台Docker。\u003C\u002Fp>\n\u003Ch4>關於檔案\u003C\u002Fh4>\n\u003Cp>麻煩的就在於檔案，但還好OmekaS這種典藏系統我們在使用過程中不太常出現大量檔案存取問題，所以考慮「共同存取」特性就好，於是決定使用了NAS來存放系統文件，再使用NFS形式mount在不同台主機中，實作「共同存取」功能。\u003C\u002Fp>\n\u003Cp>根據上述，最後就會產生出幾台Docke in LXC的服務(參考架構圖)\u003Cbr \u002F>\nFrontend(WebServer) \u003Cem> 2\u003Cbr \u002F>\nBackend(SQL) \u003C\u002Fem>1\u003Cbr \u002F>\nNAS * 1 (採用trueNAS建置)\u003C\u002Fp>\n\u003Cp>\u003Cimg decoding=\"async\" src=\"\u002Fapi\u002Fproxy-image?url=https%3A%2F%2Fpost.billxu.net%2Fwp-content%2Fuploads%2F2022%2F08%2FOmekas%E8%99%9B%E6%93%AC%E5%8C%96%E6%9E%B6%E6%A7%8B.drawio.png\" alt=\"架構圖\" \u002F>\u003C\u002Fp>\n\u003Cp>相關文章：\u003Ca href=\"https:\u002F\u002Fpost.billxu.net\u002Farchives\u002F111\" title=\"docker-compose for OmekaS\">docker-compose for OmekaS\u003C\u002Fa>\u003C\u002Fp>\n\u003Ch3>遇到問題\u003C\u002Fh3>\n\u003Cp>一如往常地沒那麼順利，很快就遇到幾個問題XD\u003C\u002Fp>\n\u003Ch4>NAS掛載\u003C\u002Fh4>\n\u003Cp>原本我們打算使用synology的NAS來當作Docker使用的磁碟區，已解決共同使用，但最後發現檔案權限會卡住，以至於OmekaS不能順利取用媒體。最後只好改為在PVE中也建置一台NAS來掛載，原本擔心效能但發現其實還不錯。\u003Cbr \u002F>\n使用NAS掛載要注意幾件事：\u003C\u002Fp>\n\u003Col>\n\u003Cli>我們是用NFS來實作\u003C\u002Fli>\n\u003Cli>注意LSC的特權容器要打開\u003C\u002Fli>\n\u003Cli>docker-compose.yml的特權不一定要開\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch4>sendmail\u003C\u002Fh4>\n\u003Cp>OmekaS有些功能會需要寄信，這部分就會需要本機內建smtp，所以要加上兩件事，首先是Dockerfile中要設定安裝與啟動sendmail\u003C\u002Fp>\n\u003Cpre>\u003Ccode>RUN apt-get update &amp;&amp; \\\n    apt-get install -y --no-install-recommends sendmail &amp;&amp; \\\n    rm -rf \u002Fvar\u002Flib\u002Fapt\u002Flists\u002F*\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>再來就是需要賦予FQDN這樣sendmail才能正常運作，須在docker-compose.yml加上\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-yml\">hostname: &lt;your-domain&gt; #need FQDN for mail\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch4>喚醒\u003C\u002Fh4>\n\u003Cp>以下是兩台設定的分享\u003C\u002Fp>\n\u003Ch3>Backend(SQL)\u003C\u002Fh3>\n\u003Ch4>docker-compose.yml\u003C\u002Fh4>\n\u003Cpre>\u003Ccode class=\"language-yaml\">version: &quot;3&quot;\n\nservices:\n  mariadb:\n    image: mariadb:latest\n    restart: always\n    environment:\n      MYSQL_ROOT_PASSWORD: blabla\n      MYSQL_DATABASE: omeka\n      MYSQL_USER: user\n      MYSQL_PASSWORD: password\n    ports:\n      - &quot;3306:3306&quot;\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3>Frontend\u003C\u002Fh3>\n\u003Ch4>docker-compose.yml\u003C\u002Fh4>\n\u003Cpre>\u003Ccode class=\"language-yaml\">version: &quot;3&quot;\n\nservices:\n  omekas:\n    build: .\n    container_name: omekas\n    hostname: &lt;your-domain&gt; #need FADN for mail\n    restart: always\n    ports:\n      - &quot;80:80&quot;\n    volumes:\n      - html:\u002Fvar\u002Fwww\u002Fhtml\n    privileged: true\n\nvolumes:\n  html:\n    driver_opts:\n      type: &quot;nfs&quot;\n      o: &quot;addr=address&quot;\n      device: &quot;:\u002Ffloder\u002F&quot;\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch4>Dockerfile\u003C\u002Fh4>\n\u003Cpre>\u003Ccode>FROM pudding\u002Fdlll-paas-base-image:php-7.4-apache-20220617-1837\n\nUSER root\nEXPOSE 80\nRUN apt-get update &amp;&amp; \\\n    apt-get install -y --no-install-recommends sendmail &amp;&amp; \\\n    rm -rf \u002Fvar\u002Flib\u002Fapt\u002Flists\u002F*\n\nRUN docker-php-ext-configure gd --with-freetype --with-jpeg --enable-gd\nRUN docker-php-ext-install gd\n\nRUN rm -rf \u002Fvar\u002Fwww\u002Fhtml\nRUN mkdir -p \u002Fvar\u002Fwww\u002Fhtml\n\nWORKDIR \u002Fvar\u002Fwww\u002F\n\nCOPY .\u002Fwait-for-it.sh \u002Fvar\u002Fwww\u002Fwait-for-it.sh\nRUN chmod +x wait-for-it.sh\n\n#start senmail\nRUN sed -i &#039;\u002F#!\\\u002Fbin\\\u002Fsh\u002Faservice sendmail restart&#039; \n\nCMD [&quot;.\u002Fwait-for-it.sh&quot;, &quot;targetHost:port&quot;,&quot;--strict&quot;, &quot;--&quot;, &quot;apache2-foreground&quot;]\n\u003C\u002Fcode>\u003C\u002Fpre>\n","2022-10-27T10:00:50",{"name":88,"link":89},[102,103],{"name":17,"slug":18},{"name":57,"slug":57},"\u002Fblog\u002Fomekas實作分散架構的omekas-on-dcoker",{"id":106,"slug":107,"title":108,"description":109,"content":110,"date":111,"image":112,"imageAlt":108,"author":113,"categories":114,"path":117,"minRead":29},130,"omkeas關於資源取用的xmlhttprequest問題","[OmkeaS]關於資源取用的XMLHttpRequest問題","關於資源取用的XMLHttpRequest問題 終於將機器從VM搬到Proxmox上了，也移植到docker中 […]","\u003Ch1>關於資源取用的XMLHttpRequest問題\u003C\u002Fh1>\n\u003Cp>終於將機器從VM搬到Proxmox上了，也移植到docker中，然後就發現到一個問題，條目的圖片居然無法從Viewer中讀取出來。怎麼會這樣勒，從console中會看到有個錯誤，寫著\u003Cem>This request has been blocked; the content must be served over HTTPS\u003C\u002Fem>，\u003Cem>會發現到有個關鍵字XMLHttpRequest\u003C\u002Fem>，看來是出現了Https取用Http的的混用問題。\u003Cbr \u002F>\n但說來慚愧，現在才注意到這個問題也是因為原本網站還沒有使用Https，所以一直沒發現到OmekaS存在這個狀況。\u003C\u002Fp>\n\u003Ch2>OmekaS的資源取用問題\u003C\u002Fh2>\n\u003Cp>我們會發生這個問題要先提到Universal viewer這個模組，經過檢查發現Universal viewer會呼叫配置檔以及IIIF的API，然後都是走\u003Cem>Http\u003C\u002Fem>，而這個取用路徑似乎包在Universal viewer的JS中，很難直接修改。\u003C\u002Fp>\n\u003Ch2>解決作法\u003C\u002Fh2>\n\u003Cp>遇到XMLHttpRequest問題其實滿好處理的，從Stockflow上可以找到好幾種建議，大致上會分三種：\u003C\u002Fp>\n\u003Cblockquote>\n\u003Col>\n\u003Cli>As Chrome suggests, change your API calls to use HTTPs (recommended)：將取用資源也改為Https\u003C\u002Fli>\n\u003Cli>Use HTTP instead of HTTPs：網站改為Http\u003C\u002Fli>\n\u003Cli>Add the following meta tag to your \u003Chead> element in your HTML：在head加入以下宣告\u003C\u002Fli>\n\u003C\u002Fol>\n\u003C\u002Fblockquote>\n\u003Cpre>\u003Ccode class=\"language-html\">&lt;meta http-equiv=&quot;Content-Security-Policy&quot; content=&quot;upgrade-insecure-requests&quot;&gt;\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>第二種很明顯在這個年代來說不適合，而第一種因為很難改動Universal viewer的呼叫方式變得很困難執行，雖然是最佳解。於是剩下第三種，直接允許瀏覽器接受混用狀態。\u003C\u002Fp>\n\u003Cp>實作方式有兩種：\u003C\u002Fp>\n\u003Col>\n\u003Cli>在theme的view&gt;layout.phtml中加入標頭\u003C\u002Fli>\n\u003Cli>在theme中的view&gt;universal viewer&gt;play.phtml中加入標頭\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>就看專案中怎麼取用Universal viewer工具囉。\u003C\u002Fp>\n","2022-09-20T12:00:42","",{"name":88,"link":89},[115,116],{"name":33,"slug":34},{"name":57,"slug":57},"\u002Fblog\u002Fomkeas關於資源取用的xmlhttprequest問題",{"id":119,"slug":120,"title":121,"description":122,"content":123,"date":124,"image":112,"imageAlt":121,"author":125,"categories":126,"path":129,"minRead":29},128,"dockerno-jpeg-support-in-this-php-build-in-docker","[Docker]No JPEG support in this PHP build in Docker","No JPEG support in this PHP build in Docker 先前建置完OmekaS […]","\u003Ch1>No JPEG support in this PHP build in Docker\u003C\u002Fh1>\n\u003Cp>先前建置完OmekaS的Docker，運作一段時間後發現圖片出不來的狀況，然後會看到類似的訊息「....No JPEG support in this PHP build.....in GD.....」。\u003C\u002Fp>\n\u003Cp>透過phpinfo()呼叫php訊息會發現GD庫的列表中，獨缺JPEG support選項，表示目前運作的GD庫設定沒有啟用支援JPEG功能，於是得重新呼叫，作法很簡單，只要在Dockerfile中加上以下指令。\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-yml\">...\n.....\nRUN docker-php-ext-configure gd --with-freetype --with-jpeg --enable-gd\nRUN docker-php-ext-install gd\n.....\n...\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>重新build後再up就正常了。\u003C\u002Fp>\n","2022-09-14T10:00:28",{"name":88,"link":89},[127,128],{"name":17,"slug":18},{"name":57,"slug":57},"\u002Fblog\u002Fdockerno-jpeg-support-in-this-php-build-in-docker",{"id":131,"slug":132,"title":133,"description":134,"content":135,"date":136,"image":112,"imageAlt":133,"author":137,"categories":138,"path":141,"minRead":29},111,"omekasomekas的docker設定","[OmekaS]docker-compose for OmekaS","docker-compose for OmekaS 最近寫了一台OmekaS的docker，連結在這。 在這邊 […]","\u003Ch1>docker-compose for OmekaS\u003C\u002Fh1>\n\u003Cp>最近寫了一台OmekaS的docker，\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fbillxu0521\u002Fomeka-S-docker\" title=\"連結\">連結\u003C\u002Fa>在這。\u003Cbr \u002F>\n在這邊分享與補充說明。\u003C\u002Fp>\n\u003Ch2>說明\u003C\u002Fh2>\n\u003Cp>這是安裝好mariaDB + OmekaS + phpMyadmin的 Docker in LXC 容器\u003Cbr \u002F>\nLXC容器(Linux Container)跟Docker其實有滿大的關係，由於現在工作的環境使用了proxmox，跟同事討論後決定實現了Docker in LXC來擴展各種服務，於是誕生了這個docker。\u003C\u002Fp>\n\u003Cp>雖然說in LXC但稍做修改也可以當作一般Docker使用。(其實也沒啥需要修改)\u003C\u002Fp>\n\u003Cp>希望使用docker能加速OmekaS的推廣，歡迎多多使用囉。\u003C\u002Fp>\n\u003Ch4>重點\u003C\u002Fh4>\n\u003Cul>\n\u003Cli>有設定自動開機，LXC啟動後會開啟docker\u003C\u002Fli>\n\u003Cli>OmekaS尚未設定完成，初次啟動後需要進入OmekaS install程序\u003C\u002Fli>\n\u003Cli>OmekaS版本為3.2.2\u003C\u002Fli>\n\u003Cli>volume掛載lxc容器內\u002Froot中，方便做系統升級\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>啟動\u003C\u002Fh2>\n\u003Cpre>\u003Ccode class=\"language-shell\">docker-compose up\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>OmekaS的系統文檔放置在LXC的環境中 若需要更新或放置檔案，開啟ssh使用SFTP傳輸即可\u003C\u002Fp>\n\u003Cp>\u003Cstrong>預設帳號為 admin@test.io \u002F password\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Ch4>docker-compose.yml\u003C\u002Fh4>\n\u003Cul>\n\u003Cli>預設將phpMyadmin的關閉\u003C\u002Fli>\n\u003Cli>記得若修改密碼，須同步修改omeka-s\u002Fconfig\u002Fdatabase.ini\u003C\u002Fli>\n\u003Cli>記得修改hostname，設定hostname是為了確保sendmail正常運作\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>放置資料\u003C\u002Fh2>\n\u003Cp>若需要放置模組、主題等檔案 請放置到目錄對應docker-compose.yml中omekas的volume。若使用LXC環境則參考repo內說明。\u003C\u002Fp>\n\u003Ch3>備註\u003C\u002Fh3>\n\u003Cp>Omekas安裝時需注意files的權限，在這個備份範本中已經處理完畢\u003Cbr \u002F>\n另外也要注意config\u002Fdatabase.ini也已經設定完畢，指向到DB。\u003C\u002Fp>\n\u003Ch4>偵測啟動\u003C\u002Fh4>\n\u003Cp>(參考)[\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fvishnubob\u002Fwait-for-it\">https:\u002F\u002Fgithub.com\u002Fvishnubob\u002Fwait-for-it\u003C\u002Fa>] 預設已經註解掉 參照Dockerfile#detect DB 由於自動開機後要確保DB已經先運作再啟動OmekaS 所以多加了wait-for-it的偵測動作 此bash會先偵測DB是否先啟動，若不啟動則重試直到有偵測到\u003C\u002Fp>\n\u003Cp>記得放置或新增wait-for-it.sh，剩下Dockefile會處理\u003C\u002Fp>\n","2022-09-02T10:00:44",{"name":88,"link":89},[139,140],{"name":17,"slug":18},{"name":57,"slug":57},"\u002Fblog\u002Fomekasomekas的docker設定",{"id":143,"slug":144,"title":145,"description":146,"content":147,"date":148,"image":112,"imageAlt":145,"author":149,"categories":150,"path":153,"minRead":29},107,"omekas筆記-可能為php8影響的問題","[OmekaS]筆記-可能為php8影響的問題","可能為php8影響的問題 筆記一下，最近在製作OmekaS的docker版本，遇到一個錯誤，我們摋用了3.1、 […]","\u003Ch1>可能為php8影響的問題\u003C\u002Fh1>\n\u003Cp>筆記一下，最近在製作OmekaS的docker版本，遇到一個錯誤，我們摋用了3.1、3.2版都遇到此問題。\u003C\u002Fp>\n\u003Cp>當系統安裝完後，建置一個有上傳「媒體」的條目時，會發生錯誤，改為開發者模式查錯誤時會跳出下面訊息。\u003Cbr \u002F>\n查了老半天推斷可能是採用了php8基版的image，降級成7.4後就沒問題了，還不確定到底是什麼原因，有可能為目前OmekaS採用的laminas framework對於php的支援還在7.x。\u003C\u002Fp>\n\u003Cpre>\u003Ccode>Omeka S encountered an error\nLaminas\\Session\\Exception\\InvalidArgumentException\n‘session.name’ is not a valid sessions-related ini setting.\u003C\u002Fcode>\u003C\u002Fpre>\n","2022-08-29T20:00:19",{"name":88,"link":89},[151,152],{"name":17,"slug":18},{"name":57,"slug":57},"\u002Fblog\u002Fomekas筆記-可能為php8影響的問題",{"id":155,"slug":156,"title":157,"description":158,"content":159,"date":160,"image":112,"imageAlt":157,"author":161,"categories":162,"path":164,"minRead":29},102,"omekas允許大量上傳檔案的file-sideload模組","[Omekas]允許大量上傳檔案的File Sideload模組","允許大量上傳檔案的File Sideload模組 在我們使用OmekaS過程中，尤其是建置資料時一定會遇到一件 […]","\u003Ch1>允許大量上傳檔案的File Sideload模組\u003C\u002Fh1>\n\u003Cp>在我們使用OmekaS過程中，尤其是建置資料時一定會遇到一件經典的障礙——就是當有大量資料需要建置時，由使用者分別一個一個進行很花費人力與時間。\u003Cbr \u002F>\n當然OmekaS官方就有提供\u003Ca href=\"https:\u002F\u002Fomeka.org\u002Fs\u002Fmodules\u002FCSVImport\u002F\" title=\"批次上傳的模組\">批次上傳的模組CSVImport\u003C\u002Fa>來解決這個問題，但CSVImport提供的是Item的metadata批次建置，若遇到有大量的媒體文檔也需要放上來時，就需要搭配這個File Sideload一起使用了。\u003C\u002Fp>\n\u003Ch2>使用方式\u003C\u002Fh2>\n\u003Cp>官方的操作手冊在\u003Ca href=\"https:\u002F\u002Fomeka.org\u002Fs\u002Fdocs\u002Fuser-manual\u002Fmodules\u002Ffilesideload\u002F\" title=\"這邊\">這邊\u003C\u002Fa>。使用方式很簡單，安裝之後，應該會直接看到一個設定欄位(預設在模組的File Sideload的設定中)，有兩個欄位需要設定。\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Sideload Directory：這邊是設定Sideload的預設目錄，建議在原本web server file(omeka-s)中的files建立upload目錄\u003C\u002Fli>\n\u003Cli>Delete sideloaded file? ：這個選項勾選後，當檔案上傳完後會自動刪除上傳資料夾的檔案(以上述例子就是upload目錄)。\u003Cbr \u002F>\n當然要記得files資料夾的權限喔，理論上安裝好的都是755，若遇到資料夾權限問題則可以重新調整權限。\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cpre>\u003Ccode class=\"language-shell\">$ chmod 755 files -R\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>到這邊基本上就可以使用File Sideload了。\u003C\u002Fp>\n\u003Cp>接下來記得將想要放的檔案(如圖片、影像等)透過FTP或是其他檔案傳輸形式將檔案放置到upload目錄中，就能透過其他流程使用這些檔案了。\u003C\u002Fp>\n\u003Ch2>Item Media\u003C\u002Fh2>\n\u003Cp>預設做法在建置Item時，切換到Media分頁時，會在右側看到File Sideload選項(如圖)\u003C\u002Fp>\n\u003Cp>\u003Cimg decoding=\"async\" src=\"\u002Fapi\u002Fproxy-image?url=https%3A%2F%2Fpost.billxu.net%2Fwp-content%2Fuploads%2F2022%2F07%2F%E6%88%AA%E5%9C%96-2022-07-27-%E4%B8%8A%E5%8D%8811.57.39.png\" alt=\"\" \u002F>\u003C\u002Fp>\n\u003Cp>選擇此選項後，可以看到預先放好的檔案列表(如圖)\u003C\u002Fp>\n\u003Cp>\u003Cimg decoding=\"async\" src=\"\u002Fapi\u002Fproxy-image?url=https%3A%2F%2Fpost.billxu.net%2Fwp-content%2Fuploads%2F2022%2F07%2F%E6%88%AA%E5%9C%96-2022-07-27-%E4%B8%8A%E5%8D%8811.59.12.png\" alt=\"\" \u002F>\u003C\u002Fp>\n\u003Cp>選擇對應的檔案名稱後，就能跟原本的Add Item一樣囉。\u003C\u002Fp>\n\u003Ch2>大量上傳\u003C\u002Fh2>\n\u003Cp>如果要大量上傳的話，則需透過CSVImort搭配使用，基本概念如上，先將檔案放好後，在CSV欄位中加入一個對應檔案的欄位，裡面輸入檔案名稱的值，匯入過程時將該欄位指定為\u003Cstrong>\u003Cem>File Sideloaded\u003C\u002Fem>\u003C\u002Fstrong>，就能進行大量檔案上傳建置囉。\u003C\u002Fp>\n","2022-08-23T20:00:35",{"name":88,"link":89},[163],{"name":57,"slug":57},"\u002Fblog\u002Fomekas允許大量上傳檔案的file-sideload模組",{"id":75,"slug":166,"title":167,"description":168,"content":169,"date":170,"image":86,"imageAlt":167,"author":171,"categories":172,"path":174,"minRead":29},"omekas如何製作多國語系檔案","[OmekaS]如何製作多國語系檔案","如何製作多國語系檔案 在Omeka S中能切換不同的語言，因此在修改或製作主題\u002F模組時就得考慮加入多國語系，至 […]","\u003Ch1>如何製作多國語系檔案\u003C\u002Fh1>\n\u003Cp>在Omeka S中能切換不同的語言，因此在修改或製作主題\u002F模組時就得考慮加入多國語系，至少做個對應中文與英文\u003C\u002Fp>\n\u003Cp>製作方式不難，採用的就是gettext(i18n)的作法\u003C\u002Fp>\n\u003Cp>首先需要*.po(zh_TW.po) 如果是繁體中文，就用對應的語言簡稱(zh_TW)\u003C\u002Fp>\n\u003Cp>內容大概像這樣\u003C\u002Fp>\n\u003Cpre>\u003Ccode># Translation for the XXX plugin for Omeka.\n# Copyright (C) 2011 Roy Rosenzweig Center for History and New Media\n# This file is distributed under the same license as the Omeka package.\n# \n# Translators:\n# billxu &lt;billxu0521@gmail.com&gt;, 2020\nmsgid &quot;&quot;\nmsgstr &quot;&quot;\n&quot;Project-Id-Version: Omeka\\n&quot;\n&quot;Report-Msgid-Bugs-To: http:\u002F\u002Fgithub.com\u002Fomeka\u002Fplugin-Guest\u002Fissues\\n&quot;\n&quot;POT-Creation-Date: 2012-01-09 21:49-0500\\n&quot;\n&quot;PO-Revision-Date: 2020-04-12 01:18+0000\\n&quot;\n&quot;Last-Translator: billxu &lt;billxu0521@gmail.com&gt;\\n&quot;\n&quot;Language-Team: \\n&quot;\n&quot;MIME-Version: 2.0\\n&quot;\n&quot;Content-Type: text\u002Fplain; charset=UTF-8\\n&quot;\n&quot;Content-Transfer-Encoding: 8bit\\n&quot;\n&quot;Language: zh_TW\\n&quot;\n&quot;Plural-Forms: nplurals=1; plural=0;\\n&quot;\n\nmsgid &quot;Close Menu&quot;  \u002F\u002F這是原始字串原文\nmsgstr &quot;關閉選單&quot;  \u002F\u002F翻譯後\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>再來使用po轉檔成的mo檔 \u003Ca href=\"https:\u002F\u002Fezgif.com\u002Fmo-to-po\" title=\"線上轉換器\">線上轉換器\u003C\u002Fa>\u003C\u002Fp>\n\u003Cp>若開發新模組需要在config\u002Fmodule.config.php中新增下面參數，讓OmekaS能讀到你的語系檔位置\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-php\">&#039;translator&#039; =&gt; [\n        &#039;translation_file_patterns&#039; =&gt; [\n            [\n                &#039;type&#039; =&gt; &#039;gettext&#039;,\n                &#039;base_dir&#039; =&gt; dirname(__DIR__) . &#039;\u002Flanguage&#039;,\n                &#039;pattern&#039; =&gt; &#039;%s.mo&#039;,\n                &#039;text_domain&#039; =&gt; null,\n            ],\n        ],\n    ],\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>html要導入多國語系設定需要要先宣告\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-php\">$translate = $this-&gt;plugin(&#039;translate&#039;);\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>接著再對應的位置用這種寫法即可\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-php\">&lt;?= $translate(&#039;Close Menu&#039;)?&gt;  \u002F\u002F\u002F顯示字串關閉選單\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>在php只要呼叫這樣即可\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-php\">$translate(&#039;Close Menu&#039;),  \u002F\u002F\u002F顯示字串關閉選單\u003C\u002Fcode>\u003C\u002Fpre>\n","2022-07-10T20:00:36",{"name":88,"link":89},[173],{"name":57,"slug":57},"\u002Fblog\u002Fomekas如何製作多國語系檔案",{"id":176,"slug":177,"title":178,"description":179,"content":180,"date":181,"image":86,"imageAlt":178,"author":182,"categories":183,"path":185,"minRead":29},67,"omekasomekas的內部api呼叫方式","[OmekaS]OmekaS的內部API(PHP API)呼叫方式","OmekaS的內部API呼叫方式 在OmekaS中大多會使用API來取用資料，主要能分為兩種，PHP的內部AP […]","\u003Ch1>OmekaS的內部API呼叫方式\u003C\u002Fh1>\n\u003Cp>在OmekaS中大多會使用API來取用資料，主要能分為兩種，PHP的內部API和REST的外部API，詳細介紹可以看以下連結：\u003Ca href=\"https:\u002F\u002Fomeka.org\u002Fs\u002Fdocs\u002Fdeveloper\u002Fapi\u002Fphp_api\u002F\" title=\"OmekaS_API參考\">OmekaS_API參考\u003C\u002Fa>，今天要來介紹PHP的API呼叫方式以及種類。\u003C\u002Fp>\n\u003Cp>OmekaS中有幾個api管理器，引用方式只要使用即可，以下舉例。\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-php\">use Omeka\\Api\\Representation\\SiteRepresentation;\nuse Omeka\\Api\\Representation\\SitePageRepresentation;\nuse Omeka\\Api\\Representation\\SitePageBlockRepresentation;\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>API用法則是在對應的php物件中取用。\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-php\">$view \u002F\u002F為PhpRenderer的物件\n$view-&gt;api()-&gt;search($resourceType, $query);\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>這是一個搜尋API，$resourceType是欲取用的物件類型，像是item、item set之類，$query則是查詢條件，下面為我使用的範例。\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-php\">$resourceType = $block-&gt;dataValue(&#039;resource_type&#039;, &#039;items&#039;); \u002F\u002F從$block取用所有item類型的物件\nparse_str($block-&gt;dataValue(&#039;query&#039;), $query); \u002F\u002F轉換文字\n$site = $block-&gt;page()-&gt;site(); \u002F\u002F限制從某個site取用\n$query[&#039;site_id&#039;] = $site-&gt;id();\n$response = $view-&gt;api()-&gt;search($resourceType, $query);\n$resources = $response-&gt;getContent();  \u002F\u002F重要，要使用取用的的item物件內容一定要加這句\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>$resources就是一個可以完整使用的物件資源了，如果取用的是item，那相關後設資料例如tittle等等都在裡面囉。\u003C\u002Fp>\n\u003Cp>官方給了數種API取用方法，更多資訊可以參考PHP\u003Ca href=\"https:\u002F\u002Fomeka.org\u002Fs\u002Fdocs\u002Fdeveloper\u002Fapi\u002Fphp_api\u002F\" title=\" API說明文件\"> API說明文件\u003C\u002Fa>\u003C\u002Fp>\n\u003Cul>\n\u003Cli>search($resource, $data, $options) 使用條件來搜尋資源\u003C\u002Fli>\n\u003Cli>read($resource, $id, $data, $options) 使用ID編號來取用資源\u003C\u002Fli>\n\u003Cli>create($resource, $data, $fileData, $options) 創建建立\u003C\u002Fli>\n\u003Cli>batchCreate($resource, $data, $fileData, $options) 批次建立資源\u003C\u002Fli>\n\u003Cli>update($resource, $id, $data, $fileData, $options) 更新資源\u003C\u002Fli>\n\u003Cli>batchUpdate($resource, $ids, $data, $fileData, $options) 批次更新資源\u003C\u002Fli>\n\u003Cli>delete($resource, $id, $data, $options) 刪除資源\u003C\u002Fli>\n\u003Cli>batchDelete($resource, $ids, $data, $options) 批次刪除資源\u003C\u002Fli>\n\u003C\u002Ful>\n","2022-07-04T10:20:49",{"name":88,"link":89},[184],{"name":57,"slug":57},"\u002Fblog\u002Fomekasomekas的內部api呼叫方式",{"id":187,"slug":188,"title":189,"description":190,"content":191,"date":192,"image":86,"imageAlt":189,"author":193,"categories":194,"path":196,"minRead":29},64,"omekasviewmodel的終端terminal模式","[OmekaS]viewModel的終端(Terminal)模式","viewModel的終端(Terminal)模式 剛好寫了一個模組有用到這個功能，所以筆記一下。在開發模組時， […]","\u003Ch1>viewModel的終端(Terminal)模式\u003C\u002Fh1>\n\u003Cp>剛好寫了一個模組有用到這個功能，所以筆記一下。在開發模組時，有些需求是讓某些route透過新分頁、新視窗獨立進行一些作用，這種狀況下會希望view裡面的html內容是脫離原先系統設計。\u003C\u002Fp>\n\u003Ch2>關於OmekaS的viewModel\u003C\u002Fh2>\n\u003Cp>但回頭先簡述一下OmekaS的viewModel，我通常會用於開發模組上，例如api、某些功能頁面等等，透過Controller來呼叫view。\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-php\">\u002F\u002F比如說某個index\npublic function indexAction()\n    {\n        $view = new ViewModel;  \u002F\u002F呼叫ViewModel\n        $view-&gt;setVariable(&#039;item&#039;, $item);  \u002F\u002F塞入你想在這個view中使用的object\n        return $view;\n    }\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>通常會這樣來宣告，然後你從對應的route位置取得的phtml中看到成果。(例如item會傳到對應的phtml，直接透過$item來用)\u003C\u002Fp>\n\u003Cp>而這樣的做法，頁面內容會包在原先的layout下。回到開頭所說，如果我們希望讓頁面具有獨立性的話要怎麼做呢？\u003C\u002Fp>\n\u003Ch2>使用終端(Terminal)模式\u003C\u002Fh2>\n\u003Cp>對，就是本次教學的內容，使用Terminal模式，就先稱呼為終端模式吧。使用方式很簡單，如下。\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-php\">public function indexAction()\n    {\n        $view = new ViewModel;  \n        $view-&gt;setVariable(&#039;item&#039;, $item);  \n        return $view-&gt;setTerminal(true); \u002F\u002F最後要這樣宣告\n    }\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>使用上述做法，就能讓這個view脫離原先layout的控制，變成完全獨立的頁面囉。但要注意，因為脫離原本的layout，所以有些基本資訊要自己重新宣告，像是引用script啦、meta啦之類的，都要自己重新加上去喔。\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-php\">\u002F\u002F範例如下，不然你只會呼叫到完全空白的頁面\n&lt;?php\n$translate = $this-&gt;plugin(&#039;translate&#039;);\n$this-&gt;headMeta()-&gt;setCharset(&#039;utf-8&#039;);\n$this-&gt;headMeta()-&gt;appendName(&#039;viewport&#039;, &#039;width=device-width, initial-scale=1&#039;);\n$this-&gt;headLink()-&gt;prependStylesheet(&#039;\u002F\u002Ffonts.googleapis.com\u002Fcss?family=Source+Code+Pro|Lato:400,400italic,700,700italic&#039;);\n$this-&gt;headTitle($this-&gt;setting(&#039;installation_title&#039;, &#039;Omeka S&#039;))-&gt;setSeparator(&#039; · &#039;);\n$this-&gt;headLink()-&gt;appendStylesheet($this-&gt;assetUrl(&#039;css\u002Ficonfonts.css&#039;, &#039;Omeka&#039;));\n$this-&gt;headScript()-&gt;prependFile($this-&gt;assetUrl(&#039;vendor\u002Fjquery\u002Fjquery.min.js&#039;, &#039;Omeka&#039;));\n?&gt;\n&lt;?php echo $this-&gt;doctype(); ?&gt;\n&lt;?php echo $this-&gt;htmlElement(&#039;html&#039;)-&gt;setAttribute(&#039;lang&#039;, $this-&gt;lang()); ?&gt;\n    &lt;head&gt;\n        &lt;?php echo $this-&gt;headMeta(); ?&gt;\n        &lt;?php echo $this-&gt;headTitle(); ?&gt;\n        &lt;?php echo $this-&gt;headLink(); ?&gt;\n        &lt;?php echo $this-&gt;headStyle(); ?&gt;\n        &lt;?php echo $this-&gt;headScript(); ?&gt;\n    &lt;\u002Fhead&gt;\n    &lt;?php echo $this-&gt;htmlElement(&#039;body&#039;)-&gt;appendAttribute(&#039;class&#039;, &#039;minimal&#039;); ?&gt;\n        &lt;?php echo $userBar; ?&gt;\n    &lt;\u002Fbody&gt;\n&lt;\u002Fhtml&gt;\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>我第一次寫的時候不知道要重新宣告引用的資源，花了好多時間研究為什麼自行引用\u003Cstrong>prependFile\u003C\u002Fstrong>的資源出不來XD\u003Cbr \u002F>\n因此稍微筆記一下，希望有幫助。\u003C\u002Fp>\n","2022-06-29T20:00:17",{"name":88,"link":89},[195],{"name":57,"slug":57},"\u002Fblog\u002Fomekasviewmodel的終端terminal模式",{"id":198,"slug":199,"title":200,"description":201,"content":202,"date":203,"image":86,"imageAlt":200,"author":204,"categories":205,"path":207,"minRead":29},59,"omekas模組item-carousel-block-條目輪播工具","[OmekaS]模組Item Carousel Block – 條目輪播工具","條目輪播工具 這是一個展示方面很方便的一個小工具，2.x版本時官方還沒推出，3.x終於有官方的版本了。 下載連 […]","\u003Ch1>條目輪播工具\u003C\u002Fh1>\n\u003Cp>這是一個展示方面很方便的一個小工具，2.x版本時官方還沒推出，3.x終於有官方的版本了。\u003Cbr \u002F>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fomeka-s-modules\u002FItemCarouselBlock\">下載連結\u003C\u002Fa>\u003Cbr \u002F>\n這個工具功用在於可以在站點上以輪播形式展示條目資料，雖然也可以用item showcase配合tempele達到同樣效果，但官方自己有在這個模組上做了一些細節設定，就算不自行開發輪播也足用使用了。\u003C\u002Fp>\n\u003Cp>缺點則是這個工具還沒更新tempele化，但沒有高度課制需求倒也沒差太多。\u003C\u002Fp>\n\u003Ch2>使用方式\u003C\u002Fh2>\n\u003Cp>安裝完模組後，可以在頁面(page)中的區塊工具(block)找到Item Carousel Block。\u003Cbr \u002F>\n點選後如下。\u003Cbr \u002F>\n\u003Cimg decoding=\"async\" src=\"\u002Fapi\u002Fproxy-image?url=https%3A%2F%2Fpost.billxu.net%2Fwp-content%2Fuploads%2F2022%2F06%2F%E6%88%AA%E5%9C%96-2022-06-15-%E4%B8%8B%E5%8D%884.44.01.png\" alt=\"\" \u002F>\u003C\u002Fp>\n\u003Cp>加入條目後就可以直接使用了，有一些設定。\u003Cbr \u002F>\n\u003Cstrong>Carousel title\u003C\u002Fstrong>:輪播標題。\u003Cbr \u002F>\n\u003Cstrong>Items per page\u003C\u002Fstrong>:每次輪播頁面顯示的條目數量。\u003Cbr \u002F>\n\u003Cstrong>Thumbnail type\u003C\u002Fstrong>：縮圖大小形式。\u003Cbr \u002F>\n\u003Cstrong>Show attachment title\u003C\u002Fstrong>:顯示附件名稱的內容。\u003Cbr \u002F>\n\u003Cstrong>Show attachment caption\u003C\u002Fstrong>:是否顯示附件標題。\u003Cbr \u002F>\n\u003Cstrong>Overlay title\u002Fcaption\u003C\u002Fstrong>:是否覆蓋標題，勾選後，標題會覆蓋在圖片上。\u003Cbr \u002F>\n\u003Cstrong>Text align\u003C\u002Fstrong>:文字位置。\u003Cbr \u002F>\n\u003Cstrong>Stretch Image\u003C\u002Fstrong>:圖片的拉展樣式。\u003Cbr \u002F>\n\u003Cstrong>Auto slide duration\u003C\u002Fstrong>:自動輪播的時間，單位為毫秒。如果設為0則不自動輪播。\u003Cbr \u002F>\n\u003Cstrong>Infinite loop\u003C\u002Fstrong>:無限輪播。\u003Cbr \u002F>\n\u003Cstrong>Fade between slides\u003C\u002Fstrong>:輪播是否改為漸進轉場。\u003Cbr \u002F>\n\u003Cimg decoding=\"async\" src=\"\u002Fapi\u002Fproxy-image?url=https%3A%2F%2Fpost.billxu.net%2Fwp-content%2Fuploads%2F2022%2F06%2F%E6%88%AA%E5%9C%96-2022-06-15-%E4%B8%8B%E5%8D%884.44.23.png\" alt=\"\" \u002F>\u003C\u002Fp>\n\u003Cp>設定完後，在站點上看技能看到這個區塊區塊囉。\u003C\u002Fp>\n","2022-06-22T10:20:58",{"name":88,"link":89},[206],{"name":57,"slug":57},"\u002Fblog\u002Fomekas模組item-carousel-block-條目輪播工具",{"id":209,"slug":210,"title":211,"description":212,"content":213,"date":214,"image":86,"imageAlt":211,"author":215,"categories":216,"path":218,"minRead":29},46,"omekas模組custom-vocab-建立權威詞表","[OmekaS]模組Custom Vocab-建立權威詞表","模組Custom Vocab 根據官方手冊Custom Vocab的說明如下： The Custom Voca […]","\u003Ch1>模組Custom Vocab\u003C\u002Fh1>\n\u003Cp>根據官方手冊\u003Ca href=\"https:\u002F\u002Fomeka.org\u002Fs\u002Fdocs\u002Fuser-manual\u002Fmodules\u002Fcustomvocab\u002F\" title=\"Custom Vocab\">Custom Vocab\u003C\u002Fa>的說明如下：\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>The Custom Vocab module allows you to create a controlled vocabulary and add it to a specific property in a resource template. When using that template for an item, the property will load with a dropdown limited to the options of the controlled vocabulary, rather than a text entry box.\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Cp>意思就是可以在資源範本中加入可以控制的詞彙資料，並且透過下拉式選單使用。簡單說就是在建立條目時，可以建立類似權威詞表的控制詞彙，限縮該欄位的資料內容。\u003Cbr \u002F>\n舉個例，假設我們要建立一個關於「台灣六都城市」的欄位，又不希望該欄位會被寫入「新竹縣」這類不屬於六都的資料，那就可以使用這個模組來達到目的\u003C\u002Fp>\n\u003Ch2>使用方式\u003C\u002Fh2>\n\u003Cp>首先在後台左側工具欄進入Custom Vocab設定頁面。\u003Cbr \u002F>\n\u003Cimg decoding=\"async\" src=\"\u002Fapi\u002Fproxy-image?url=https%3A%2F%2Fpost.billxu.net%2Fwp-content%2Fuploads%2F2022%2F06%2F%E6%88%AA%E5%9C%96-2022-06-10-%E4%B8%8B%E5%8D%883.18.24-1024x374.png\" alt=\"\" \u002F>\u003C\u002Fp>\n\u003Cp>新增(Add new vocab)\u003Cbr \u002F>\n\u003Cimg decoding=\"async\" src=\"\u002Fapi\u002Fproxy-image?url=https%3A%2F%2Fpost.billxu.net%2Fwp-content%2Fuploads%2F2022%2F06%2F%E6%88%AA%E5%9C%96-2022-06-10-%E4%B8%8B%E5%8D%883.21.55-1024x415.png\" alt=\"\" \u002F>\u003C\u002Fp>\n\u003Cp>標籤(label)是必須填入的欄位，他會作為該詞表的顯示名稱。以上述例子來說，就是填入「台灣六都城市」。\u003Cbr \u002F>\n語言(languge)是這個詞表可以依照語言需求做調整，有需要的話可以填入ISO 639-1 language code標準的簡碼\u003Cbr \u002F>\n條目(Item)則是可以讓某個條目集變成詞表，注意當使用了這個設定後，下方的Term就會沒用喔。\u003Cbr \u002F>\n專詞(Term)以上述例子，在裡面分別填入六都城市名稱。\u003Cbr \u002F>\n設定好後，可以在資源範本中加入參考詞表。\u003C\u002Fp>\n\u003Cp>\u003Cimg decoding=\"async\" src=\"\u002Fapi\u002Fproxy-image?url=https%3A%2F%2Fpost.billxu.net%2Fwp-content%2Fuploads%2F2022%2F06%2F%E6%88%AA%E5%9C%96-2022-06-10-%E4%B8%8B%E5%8D%883.20.08-1024x642.png\" alt=\"\" \u002F>\u003C\u002Fp>\n\u003Cp>這樣就可以在建立條目時，選擇範本後，該屬性就能使用控制詞表囉。\u003C\u002Fp>\n\u003Cp>\u003Cimg decoding=\"async\" src=\"\u002Fapi\u002Fproxy-image?url=https%3A%2F%2Fpost.billxu.net%2Fwp-content%2Fuploads%2F2022%2F06%2F%E6%88%AA%E5%9C%96-2022-06-10-%E4%B8%8B%E5%8D%883.21.16-1024x640.png\" alt=\"\" \u002F>\u003C\u002Fp>\n","2022-06-17T08:00:03",{"name":88,"link":89},[217],{"name":57,"slug":57},"\u002Fblog\u002Fomekas模組custom-vocab-建立權威詞表",{"id":220,"slug":221,"title":222,"description":223,"content":224,"date":225,"image":112,"imageAlt":222,"author":226,"categories":227,"path":229,"minRead":9},32,"omekas關於設定https","[OmekaS]關於設定Https","關於設定Https 最近專案準備上了，順便紀錄一下掛載SSL時的設定。 Apache設定 Apache基本的S […]","\u003Ch2>關於設定Https\u003C\u002Fh2>\n\u003Cp>最近專案準備上了，順便紀錄一下掛載SSL時的設定。\u003C\u002Fp>\n\u003Ch3>Apache設定\u003C\u002Fh3>\n\u003Cp>Apache基本的SSL設定要開啟443，通常先設定\u003Cstrong>httpd-ssl.conf\u003C\u002Fstrong>之類的文檔，類似的教學與討論很多，就請自行找尋。範例如下。\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-php\">&lt;IfModule mod_ssl.c&gt;\n&lt;VirtualHost *:443&gt;\n    ServerAdmin webmaster@localhost\n    ServerName localhost\n    ServerAlias localhost\n    DocumentRoot \u002Fvar\u002Fwww\u002Fhtml\u002Fomeka\u002F\n\n    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,\n    # error, crit, alert, emerg.\n    # It is also possible to configure the loglevel for particular\n    # modules, e.g.\n    #LogLevel info ssl:warn\n\n    ErrorLog ${APACHE_LOG_DIR}\u002Ferror.log\n    CustomLog ${APACHE_LOG_DIR}\u002Faccess.log combined\n\n    # For most configuration files from conf-available\u002F, which are\n    # enabled or disabled at a global level, it is possible to\n    # include a line for only one particular virtual host. For example the\n    # following line enables the CGI configuration for this host only\n    # after it has been globally disabled with &quot;a2disconf&quot;.\n    #Include conf-available\u002Fserve-cgi-bin.conf\n\n    #   SSL Engine Switch:\n    #   Enable\u002FDisable SSL for this virtual host.\n    #啟動SSL\n    SSLEngine On\n\n    #   A self-signed (snakeoil) certificate can be created by installing\n    #   the ssl-cert package. See\n    #   \u002Fusr\u002Fshare\u002Fdoc\u002Fapache2\u002FREADME.Debian.gz for more info.\n    #   If both key and certificate are stored in the same file, only the\n    #   SSLCertificateFile directive is needed.\n\n    #這邊放pem與key\n    SSLCertificateFile     \u002Fetc\u002Fssl\u002Fcerts\u002Fssl-cert-snakeoil.pem\n    SSLCertificateKeyFile \u002Fetc\u002Fssl\u002Fprivate\u002Fssl-cert-snakeoil.key\n\n    #記得要設定訪問的資料夾位置與權限\n    &lt;Directory 你的網站資料夾位置&gt;\n            Options FollowSymLinks\n            AllowOverride All\n    &lt;\u002FDirectory&gt;\n            ErrorLog \u002Fvar\u002Flog\u002Fapache2\u002Fomeka-error_log\n            CustomLog \u002Fvar\u002Flog\u002Fapache2\u002Fomeka-access_log common\n    &lt;IfModule mod_headers.c&gt;\n    &lt;filesmatch &quot;\\.(html)$&quot;&gt;\n            Header set Cache-Control &quot;no-cache&quot;\n    &lt;\u002Ffilesmatch&gt;\n    &lt;\u002FIfModule&gt;\n\n&lt;\u002FVirtualHost&gt;\n&lt;\u002FIfModule&gt;\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3>OmekaS設定\u003C\u002Fh3>\n\u003Cp>然後要在OmekaS的資料夾中找到\u003Cstrong>htaccess \u003C\u002Fstrong>，加入以下設定。\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-php\">RewriteEngine On\n# Always redirect to https.\nRewriteCond %{HTTPS} !=on\nRewriteRule ^\u002F?(.*) https:\u002F\u002F%{SERVER_NAME}\u002F$1 [R,L]\u003C\u002Fcode>\u003C\u002Fpre>\n","2022-05-13T17:13:56",{"name":88,"link":89},[228],{"name":57,"slug":57},"\u002Fblog\u002Fomekas關於設定https",{"id":231,"slug":232,"title":233,"description":234,"content":235,"date":236,"image":112,"imageAlt":233,"author":237,"categories":238,"path":240,"minRead":29},23,"omekas-常用資源整理","[OmekaS]OmekaS 常用資源整理","OmekaS 常用資源整理 以下是我常用的一些資源，中文資源非常少，也期盼有更多人一同參與 OmekaS官方網 […]","\u003Ch2>OmekaS 常用資源整理\u003C\u002Fh2>\n\u003Cp>以下是我常用的一些資源，中文資源非常少，也期盼有更多人一同參與\u003C\u002Fp>\n\u003Ch4>\u003Ca href=\"https:\u002F\u002Fomeka.org\u002Fs\u002F\">OmekaS官方網站\u003C\u002Fa>\u003C\u002Fh4>\n\u003Ch4>\u003Ca href=\"https:\u002F\u002Fforum.omeka.org\u002Fc\u002Fomeka-s\u002F8\">OmekaS官方討論區\u003C\u002Fa>\u003C\u002Fh4>\n\u003Cblockquote>\n\u003Cp>OmekaS的官方就提供了許多資源，另外還有討論區，很多時候我會直接去討論區挖寶，多半能找到許多很棒的討論串。開發過程遇到問題通常能在討論區找到線索。\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Ch4>\u003Ca href=\"https:\u002F\u002Fomeka.org\u002Fs\u002Fdocs\u002Fuser-manual\u002F\">OmekaS使用者手冊\u003C\u002Fa>\u003C\u002Fh4>\n\u003Ch4>\u003Ca href=\"https:\u002F\u002Fomeka.org\u002Fs\u002Fdocs\u002Fdeveloper\u002F\">OmekaS開發者手冊\u003C\u002Fa>\u003C\u002Fh4>\n\u003Cblockquote>\n\u003Cp>不用解釋，兩個必讀的手冊。\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Ch4>\u003Ca href=\"https:\u002F\u002Fdaniel-km.github.io\u002FUpgradeToOmekaS\u002Fomeka_s_modules.html\">From Omeka Classic to Omeka Semantic\u003C\u002Fa>\u003C\u002Fh4>\n\u003Ch4>\u003Ca href=\"https:\u002F\u002Fgitlab.com\u002FDaniel-KM\">Daniel-km\u003C\u002Fa>\u003C\u002Fh4>\n\u003Cblockquote>\n\u003Cp>Daniel Berthereau分享了相當多的模組與主題，而From Omeka Classic to Omeka Semantic這個網站會定期整理網路上的OmekaS相關資源，非常推薦來這邊找需要的模組與主題。\u003C\u002Fp>\n\u003C\u002Fblockquote>\n","2022-05-05T10:38:12",{"name":88,"link":89},[239],{"name":57,"slug":57},"\u002Fblog\u002Fomekas-常用資源整理",{"id":242,"slug":243,"title":244,"description":245,"content":246,"date":247,"image":86,"imageAlt":244,"author":248,"categories":249,"path":251,"minRead":9},7,"omekas-3-2-0釋出了","[OmekaS]OmekaS 3.2.0釋出了","OmekaS 3.2.0版本釋出囉 下載連結:https:\u002F\u002Fomeka.org\u002Fs\u002Fdownload\u002F 以下 […]","\u003Ch3>OmekaS 3.2.0版本釋出囉\u003C\u002Fh3>\n\u003Ch4>下載連結:\u003Ca href=\"https:\u002F\u002Fomeka.org\u002Fs\u002Fdownload\u002F\">https:\u002F\u002Fomeka.org\u002Fs\u002Fdownload\u002F\u003C\u002Fa>\u003C\u002Fh4>\n\u003Cp>以下是官方的版本說明加上我測試後的一些說明:\u003C\u002Fp>\n\u003Ch2>特點Features\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\n\u003Cp>Value Annotation\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>資料註解\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Cul>\n\u003Cli>Users can now use metadata properties and values to describe\u002Fannotate values, or, put another way, to make statements about their statements. This introduces the concept of reification to Omeka S. Users can choose to make ambiguous facts more concrete by annotating things like: provenance (Where is this fact from?), time (When did this fact occur?), location: (What is the location associated with this fact?), certainty (What is the confidence of this fact?), type (What type of concept\u002Fthing is this fact?), and more.\u003C\u002Fli>\n\u003Cli>New site setting to choose whether to show value annotations publicly\u003Cbr \u002F>\n\u003Cblockquote>\n\u003Cp>現在可以在後設資料中加上註解，也可以選擇(或用api)呼叫這個註解，終於可以在後設資料中加上更多資訊，過去一些比較細節的資料也能加上去了，太棒了。\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003C\u002Fli>\n\u003C\u002Ful>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>Fulltext search now includes the text of value annotations (with their parent resources) and media metadata (with their parent items)\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>全文搜尋也會搜尋到資料註解\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>Search results now include thumbnails where appropriate\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>搜尋結果會包括縮圖?怎記得原本就可以叫出來，測試不太來這項\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>Public resource show pages for resources not included on a site now include &quot;noindex&quot; meta-tags to avoid search engines potentially indexing resources under the wrong sites\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>資料可以加上noindex標籤，讓資料不被搜尋誤找到，很棒的更新!\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>Theme config can now set the &quot;required&quot; flag for form inputs\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>主題設定加上得必要標籤，應該是製作主題時內設定可以變成必要欄位\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>The page title block now uses a view so themes can override it (#1787, contributed by @grandgeorg)\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>頁面標題區塊現在可以使用樣板覆蓋，終於可以做一些更客製化的標題囉\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>Data types can optionally accept an extra array argument of options to their render method (partiarlly contributed by @Daniel-KM)\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>似乎是資料型態可以透過陣列來放進參數\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>Site pages now include a class on the body element derived from the page's slug to make page-specific styling easier\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>可以在頁面放自訂類到頁面slug中....不太確定實作，要安裝看看才知道\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>The admin interface for site navigation and the &quot;list of pages&quot; block now indicate when pages are private\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>管理介面相關，在站點的導覽項目中，現在可以看出哪些頁面是公開還是私有\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>JPEG2000's .jp2 is now supported when ingested without its file extension set (contributed by @Daniel-KM)\u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>沒有指定檔案設置也會支援偵測jp2格式...?不太確定\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003C\u002Fli>\n\u003C\u002Ful>\n","2022-05-04T14:49:54",{"name":88,"link":89},[250],{"name":57,"slug":57},"\u002Fblog\u002Fomekas-3-2-0釋出了"]