Home > CMS Tutorial > PHPCMS > body text

Why not set watermark in phpcms

藏色散人
Release: 2020-07-14 10:40:21
Original
2139 people have browsed it

How to not set a watermark in phpcms: first find the water folder and delete it; then find the watermark function in the "image.class.php" file; finally add the "$w_text" parameter to this function Just set the value to empty.

Why not set watermark in phpcms

phpcms does not set a watermark

Step one: Find the statics/images/water folder and delete it ;If the system cannot find the watermark image in the water folder, it will perform the second step to add a watermark in text format to the image

Step 2: Find phpcms/libs/classes/image.class. For the watermark function in the php file, set the value of the $w_text parameter in this function to empty

function watermark($source, $target = '', $w_pos = '', $w_img = '', $w_text = '',$w_font = 8, $w_color = '#ff0000') {  
        $w_pos = $w_pos ? $w_pos : $this->w_pos;  
        $w_img = $w_img ? $w_img : $this->w_img;  
        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];
Copy after login

If you want to replace it with a watermark image of your own design, you only need to replace statics/images The watermark image in the /water folder can be the watermark image designed by yourself.

If you want to add a watermark in text format to the pictures you upload, in addition to deleting the statics/images/water folder, you also need to change the value of the $w_text parameter in the watermark function to what you want. Just text.

Recommended: "phpcms tutorial"

The above is the detailed content of Why not set watermark in phpcms. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template