Answer the question
In order to leave comments, you need to log in
How to add code to display title for images in DLE?
Guys, there is a piece of code that is responsible for displaying the added images in the admin panel when adding news,
$this->image_count ++;
if( $option[1] != "" ) {
$alt = htmlspecialchars( strip_tags( stripslashes( $option[1] ) ), ENT_QUOTES, $config['charset'] );
$alt = str_replace("&","&",$alt);
$info = $info."|".$alt;
$alt = "alt=\"" . $alt . "\"";
} else {
if($this->image_count == 1) {
$alt = htmlspecialchars( strip_tags( stripslashes( $_POST['title'] ) ), ENT_QUOTES, $config['charset'] );
$alt = str_replace("&","&",$alt);
} else { $alt = ""; }
$alt = "alt=\"" . $alt . "\"";
}
if ( $align ) {
$style="style=\"float:{$align};max-width:100%;\"";
} else $style="style=\"max-width:100%;\"";
if( intval( $config['tag_img_width'] ) ) {
if (clean_url( $config['http_home_url'] ) != clean_url ( $url ) ) {
$style .= " data-maxwidth=\"".intval($config['tag_img_width'])."\"";
}
}
return "<!--dle_image_begin:{$info}-->".$this->htmlparser->purify("<img src=\"{$url}\" {$style} {$alt}>")."<!--dle_image_end-->";
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question