In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Today, I will talk to you about how to go to phpcms watermarking, many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
Many webmaster friends know that Phpcms v9 has its own watermark function. Today, when the editor was modifying the website for a friend, he asked the editor if he could remove the watermark function included in Phpcms v9, because sometimes when uploading pictures in the editor, he did not want the uploaded pictures to be automatically watermarked by phpcmsv9.
Analysis: since it is a function in the program, there must be a piece of code that controls this function. Through further search for information, the editor found the file where this function is located and the corresponding control code. The following editor will share with you the setup steps in addition to phpcms v9.
The first step: first find the statics/images/water folder according to the directory path and delete the water file; if the system can not find the watermark image in the water folder, follow the setting method in the second step to add a text format watermark to the picture.
Step 2: follow the directory path to find the watermark watermark function in the phpcms/libs/classes/image.class.php file, and set the value of the $w_text parameter in this function to empty. (refer to the following code)
Function watermark ($source, $target = ", $w_pos =", $w_img = ", $w_text =", $w_font = 8, $w_color ='# ff0000') {$w_pos = $w_pos? $w_pos: $this- > wroomimg = $w_img? $w_img: $this- > wroomimg = if (! $this- > watermark_enable |! $this- > check ($source)) return false;if (! $target) $target = $source;$w_img = PHPCMS_PATH.$w_img;$source_info = getimagesize ($source) $source_w = $source_info [0]; $source_h = $source_info [1]
If the webmaster friends have a designed watermark picture can also be replaced. The replacement method is to find the watermark image under the statics/images/water folder in this path and replace it with the selected watermark image to upload and overwrite it. There are many ways to add, delete and replace watermarks. If webmaster friends want to add watermarks in text format to their uploaded images, you not only need to delete the statics/images/water folder, but also need to change the value of the $w_text parameter in the watermark function to the text you need to design. In fact, the design of watermark is not very difficult, it can be realized by program. The editor has also designed a lot of watermarks. Just take the encapsulated class and call it.
After reading the above, do you have any further understanding of how to go to phpcms watermarking? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.