@@ 493-521 (lines=29) @@ | ||
490 | * Return author's signiture |
|
491 | * @return string |
|
492 | */ |
|
493 | function getSignature() |
|
494 | { |
|
495 | // pass if the posting not exists. |
|
496 | if(!$this->isExists() || !$this->get('member_srl')) |
|
497 | { |
|
498 | return; |
|
499 | } |
|
500 | ||
501 | // get the signiture information |
|
502 | $oMemberModel = getModel('member'); |
|
503 | $signature = $oMemberModel->getSignature($this->get('member_srl')); |
|
504 | ||
505 | // check if max height of the signiture is specified on the member module |
|
506 | if(!isset($GLOBALS['__member_signature_max_height'])) |
|
507 | { |
|
508 | $oModuleModel = getModel('module'); |
|
509 | $member_config = $oModuleModel->getModuleConfig('member'); |
|
510 | $GLOBALS['__member_signature_max_height'] = $member_config->signature_max_height; |
|
511 | } |
|
512 | ||
513 | $max_signature_height = $GLOBALS['__member_signature_max_height']; |
|
514 | ||
515 | if($max_signature_height) |
|
516 | { |
|
517 | $signature = sprintf('<div style="max-height:%dpx;overflow:auto;overflow-x:hidden;height:expression(this.scrollHeight > %d ? \'%dpx\': \'auto\')">%s</div>', $max_signature_height, $max_signature_height, $max_signature_height, $signature); |
|
518 | } |
|
519 | ||
520 | return $signature; |
|
521 | } |
|
522 | ||
523 | function thumbnailExists($width = 80, $height = 0, $type = '') |
|
524 | { |
@@ 1146-1167 (lines=22) @@ | ||
1143 | * Return author's signiture |
|
1144 | * @return string |
|
1145 | */ |
|
1146 | function getSignature() |
|
1147 | { |
|
1148 | // Pass if a document doesn't exist |
|
1149 | if(!$this->isExists() || !$this->get('member_srl')) return; |
|
1150 | // Get signature information |
|
1151 | $oMemberModel = getModel('member'); |
|
1152 | $signature = $oMemberModel->getSignature($this->get('member_srl')); |
|
1153 | // Check if a maximum height of signiture is set in the member module |
|
1154 | if(!isset($GLOBALS['__member_signature_max_height'])) |
|
1155 | { |
|
1156 | $oModuleModel = getModel('module'); |
|
1157 | $member_config = $oModuleModel->getModuleConfig('member'); |
|
1158 | $GLOBALS['__member_signature_max_height'] = $member_config->signature_max_height; |
|
1159 | } |
|
1160 | if($signature) |
|
1161 | { |
|
1162 | $max_signature_height = $GLOBALS['__member_signature_max_height']; |
|
1163 | if($max_signature_height) $signature = sprintf('<div style="max-height:%dpx;overflow:auto;overflow-x:hidden;height:expression(this.scrollHeight > %d ? \'%dpx\': \'auto\')">%s</div>', $max_signature_height, $max_signature_height, $max_signature_height, $signature); |
|
1164 | } |
|
1165 | ||
1166 | return $signature; |
|
1167 | } |
|
1168 | ||
1169 | /** |
|
1170 | * Change an image path in the content to absolute path |