[wordpress插件] AutoThumb自动拇指

wordpress 插件 文章 2020-02-25 23:00 480 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

The plugin is actually just a port of a plugin/snippet I wrote for MODx a while ago (

该插件实际上只是我为 MODx 之前写的一个插件/片段的端口(

href="http://modxcms.com/phpThumb-Package-1522.html" rel="nofollow">see here).

href =“ http://modxcms.com/phpThumb-Package-1522.html” rel =“ nofollow”>请参阅此处)。

It scans your content's source code for tags with width and height attributes and passes them to phpThumb, a great

它会在您内容的源代码中扫描具有width和height属性的标签,并将它们传递给 phpThumb

PHP image editing library, which handles the resizing and editing of the image.

PHP图像编辑库,用于处理图像的大小调整和编辑。

Additionally, by passing parameters to phpThumb using a query string, it's possible to edit the image in several ways (take a look at phpThumb's demos).

.php“ rel =” nofollow“> phpThumb的演示)。

The simplest way to get resized images is to specify width/height attibutes in your HTML.

获得调整大小的图像的最简单方法是在HTML中指定宽度/高度。

AutoThumb will use the given values and remove the attributes from your page’s output.

AutoThumb将使用给定的值,并从页面的输出中删除属性。

When you take a look at the URLs of the example images found on the plugin home page, you will see that the -tag’s src-attribute points to a file called image.php in the plugin’s directory.

查看插件主页上的示例图像的URL时,您会看到 -tag的src-attribute指向插件目录中名为image.php的文件。

This file takes the image source and several other parameters and passes them to phpThumb, which will generate and output the final image (of course images will be cached).

该文件获取图像源和其他几个参数,并将它们传递给phpThumb,它将生成并输出最终图像(当然,图像将被缓存)。

To prevent evil people playing with the query string and letting your server generate tons of different images, the plugin generates a hash which is a combination of the query string and a secret password you set in phpThumb’s config file.

为防止邪恶的人玩弄查询字符串并让您的服务器生成大量不同的图像,该插件会生成一个哈希,该哈希是查询字符串和您在phpThumb的配置文件中设置的秘密密码的组合。

So every call with different parameters (even the same image with different sizes) has another unique hash and it’s not possible to generate new images without knowing the secret password.

因此,每个具有不同参数的调用(甚至是具有不同大小的同一张图片)都具有另一个唯一的哈希值,并且在不知道密码的情况下无法生成新图片。

See the plugin page for more details on the plugin.

有关插件的更多详细信息,请参见插件页面

All development is done on GitHub.

所有开发都在 GitHub 上完成。

If you have ideas, enhancements, etc. feel free to fork the project and send a pull request.

如果您有想法,增强功能等,请随时分叉该项目并发送请求请求。

For any issues please use the Issue Tracker.

对于任何问题,请使用问题跟踪器

安装步骤

    1. Download the .zip file and extract it.
    2. 下载.zip文件并解压缩。

    3. Upload the plugin to your /wp-content/plugins/ directory and make sure your web server has write access to the cache folder and the config file.
    4. 将插件上传到您的 / wp-content / plugins / 目录,并确保您的Web服务器对缓存文件夹和配置文件具有写权限。

    5. Activate the plugin.
    6. 激活插件。

    7. Go to Settings – AutoThumb and setup the plugin
    8. 转到“设置-AutoThumb”并设置插件

    9. Have fun!
    10. 玩得开心!

下载地址
https://downloads.wordpress.org/plugin/autothumb.0.6.1.zip
-EOF-

AI助手支持GPT4.0