From 65bb5ed90f98277ceae7eefbbb957344252e49c2 Mon Sep 17 00:00:00 2001 From: cth-inni Date: Tue, 26 Oct 2021 15:45:39 +0800 Subject: [PATCH] Allow set extraImageClass --- src/ChatBlock.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/ChatBlock.php b/src/ChatBlock.php index df281ec..46a46d0 100644 --- a/src/ChatBlock.php +++ b/src/ChatBlock.php @@ -53,6 +53,7 @@ function __construct($newObj=null) $oriObj = [ 'devTools' => false, 'allowForkScript' => null, + 'extraImageClass' => null, 'chatHeaderSize' => 'normal', 'mainCastColor' => '#248bf5', 'castColorMode' => 'none', // none, random, palette (15 colors) @@ -770,7 +771,12 @@ private function render_image_holder($dialogue) { $link = $this->fn_valid_link($dialogue['_context']); $tempHtml = '
'; - $tempHtml .= 'Image'; + $extraClass = ''; + if($this->settings->extraImageClass) + { + $extraClass = $this->settings->extraImageClass; + } + $tempHtml .= 'Image'; $tempHtml .= '
'; return $tempHtml; } @@ -923,7 +929,12 @@ private function renderRoleSide($dialogue,$direction='left',$color='#CCC') $context = ''; switch($ext){ case 'image': - $context = 'Image'; + $extraClass = ''; + if($this->settings->extraImageClass) + { + $extraClass = $this->settings->extraImageClass; + } + $context = 'Image'; break; case 'mp3': $context = '