我最近使用 MODx Revolution 建立了一个网站。我正在尝试使用同名插件制作画廊。我想要它,以便您可以单击一个链接,该链接显示原始图像,因为它是上传的。这是我的画廊页面的代码:
<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>
它生成以下(示例)url:
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 上测试)上关注它(继续,试试看!),它会很好地显示图像。然而,在我测试过的所有其他浏览器上,它提供的结果与在 notepad++ 或其他文本编辑器中加载图像所获得的结果相同。
在图像上执行“右键单击另存为”会导致保存 php 重定向,而不是图像,并且“右键单击查看图像”与上面的链接相同。
因此,我问要么a)有没有办法解决这个问题,或者b)有没有办法直接链接到图像,而不是通过php页面?
谢谢你提供的所有帮助,
西蒙