The first step: Add a Watermark box to the Picture Upload dialog box to find:
Satics/js/ckeditor/ckeditor.js line 17,554th (need to format, I use NetBeans) to change to
function D () {
W.$.open ();
if (B.iscustomdomain ()) W.$.domain=document.domain;
var e= ';
if (x.size) e=x.size-(c?7:0);
var f=u.frameid+ ' _input ';
W.$.write ([' ' <input type= ' checkbox "Name=" ', E.htmlencode (' watermarks_enable '), ' size= ' ', E.htmlencode (E > 0?) E: '), '/> add watermark ',' </form> ', ' </body>W.$.close ();
for (Var g=0; g<y.length; g++) y[g].enable ();
};
Added a red section
Step Two: Modify phpcms/libs/classes/image.class.php line 16th
function __construct ($thumb _enable = 0, $water _enable = 0, $siteid)
Modify phpcms/libs/classes/image.class.php line 18th and line 20
$this->water_enable = $water _enable; (Line 18th)
$this->watermark_enable = $this->water_enable; (line 20th)
Step three: Modify Phpcms/libs/classes/attachment.class.php line 35th to:
Change the last parameter of the upload method to $watermark _enable = 0
At the same time, add 39 lines below the blank place:
$watermark _enable = isset ($_post[' watermarks_enable ')? 1: $watermark _enable;
Continue to modify: The 123th row instantiates the image class when the parameter is changed to:
$image = new Image ($thumb _enable, $watermark _enable, $this->siteid);
(from reprint)
Phpcms v9 Editor uploads a picture to add a watermark