This is a time ago, the configuration of the company's website when a problem solved, and now read the previous notes, to the need for this feature everyone.
Youdao Cloud Notes: creation time: 2014-09-20 16:07
After a few days of code analysis, gradually found the need to add a watermark, and finally added only a few lines of code.
Direct topic: source/class/extend/extend_thread_sort.php in the Extend_thread_sort class,In its method public function After_newthread ()if ($_g[' forum_optionlist ' [$optionid] [' type '] = = ' image ') {
$identifier = $_g[' forum_optionlist ' [$optionid] [' identifier '];
$sortaids [] = Intval ($_get[' typeoption ' [$identifier] [' aid ']);
require_once libfile (' class/image ');
$image = new Image;
$imgoptiondata = dunserialize ($value);
if ($_g[' setting ' [' watermarkstatus '] && empty ($_g[' forum ' [' Disablewatermark '])) {
$image->watermark ($imgoptiondata [' url '], ' ', ' Forum ');
$update [' filesize '] = $image->imginfo[' size ');
Red is the added code
Analysis process is more tortuous, because the previous period of time has been relatively familiar with the classification information, know Disucz in the entire parsing process of classification information, so this time according to the forum attached to the image of the method of adding watermarks, step by step positioning to the need to add a watermark location.
Image watermarking method in Discuz x3.x classification information