如何改进这个壁纸库?

发布于 2024-10-15 13:14:34 字数 849 浏览 2 评论 0原文

画廊 - http://schnell.dreamhosters.com/wallpapers.php

该画廊的目的是简单 - 存储大量壁纸并按分辨率和/或宽高比对它们进行排序,供人们随意浏览和下载。我想要使​​用一些功能,但我不太确定如何最好地实现它们或根本不知道如何实现它们。该演示文稿采用 HTML 4、CSS、Javascript 和 jQuery + 插件。幕后工作是用 PHP 完成的。

1 - 使图像可下载,无需“将图像另存为...”。现在,我正在使用一种发明,单击每个图像框右下角的下载链接会打开一个新框,其中包含指示用户“右键单击”的说明。将图像另存为...'。如果可能的话,我想完全避免这种情况。

2 - 使搜索和排序更快、更高效。现在,所有图像都存储在我的网站空间上的一个文件夹中,我使用 shell 命令和 PHP 中的许多奇特过滤来根据过滤器获取我想要的图像(我所在的页码和宽高比或我选择的分辨率)。我想也许用 MySQL 做点什么,但我还没有完全弄清楚如何做到这一点并维护我的页面的结构。

3 - 使图像加载速度更快。可能没有简单的编码解决方案可以解决这个问题,因此这个问题更像是“我希望”而不是“我想要”。

4 - 改进布局。我认为这个更加主观和“艺术”,但任何建议都会很好。

5 - 上传系统。能够上传您自己的壁纸,并可能包含简短的描述或一些标签。我完全不知道如何处理这个问题,因为我以前从未处理过上传文件。这也导致...

6 - 标签系统或其他类型的用户制作的分类系统。再说一次,这里没有经验。

对这些问题的任何见解都会很棒,并且请随意提出您自己的任何建议。

Gallery - http://schnell.dreamhosters.com/wallpapers.php

The purpose of this gallery is simple - store a lot of wallpapers and sort them by resolution and/or aspect ratio for people to browse and download as they like. There's a few features I've wanted to work in, but I'm not quite sure how best to do them or how to do them at all. The presentation is in HTML 4, CSS, Javascript and jQuery + plugins. The work behind the scenes is done in PHP.

1 - Make the images downloadable without 'Save Image As...'. Right now I'm using a contrivance whereby clicking the Download link in the bottom-right of each image's box opens a new box with instructions telling the user to 'Right Click. Save Image As...'. I'd like to avoid this entirely if possible.

2 - Make the searching and sorting faster and more efficient. Right now all the images are stored in a folder on my webspace and I use a shell command and a lot of fancy filtering in PHP to get the images I want based on the filters (the page number I'm on and the aspect ratio or resolution I chose). I thought of maybe doing something with MySQL, but I haven't quite figured out yet how I'd do that and maintain the structure my page has.

3 - Make the images load faster. There's probably no easy coding solution to this, so this one is more of a 'I wish' than a 'I want to'.

4 - Improve the layout. This one is more subjective and 'artsy' I suppose, but any suggestions would be nice.

5 - An upload system. Give the ability to upload your own wallpapers and maybe include a short description or some tags. I have absolutely no idea how to handle this as I've never worked with uploading of files before. And this also leads to...

6 - A tagging system or some other type of user-made sorting system. Again, no experience here.

Any insight on any of these issues would be great, and feel free to throw in any suggestions of your own.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

债姬 2024-10-22 13:14:34
  1. 发送 MIME 类型为“application/octet-stream”的文件,让浏览器下载而不是显示它们

  2. 将有关图像的信息存储在数据库中而不是探索文件系统肯定会更好

  3. 图像对我来说加载速度确实不慢,所以我不能在这里提出任何建议。如果您的网站变得更大(更大),您可能需要研究一下 CDN

  4. 布局还不错,但需要一些设计,目前非常简单。如果能看到有关图像的更多信息 - 它们是什么、它们来自哪里、谁制作了它们等(不要忘记:正确的版权归属)

  5. 您可能想阅读 PHP 手册中有关处理文件上传的部分。要处理描述和标签,您肯定需要某种数据库。

  6. 如果您有一个正确形成的数据库,这也不难。如果您以前从未设计过架构,您可能想了解一些有关规范化和多对多关系的知识来制作标记。

最后,您没有要求它,但如果可以在多种分辨率下拥有相同的图像,那就太好了(在图像网站上很常见 - 想想 Flickr、Deviantart 等)。

  1. Send the files with the MIME type "application/octet-stream" to make a browser download rather than display them

  2. It would definitely be better to store information about the images in a database rather than exploring the filesystem

  3. The images really aren't loading slowly for me, so I can't really suggest anything here. If your site gets larger (much larger) you might want to look into CDNs

  4. The layout is OK but it needs some design, it's incredibly plain at the moment. It would also be nice to see more information on the images - what they are of, where they're from, who made them, etc (don't forget: correct copyright attribution)

  5. You probably want to read the PHP handbook section on handling file uploads. To handle description and tags, you'll definitely want a database of some sort.

  6. Also not hard if you have a correctly formed database. If you've never designed a schema before you probably want to learn a little about normalisation and many-to-many relationships to do the tags.

Lastly you didn't ask for it, but it'd be nice if it were possible to have the same image in multiple resolutions (quite common on image sites - think Flickr, Deviantart, etc).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文