我最近使用MODx Revolution設置了一個網站。我正在嘗試使用相同名稱的插件製作一個畫廊。我希望它能夠點擊一個鏈接,該鏈接顯示原始圖片,因爲它已上傳。這裏是我的畫廊頁面代碼:MODx圖庫無法正確顯示圖像
<div class="ContentHead">[[*longtitle]]</div>
<p>This page contains galleries of various images I have taken or made. Each has a description, so feel free to browse. Clicking thumbnails will reload the page, and may take some time to load a larger version of the image - but it will get there!</p>
<p>[[!Gallery? &toPlaceholder=`gallery`]] [[!GalleryItem? &imageWidth=`900` &imageHeight=`900`]] [[!GalleryAlbums? &prominentOnly=`0` &limit=`0` &rowTpl=`galAlbumRowTplCustom` &toPlaceholder=`galleries`]]</p>
<div align="center">| [[+galleries]]</div>
<hr />
<p><a name="largeImage"></a></p>
<p> </p>
<p>[[!+galitem.image:notempty=`</p><div class="image"><img class="[[+galitem.imgCls]]" src="[[+galitem.image]]" alt="[[+galitem.name]]" /><br/>[[+galitem.description]]<br />Albums: [[+galitem.albums]] <br />Tags: [[+galitem.tags]]<br/><a href="[[!+galitem.image]]">View original image</a><hr /></div> <p>`]]
[[!+gallery:notempty=`</p><div ><h1 style="font-size: 20px; font-weight: bold; font-family: Calibri;">[[+gallery.name]]</h1><h2 style="font-size: 18px; font-weight: normal; font-family: Calibri;">[[+gallery.description]]</h2><p> </p><h2 style="font-size: 18px; font-weight: normal; font-family: Calibri;">[[+gallery]]</h2> </div>`]]
<div style="height:600px"><!--This ensures that when a thumb is clicked, the gallery isn't pushed below the footer.--></div>
導致該問題的代碼:
<a href="[[!+galitem.image]]">View original image</a>
產生以下(例子)網址:
http://www.reflectric.com/assets/components/gallery/connector.php?action=web/phpthumb&w=900&h=900&zc=0&far=&q=90&src=http%3A%2F%2Fwww.reflectric.com%2Fassets%2Fcomponents%2Fgallery%2Ffiles%2F3%2F28.bmp
如果您按照它(繼續,嘗試它!)在Internet Explorer上(在6和9測試),它顯示圖像就好了。然而,在我測試過的每一個瀏覽器中,它都會提供與在記事本++或另一個文本編輯器中加載圖像相同的結果。
在圖像上執行「右鍵另存爲」會導致保存php重定向,而不是圖像,而「右鍵單擊視圖圖像」與上面的鏈接相同。
因此,我要求要麼 a)是有辦法解決這個問題, 或b)是有辦法直接鏈接,而不是通過PHP頁面將圖像,?
感謝您的幫助,您可以給,
西蒙
關於splittingreds Gallery github-repo報告了類似的問題。然而,圖像然後沒有使用 ...服務。問題在幾天後關閉。見:https://github.com/splittingred/Gallery/issues/104 – Wolff 2011-07-18 09:42:02
這個評論是正確的答案 - 基本上這是一個問題,與圖書館的版本,它已經在下一次更新中解決 – simonalexander2005 2011-07-19 15:47:07